Matrix Operations
matrix_operationsPerform essential matrix operations including multiplication, inversion, transposition, determinant, and trace using optimized BLAS routines.
Instructions
Core matrix operations using NumPy BLAS.
Examples:
MATRIX MULTIPLICATION: operation="multiply", matrix1=[[1,2],[3,4]], matrix2=[[5,6],[7,8]] Result: [[19,22],[43,50]]
MATRIX INVERSE: operation="inverse", matrix1=[[1,2],[3,4]] Result: [[-2,1],[1.5,-0.5]]
TRANSPOSE: operation="transpose", matrix1=[[1,2],[3,4]] Result: [[1,3],[2,4]]
DETERMINANT: operation="determinant", matrix1=[[1,2],[3,4]] Result: -2.0
TRACE: operation="trace", matrix1=[[1,2],[3,4]] Result: 5.0 (1+4)
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 |
| operation | Yes | Matrix operation | |
| matrix1 | Yes | First matrix (e.g., [[1,2],[3,4]]) | |
| matrix2 | No | Second matrix for multiplication |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |