{"uid":"cap_6_bSNQFdGqA3Y5HtUOoqH","slug":"linear-algebra-matrix-inverse-cc0fff4f","name":"Linear Algebra Matrix Inverse","description":"Inverse of a square matrix (up to 10x10) by Gauss-Jordan, with A*inv(A) residual and a condition number.","url":"https://linear-algebra.x402tookit.com/inverse?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["A"],"properties":{"A":{"type":"string","description":"Square matrix, JSON like [[4,7],[2,6]] or 4,7;2,6 (max 10x10)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"source":{"type":["null","string"]},"inverse":{"type":["array","null"],"items":{"type":"array","items":{"type":"number"}}},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"singular":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"illConditioned":{"type":["boolean","null"]},"digitsLostEstimate":{"type":["null","number"]},"conditionNumber1Norm":{"type":["null","number"]},"maxResidualAAinvMinusI":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_vwLd8VDJqBioEz1VSIlDR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the inverse of a square matrix (up to 10x10) using Gauss-Jordan elimination, returning the inverse matrix, A*inv(A) residual, and condition number.","exampleAgentPrompt":"Can you invert the matrix [[4,7],[2,6]] and tell me the condition number and how much numerical precision was lost?","exampleUseCases":[{"title":"Checking matrix invertibility before solving","prompt":"I have a 3x3 matrix [[2,1,0],[1,3,1],[0,1,2]] — can you compute its inverse using Gauss-Jordan and let me know if it's singular or ill-conditioned?"},{"title":"Validating numerical stability of a large matrix","prompt":"Invert this 5x5 matrix for me: [[6,1,1,3,2],[4,5,2,1,3],[2,1,8,4,1],[3,2,1,7,3],[1,3,2,2,9]] and tell me the condition number and residual so I know if the result is numerically reliable."},{"title":"Solving for transformation matrix inverse in graphics","prompt":"I need the inverse of the rotation-scale matrix [[0.866,-0.5,0],[0.5,0.866,0],[0,0,1]] — can you compute it and check how many digits of precision are lost?"}],"resultDescription":"Returns the inverse matrix as a 2D array of floats, a boolean singular flag (true if matrix is not invertible), an ill-conditioned flag, the 1-norm condition number, the maximum absolute entry of A*inv(A)-I (residual check), an estimated number of decimal digits lost to cancellation, and a human-readable summary string.","failureModes":["Singular matrix: inverse does not exist, singular flag set to true and inverse is null","Ill-conditioned matrix: inverse computed but ill-conditioned flag set true with high digitsLostEstimate warning","Matrix larger than 10x10: rejected, maximum supported size is 10x10","Malformed matrix input: non-square matrix or invalid JSON format returns an error","Non-numeric entries in matrix: parsing failure returns error response"],"whenToPreferThis":"Use this endpoint when you need the explicit inverse of a square matrix (up to 10x10), especially when numerical stability diagnostics (condition number, residual, digits-lost estimate) are important. If you just need to solve Ax=b, prefer the Ax=b solver endpoint instead — computing an explicit inverse for solving linear systems is numerically inferior. Choose this endpoint when you genuinely need the inverse matrix itself, e.g. for repeated solves, transformations, or analytical purposes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T00:30:43.816Z","isFirstParty":false,"canonicalSlug":"linear-algebra-matrix-inverse-cc0fff4f"}