Matrix vector multiply

matrix-vector-multiply · version 1.0.0 · Vectors & matrices · free, no key needed

Multiply an MxN finite-number matrix by a length-N finite-number vector, producing a length-M vector.

Use when you need to: matrix-vector multiplication · apply a matrix to a vector · linear transformation.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "matrix": [
    [
      1,
      2
    ],
    [
      3,
      4
    ]
  ],
  "vector": [
    5,
    6
  ]
}

Response:

{
  "result": {
    "result": [
      17,
      39
    ]
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "matrix-vector-multiply",
  "version": "1.0.0",
  "input": {
    "matrix": [
      [
        1,
        2
      ],
      [
        3,
        4
      ]
    ],
    "vector": [
      5,
      6
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/matrix-vector-multiply/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"matrix":[[1,2],[3,4]],"vector":[5,6]}'

The machine-readable contract is at /v1/tools/matrix-vector-multiply/versions/1.0.0.

CLI

node cli.mjs run matrix-vector-multiply 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.