{"uid":"cap_VDeRGE8o7qDbOCBrFL3I6","slug":"matrix-linear-system-solver-ax-b-8a18f58f","name":"Matrix Linear System Solver (Ax=b)","description":"Solve the linear system A·x = b for a square coefficient matrix A and vector b via Gaussian elimination with partial pivoting. A non-square A or a b of the wrong length is a clean 400. A singular system is NOT an error — it returns a successful { solvable:false, solution:null }.","url":"https://matrix.openverbs.com/v1/solve","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["a","b"],"properties":{"a":{"type":"array","items":{"type":"array","items":{"type":"number"},"minItems":1},"minItems":1,"description":"Square coefficient matrix (n×n)."},"b":{"type":"array","items":{"type":"number"},"minItems":1,"description":"Right-hand-side vector (length n)."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_GEf4r7DtLiMPCX1Se2nGy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Solves a square linear system A·x = b using Gaussian elimination with partial pivoting, returning the solution vector or a solvable:false flag for singular systems.","exampleAgentPrompt":"Can you solve the linear system where the coefficient matrix A is [[2,1,-1],[−3,−1,2],[−2,1,2]] and the right-hand side vector b is [8,−11,−3]?","exampleUseCases":[{"title":"Structural engineering load distribution","prompt":"I need to find the force distribution in a 4-member truss — the stiffness matrix A is [[10,−2,0,0],[−2,8,−3,0],[0,−3,9,−4],[0,0,−4,6]] and the load vector b is [100,0,50,0]. Can you solve it?"},{"title":"Check if underdetermined system is singular","prompt":"I have a 3×3 coefficient matrix A = [[1,2,3],[4,5,6],[7,8,9]] and b = [6,15,24]. Is this system actually solvable or is the matrix singular?"},{"title":"Economics input-output model equilibrium","prompt":"I'm modeling an input-output economy with technology matrix A = [[0.1,0.3],[0.4,0.2]] and demand vector b = [50,30]. Solve for the production levels x."}],"resultDescription":"Returns a JSON object with a boolean 'solvable' field and a 'solution' field containing the solution vector x (array of floats) if solvable, or null if the system is singular. Non-square A or mismatched b length returns a 400 error.","failureModes":["400 if matrix A is not square","400 if length of b does not match the dimension of A","400 if the matrix is ragged (rows of unequal length)","400 if A or b are empty","Singular system returns {solvable:false, solution:null} rather than an error","Floating-point precision issues for near-singular systems may affect accuracy"],"whenToPreferThis":"Use this endpoint when you need to numerically solve a square linear system Ax=b and want clean handling of singular systems (returns solvable:false rather than throwing). Prefer this over matrix inversion when you only need the solution vector x, not the inverse of A itself. Best for well-defined square systems; does not support least-squares or overdetermined systems.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:31:38.430Z","isFirstParty":false}