Matrix
matrixCompute determinant, inverse, eigenvalues, transpose, rank, or trace of a numerical grid by supplying its rows as a JSON array of numbers or expressions.
Instructions
Structured matrix operations: det, inverse, eigenvalues, transpose, rank, trace.
evaluate_expression refuses Matrix([[1,2],[3,4]]) on purpose — [/]
are denied there to block subscript-based RCE escapes, and a matrix
literal is collateral from that (correctly aimed) screen. This tool is
the structured replacement: rows is a JSON array of arrays (row-major),
never a string to parse. Each entry is either a JSON number, used
directly, or a scalar expression string ('1/2', 'sqrt(2)', 'x+1'),
screened per-entry the same way evaluate_expression screens its input
before anything reaches SymPy. Example: rows=[[1,2],[3,4]], op='det' -> -2.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | Operation to apply: one of det, inverse, eigenvalues, transpose, rank, trace | |
| rows | Yes | Row-major matrix as a JSON array of arrays; each entry is a number or a scalar expression string like 'sqrt(2)' |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||