{"uid":"cap_NTNqHqzLSz0yRcEiAMQG-","slug":"linear-algebra-vector-operations-6f685221","name":"Linear Algebra Vector Operations","description":"Vector dot, cross, norm, angle, projection, unit vector and distance for vectors of up to 100 entries.","url":"https://linear-algebra.x402tookit.com/vector-ops?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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"}}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_heBaxnq9nOQVwzFZVlAIe","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes vector operations (dot product, cross product, norm, angle, projection, unit vector, distance) for vectors up to 100 entries","exampleAgentPrompt":"What's the angle between vectors [1, 2, 3] and [4, 5, 6]? Use the vector ops service with op=angle.","exampleUseCases":[{"title":"3D physics collision angle check","prompt":"I need the angle between vectors [0, 1, 0] and [1, 1, 0] — can you calculate that for me?"},{"title":"Normalize embedding for similarity search","prompt":"Take the vector [3, 1, 4, 1, 5, 9, 2, 6] and return a unit vector pointing in the same direction."},{"title":"Projection for shadow/lighting calculation","prompt":"Project the vector [2, 3, 1] onto [1, 0, 0] so I can find its component along the x-axis."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T00:35:45.152Z","isFirstParty":false,"canonicalSlug":"linear-algebra-vector-operations-6f685221"}