API & MCP

Everything a person can do on Matrix & Linear Algebra Lab, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Matrix & Linear Algebra Lab

Enter matrices with whole numbers, fractions or decimals and get exact results: row reduction with every row operation, determinant, inverse, rank, null space, A + B, A·B and solutions of A x = b. Eigenvalues are exact for 2×2/3×3 cases with rational or quadratic roots and numeric (shifted QR algorithm) otherwise; LU, QR and the condition number are computed numerically.

Inputs of Matrix & Linear Algebra Lab
FieldTypeDefaultDescription
operationselect (analyze, rref, determinant, inverse, rank, nullspace, transpose, add, subtract, multiply, solve, lu, qr, eigen, condition)"analyze"Operation
matrixA (required)textarea—Matrix A. One row per line (or rows separated by ;), entries separated by spaces or commas. Fractions like 1/3 and decimals are fine. Up to 10×10.
matrixBtextarea—Matrix B. Only for A + B, A − B and A · B.
vectorBtext—Right-hand side b. Only for "Solve A x = b": one number per row of A.

Example request

Overview of a 3×3 matrix

curl -X POST https://matrixlinearalgebralab.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"operation":"analyze","matrixA":"2 0 0\n0 3 4\n0 4 9"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "matrix-linear-algebra-lab": { "type": "http", "url": "https://matrixlinearalgebralab.usefulweb.site/mcp" }
  }
}