# Linear Algebra Vector Operations

> Linear Algebra Vector Operations is a paid API for AI agents from linear-algebra.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Computes vector operations (dot product, cross product, norm, angle, projection, unit vector, distance) for vectors up to 100 entries

## Facts

- Endpoint: GET https://linear-algebra.x402tookit.com/vector-ops?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/linear-algebra-vector-operations-6f685221
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NTNqHqzLSz0yRcEiAMQG-

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 linear-algebra-vector-operations-6f685221
```

Example prompt: What's the angle between vectors [1, 2, 3] and [4, 5, 6]? Use the vector ops service with op=angle.

## When to prefer this

Choose this endpoint when you need fast, reliable vector arithmetic (dot product, cross product, norm, angle, projection, unit vector, or distance) for vectors up to 100 dimensions. It is ideal for AI/ML workflows needing embedding normalization, physics simulations, geometry calculations, or any numeric vector computation without spinning up a local math library. Prefer it over general-purpose code execution when you want a deterministic, low-latency single-call computation billed per use.

## Known failure modes

- Missing required vector 'a' parameter returns an error
- Operations requiring 'b' (dot, cross, angle, projection, distance) return an error if 'b' is omitted
- Cross product only valid for 3D vectors — other dimensions return an error
- Vectors of mismatched lengths return a shape error
- Vectors exceeding 100 entries are rejected
- Invalid op value returns an unrecognized operation error
- Malformed JSON in vector strings returns a parse error

## How this service works

Vector dot, cross, norm, angle, projection, unit vector and distance for vectors of up to 100 entries.

## Output

Returns a JSON object containing the operation name, a scalar magnitude or numeric result where applicable, an array result for vector-valued operations (e.g. cross product, projection, unit vector), the dimension of the input vectors, a parallel flag for relevant ops, and optional disclaimer or summary fields.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "op",
      "a"
     ],
     "properties": {
      "a": {
       "type": "string",
       "description": "First vector, JSON like [1,2,3] or 1,2,3"
      },
      "b": {
       "type": "string",
       "description": "Second vector, same length; required for every op except norm and unit"
      },
      "op": {
       "type": "string",
       "description": "One of dot, cross, norm, angle, projection, unit, distance"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "op": {
       "type": [
        "null",
        "string"
       ]
      },
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "result": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "number"
       }
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "parallel": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "dimension": {
       "type": [
        "null",
        "number"
       ]
      },
      "magnitude": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/linear-algebra-vector-operations-6f685221/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from linear-algebra.x402tookit.com](https://www.zero.xyz/host/linear-algebra.x402tookit.com/llms.txt)
