Matrix Decomposition
matrix_decompositionDecompose matrices into eigenvalues/vectors, singular values, QR, Cholesky, or LU factors to analyze structure and solve linear systems.
Instructions
Matrix decompositions: eigenvalues/vectors, SVD, QR, Cholesky, LU.
Examples:
EIGENVALUE DECOMPOSITION: matrix=[[4,2],[1,3]], decomposition="eigen" Result: {eigenvalues: [5, 2], eigenvectors: [[0.89,0.45],[0.71,-0.71]]}
SINGULAR VALUE DECOMPOSITION (SVD): matrix=[[1,2],[3,4],[5,6]], decomposition="svd" Result: {U: 3×3, singular_values: [9.5, 0.77], Vt: 2×2}
QR FACTORISATION: matrix=[[1,2],[3,4]], decomposition="qr" Result: {Q: orthogonal, R: upper triangular}
CHOLESKY (symmetric positive definite): matrix=[[4,2],[2,3]], decomposition="cholesky" Result: {L: [[2,0],[1,1.41]]} where A=LL^T
LU DECOMPOSITION: matrix=[[2,1],[4,3]], decomposition="lu" Result: {P: permutation, L: lower, U: upper} where A=PLU
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | No | Optional annotation to label this calculation (e.g., 'Bond A PV', 'Q2 revenue'). Appears in results for easy identification. | |
| output_mode | No | Output format: full (default), compact, minimal, value, or final. See batch_execute tool for details. | full |
| matrix | Yes | Matrix to decompose as 2D nested list (e.g., [[4,2],[1,3]]) | |
| decomposition | Yes | Decomposition type: eigen=eigenvalues/vectors, svd=singular value, qr=QR, cholesky=symmetric positive definite, lu=LU factorisation |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |