{"uid":"cap_oWsNm9m2PFHU4ZnU5GVxh","slug":"linear-algebra-matrix-multiplication-1c59e799","name":"Linear Algebra Matrix Multiplication","description":"Multiply two matrices (up to 10x10) given as JSON, with shape check and the product matrix.","url":"https://linear-algebra.x402tookit.com/matrix-multiply?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":["A","B"],"properties":{"A":{"type":"string","description":"Left matrix, JSON like [[1,2],[3,4]] or 1,2;3,4 (max 10x10)"},"B":{"type":"string","description":"Right matrix, same formats; rows of B must equal columns of A"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"shape":{"type":["array","null"],"items":{"type":"number"}},"source":{"type":["null","string"]},"square":{"type":["boolean","null"]},"product":{"type":["array","null"],"items":{"type":"array","items":{"type":"number"}}},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"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_Yzz--Us809oMzqt8s_yI0","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":"Multiplies two matrices (up to 10x10) provided as JSON arrays, returning the product matrix along with shape information and validity checks.","exampleAgentPrompt":"Can you multiply matrix A = [[1,2,3],[4,5,6]] by matrix B = [[7,8],[9,10],[11,12]] and give me the resulting product matrix?","exampleUseCases":[{"title":"Graphics transformation pipeline","prompt":"I need to multiply the rotation matrix [[0,-1],[1,0]] by the scaling matrix [[2,0],[0,2]] to get the combined 2D transformation — what's the product?"},{"title":"Neural network weight propagation check","prompt":"Can you compute the matrix product of A = [[0.5,0.2],[0.1,0.8],[0.3,0.4]] and B = [[1,0,1],[0,1,0]] and tell me the shape of the result so I can verify my layer dimensions?"},{"title":"Physics simulation matrix chaining","prompt":"Multiply these two 3x3 matrices for me: A = [[1,0,0],[0,1,0],[0,0,1]] and B = [[2,3,1],[4,0,2],[1,5,3]] — I need the product to chain my physics transformations."}],"resultDescription":"Returns the product matrix as a 2D JSON array, along with the output shape (rows x cols), a boolean indicating whether the result is square, a human-readable summary, reasons for any validation failures, and metadata fields like asOf and source.","failureModes":["Incompatible dimensions: columns of A do not equal rows of B — returns reasons array explaining the mismatch","Matrix exceeds 10x10 limit — returns an error or validation failure","Malformed JSON input for A or B — request fails to parse","Non-numeric values in matrix entries — computation cannot proceed"],"whenToPreferThis":"Choose this endpoint when you need a fast, validated matrix multiplication of two matrices up to 10x10, especially when you want shape-checking and a human-readable summary alongside the numeric result. It is ideal for agentic workflows that need to verify dimensional compatibility before downstream use. Prefer this over a general-purpose code interpreter when you want a lightweight, pay-per-call computation without spinning up a full runtime.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:13:43.174Z","isFirstParty":false,"canonicalSlug":"linear-algebra-matrix-multiplication-1c59e799"}