Linear Algebra·matrix-inversion
Matrix Inversion
Given invertible matrices A, B, and the equation involving X, find the matrix X using the relationship derived from the equation.
✓ All 2 test cases pass.
Inputs
Test cases
These cases run live in your browser every time the page loads. If any fail, the calculator is broken — file an issue.
| # | Inputs | Expected | Got | Status |
|---|---|---|---|---|
| 1 | {"matrix_A":[[1,2],[3,4]],"matrix_B":[[5,6],[7,8]]} | -1.9999999999999996,0.9999999999999998,1.4999999999999998,-0.4999999999999999 | -2,1,1.5,-0.5 | ✓ |
| 2 | {"matrix_A":[[2,0],[0,2]],"matrix_B":[[1,1],[1,1]]} | 0.5,0,0,0.5 | 0.5,0,0,0.5 | ✓ |
APIDeveloper APICall this calculator from codeexpand ↓
Endpoint
POST
/api/calculators/linear-algebra/matrix-inversion/computeInputs (2)
matrix_Amatrixdefault[[1,0],[0,1]]matrix_Bmatrixdefault[[1,0],[0,1]]
Example
curl -sX POST http://localhost:3001/api/calculators/linear-algebra/matrix-inversion/compute \
-H "Content-Type: application/json" \
-d '{"inputs":{"matrix_A":[[1,0],[0,1]],"matrix_B":[[1,0],[0,1]]}}'Try it live
Edit the body below, then click Call API.Request body
Response
(click Call API to see the response)Source: Pattern from: Test 2-08 Version D (Solution).pdf. Reproduces a standard matrix-inversion computation; problem text paraphrased.
AI disclosure: Calculator code generated by openai/gpt-4o-mini-2024-07-18; verified by 2 test cases.