The matrix dimensions endpoints let you programmatically inspect the size of a matrix. There are four endpoints in this group: a combined endpoint that accepts aDocumentation Index
Fetch the complete documentation index at: https://docsa.stemfard.com/llms.txt
Use this file to discover all available pages before exploring further.
type parameter to select the specific query, and three individual endpoints — nrows, ncols, and shape. All endpoints accept a single input matrix a and the full set of common request parameters.
Consider the following sample matrix used throughout the examples on this page:
Combined endpoint
Use this endpoint to query any dimension property by setting thetype field.
POST /api/v1/mathematics/linear-algebra/matrix-operations/matrix-dimensions
Parameters
The input matrix, expressed as an array of row arrays.
The dimension property to compute. Accepted values:
"all"— compute and return all dimension properties"nrows"— number of rows"ncols"— number of columns"shape"— both dimensions as a(rows, cols)tuple
Name assigned to the computed result in the response.
Response verbosity:
"lite", "standard", or "detailed".Include background theory alongside solution steps.
Format for step content:
"html", "latex", or "speech".Decimal precision for rounding. Pass
null for full precision.Apply
decimals rounding to intermediate step values.Include normalized request parameters in the response.
Include curated learning resource links in the response.
Include links to related Stemfard endpoints in the response.
Include a description of the result object’s properties.
Example — query all dimension properties
200
Individual dimension endpoints
Each dimension query has its own focused endpoint. These do not accept atype field — the query is determined by the path.
POST .../matrix-dimensions/nrows — number of rows
POST .../matrix-dimensions/nrows — number of rows
Returns the number of rows in the input matrix.Example
POST /api/v1/mathematics/linear-algebra/matrix-operations/matrix-dimensions/nrowsThe input matrix.
Name for the result in the response.
Response verbosity:
"lite", "standard", or "detailed".Decimal precision for rounding.
200
POST .../matrix-dimensions/ncols — number of columns
POST .../matrix-dimensions/ncols — number of columns
Returns the number of columns in the input matrix.Example
POST /api/v1/mathematics/linear-algebra/matrix-operations/matrix-dimensions/ncolsThe input matrix.
Name for the result in the response.
Response verbosity:
"lite", "standard", or "detailed".Decimal precision for rounding.
200
POST .../matrix-dimensions/shape — rows and columns
POST .../matrix-dimensions/shape — rows and columns
Returns both dimensions as a ExampleThe response value is an array where the first element is the number of rows and the second element is the number of columns.
(rows, cols) tuple. This is equivalent to querying nrows and ncols in a single request.POST /api/v1/mathematics/linear-algebra/matrix-operations/matrix-dimensions/shapeThe input matrix.
Name for the result in the response.
Response verbosity:
"lite", "standard", or "detailed".Decimal precision for rounding.
200