matrix
Compute matrix operations—determinant, inverse, eigenvalues, transpose, rank, trace—by supplying rows as JSON and selecting an operation.
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. op is one of det/inverse/eigenvalues/
transpose/rank/trace. Example: rows=[[1,2],[3,4]], op='det' -> -2.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| rows | Yes |