# Vector cross

`vector-cross` · version 1.0.0 · Vectors & matrices · free, no key needed

Compute the 3-dimensional cross product of two finite-number vectors.

**Use when you need to: vector cross product · 3d cross product · vector product.**

## Supported

- vector cross product
- 3d cross product
- vector product

## Not supported

- vectors of dimension other than 3
- 7-dimensional cross product
- arbitrary-precision arithmetic

## Behavior

- Inputs a and b are each arrays of exactly 3 finite JSON numbers, magnitude bounded to at most 1000000.
- The result is the standard right-handed cross product: [a1*b2-a2*b1, a2*b0-a0*b2, a0*b1-a1*b0] using zero-based indices.
- Computed with IEEE-754 double-precision arithmetic; a result entry of -0 is normalized to 0.
- Only 3-dimensional vectors are supported; there is no 2D or 7D variant.

## Input

- `a` (array of number, required): min items 3; max items 3
- `b` (array of number, required): min items 3; max items 3

## Output

- `result` (array of number, required): min items 3; max items 3

## Limits

- dim: 3
- max abs value: 1000000

## Example

Request input:

```json
{
  "a": [
    1,
    0,
    0
  ],
  "b": [
    0,
    1,
    0
  ]
}
```

Response:

```json
{
  "result": {
    "result": [
      0,
      0,
      1
    ]
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "vector-cross",
  "version": "1.0.0",
  "input": {
    "a": [
      1,
      0,
      0
    ],
    "b": [
      0,
      1,
      0
    ]
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/vector-cross/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"a":[1,0,0],"b":[0,1,0]}'
```

The machine-readable contract is at [/v1/tools/vector-cross/versions/1.0.0](/v1/tools/vector-cross/versions/1.0.0).

### CLI

```sh
node cli.mjs run vector-cross 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Vector dot](/tools/vector-dot): Compute the dot (scalar) product of two equal-length finite-number vectors.
- [Vector hadamard](/tools/vector-hadamard): Multiply two equal-length finite-number vectors elementwise (Hadamard product).
- [Vector outer product](/tools/vector-outer-product): Compute the outer product of two finite-number vectors, producing a matrix.
- [Matrix hadamard](/tools/matrix-hadamard): Multiply two equal-shape finite-number matrices elementwise (Hadamard product).
- [Matrix multiply](/tools/matrix-multiply): Multiply an MxK finite-number matrix by a KxN finite-number matrix, producing an MxN matrix.
- [Matrix vector multiply](/tools/matrix-vector-multiply): Multiply an MxN finite-number matrix by a length-N finite-number vector, producing a length-M vector.
