# agent402.tools Matrix Multiply

> agent402.tools Matrix Multiply is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Performs standard 2D matrix multiplication (A[m×k] × B[k×n] → C[m×n]) with dimension validation and a cap of 100 per dimension.

## Facts

- Endpoint: POST https://agent402.tools/api/matrix-multiply
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-matrix-multiply-e967fb24
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RQoeuMTSp3mS-CCXdg_UW

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 agent402-tools-matrix-multiply-e967fb24 -d '<json body>'
```

Example prompt: Can you multiply matrix A = [[1,2,3],[4,5,6]] by matrix B = [[7,8],[9,10],[11,12]] and give me the result matrix?

## When to prefer this

Use this endpoint when you need a simple, validated, pay-per-call matrix multiplication service without setting up your own compute environment. Ideal for agents that occasionally need matrix math without a full numerical library, or for verifying correctness of matrix products. Best for matrices up to 100×100.

## Known failure modes

- Inner dimensions do not match (e.g. A is m×k1 and B is k2×n where k1≠k2) — returns validation error
- Matrix dimension exceeds 100 — returns error indicating dimension cap exceeded
- Non-numeric values in matrix arrays — returns validation/parsing error
- Non-2D arrays provided — returns schema validation error
- Missing 'a' or 'b' fields — returns bad request error

## How this service works

Standard matrix multiplication of two 2D arrays: A[m×k] × B[k×n] → C[m×n]. Validates that inner dimensions match. Each dimension is capped at 100.

## Output

Returns the resulting matrix C with dimensions m×n, where each element is the dot product of the corresponding row of A and column of B. Inner dimensions must match (k) and each dimension is capped at 100.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {
   "type": "array",
   "description": "First matrix (2D array of numbers)"
  },
  "b": {
   "type": "array",
   "description": "Second matrix (2D array of numbers)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": [
   [
    19,
    22
   ],
   [
    43,
    50
   ]
  ],
  "dimensions": {
   "k": 2,
   "m": 2,
   "n": 2
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-matrix-multiply-e967fb24/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
