# Matrix Linear System Solver (Ax=b)

> Matrix Linear System Solver (Ax=b) is a paid API for AI agents from matrix.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-15).

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.

## Facts

- Endpoint: POST https://matrix.openverbs.com/v1/solve
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/matrix-linear-system-solver-ax-b-8a18f58f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VDeRGE8o7qDbOCBrFL3I6

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability matrix-linear-system-solver-ax-b-8a18f58f -d '<json body>'
```

Example prompt: 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]?

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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 }.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/matrix-linear-system-solver-ax-b-8a18f58f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from matrix.openverbs.com](https://www.zero.xyz/host/matrix.openverbs.com/llms.txt)
