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
POST https://matrixlinearalgebralab.usefulweb.site/api/v1/calculate– run Matrix & Linear Algebra LabGET https://matrixlinearalgebralab.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
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.
| Field | Type | Default | Description |
|---|---|---|---|
operation | select (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. |
matrixB | textarea | — | Matrix B. Only for A + B, A − B and A · B. |
vectorB | text | — | 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)
- Streamable HTTP endpoint:
https://matrixlinearalgebralab.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
matrix_linear_algebra_lab - Local stdio connector:
node src/mcp-stdio.ts --tool=matrix-linear-algebra-lab
{
"mcpServers": {
"matrix-linear-algebra-lab": { "type": "http", "url": "https://matrixlinearalgebralab.usefulweb.site/mcp" }
}
}