A guide to the Stemfard matrix operation endpoints
Learn how to perform matrix arithmetic, element-wise operations, dimension queries, and statistical analysis using the Stemfard linear algebra endpoints.
Use this file to discover all available pages before exploring further.
The Stemfard API gives you a complete set of matrix operation endpoints under the /api/v1/mathematics/linear-algebra/matrix-operations path. This guide walks through every available category — arithmetic, element-wise operations, dimension queries, and statistics — and shows you concrete request and response examples so you can integrate them into your application quickly.
All endpoints accept an api_level parameter ("lite", "standard", or "detailed") that controls how much solution detail the API returns alongside your result. See API levels for a full breakdown.
Use the arithmetic endpoints to add, subtract, or multiply matrices. You can call the unified endpoint with an operation field, or use a dedicated sub-path for clarity.Supported operation values:"add", "subtract", "multiply-ew", "divide-ew", "raise-ew", "matmul", "all"
Element-wise operations apply a function independently to each corresponding pair of elements across two matrices of the same shape. The matrices must have identical dimensions; no broadcasting is applied.
Endpoint suffix
Operation
Description
/multiply-ew
a[i][j] * b[i][j]
Multiply each element by its counterpart
/divide-ew
a[i][j] / b[i][j]
Divide each element by its counterpart
/raise-ew
a[i][j] ^ b[i][j]
Raise each element to the power of its counterpart
The dimension endpoints let you inspect the shape of any matrix without performing a computation. This is useful for validating input before passing matrices to arithmetic or statistics endpoints.
The statistics endpoints compute descriptive statistics across rows, columns, or the entire matrix. You can call the unified /matrix-statistics endpoint, or use a dedicated path for the specific statistic you need.Available statistics: row-min, col-min, mat-min, row-max, col-max, mat-max, row-sum, col-sum, mat-sum, row-mean, col-mean, mat-mean, row-median, col-median, mat-median, row-var, col-var, mat-var, row-std, col-std, mat-std