Skip to content

Give a square matrix its eigenvalues - #2064

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
eigenvalues-of-a-matrix
Oct 22, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
eigenvalues-of-a-matrix

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Fixes #1676.

  • The gap. A matrix had a characteristic polynomial (A square matrix has a characteristic polynomial #1625) and no eigenvalues.
  • The change. Matrix.Eigenvalues is the set of the characteristic polynomial's roots, in a variable of the matrix's own, solved by the equation solver. That means radicals up to the fourth degree, and beyond it wherever the polynomial factors.
    • No pivot conditions. The characteristic polynomial divides by nothing, so the roots carry none of the conditions an elimination's pivots would bring. [[0, J], [J, 0]] has sqrt(J^2) and -sqrt(J^2), which hold at J = 0 too.
    • Edge cases. A repeated root is one member of the set. A matrix that is not square has null.
  • The MCP server solved the characteristic polynomial itself while waiting for this. am_eigenvalues now uses the library's property, and the README lists the workarounds that remain.

EigenvaluesTest covers a symmetric 3×3 ({1, 2, 11}), a repeated root, the symbolic matrix above with no provided, and a non-square matrix. It also checks three 2×2 matrices, one with complex eigenvalues, by making A - λI singular for each eigenvalue. The full unit suite passes (16,710), and so do the MCP tests (325). The library builds for netstandard2.0. This is a pure addition, PublicApi.txt gains one line, and no answer changes, so it has no BREAKING-CHANGES entry. The MCP README's list of workarounds is edited by #2061, #2062 and #2063 as well, so whichever merges later has a one-line conflict there.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

A matrix had a characteristic polynomial (#1625) and no eigenvalues.
Matrix.Eigenvalues is the set of its roots in a variable of its own,
solved by the equation solver: radicals up to the fourth degree, and past
it where the polynomial factors. The characteristic polynomial divides by
nothing, so the roots carry no condition an elimination's pivots would
bring: [[0, J], [J, 0]] has sqrt(J^2) and -sqrt(J^2), which hold at J = 0
too. A repeated root is one member of the set; a matrix that is not
square has none.

The MCP server solved the characteristic polynomial itself, waiting for
this; am_eigenvalues now takes the library's, and its README lists the
workarounds that remain.

Fixes #1676.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet
Rafael-SOWNet merged commit c49d925 into master Oct 22, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 22, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the eigenvalues-of-a-matrix branch October 29, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Eigenvalues of a matrix

1 participant