Repository navigation
Give a square matrix its eigenvalues - #2064
Merged
Merged
Conversation
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
…trix # Conflicts: # Sources/MCP/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1676.
Matrix.Eigenvaluesis 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.[[0, J], [J, 0]]hassqrt(J^2)and-sqrt(J^2), which hold atJ = 0too.null.am_eigenvaluesnow uses the library's property, and the README lists the workarounds that remain.EigenvaluesTestcovers a symmetric 3×3 ({1, 2, 11}), a repeated root, the symbolic matrix above with noprovided, and a non-square matrix. It also checks three 2×2 matrices, one with complex eigenvalues, by makingA - λIsingular 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.txtgains 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