Skip to content

Main content

Matrix Transpose Shape Pair Tool

Return the transposed shape of a matrix from explicit nonnegative dimensions, including empty dimensions.

Loading tool…

Description

Require nonnegative integer rows and columns and swap them for transposedRows and transposedColumns.

A matrix shape specifies its row and column counts. Transposing a shape swaps those counts without inspecting entries; checking actual data dimensions is a separate operation.

Require nonnegative integer rows and columns and swap them for transposedRows and transposedColumns.

When to use this tool

Use Matrix Transpose Shape Pair when you need to transform a supplied matrix shape without manipulating matrix contents.

How to use the tool and how it works

  1. Enter rows, columns. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read transposedRows, transposedColumns. Use the output convention below.

Require nonnegative integer rows and columns and swap them for transposedRows and transposedColumns.1

Input fieldMeaning and unitsAccepted input
rowsRowsRequired. Safe integer; minimum 0.
columnsColumnsRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
transposedRowsTransposed RowsRequired. Safe integer.
transposedColumnsTransposed ColumnsRequired. Safe integer.
json
{
  "input": {
    "rows": 3,
    "columns": 5
  },
  "output": {
    "transposedRows": 5,
    "transposedColumns": 3
  }
}

Limitations and assumptions

  • Empty axes are accepted; no matrix data is validated, allocated, or transposed.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Validate the actual rows, columns, and data lengths when applying the shape to a real matrix.

References

  1. Calculation and input contract: matrix/matrix-transpose-shape-pair — tool.io

Similar or alternative tools