What it is
Matrix transposition turns the rows of a matrix into columns and the columns into rows; the matrix is "mirrored" across its main diagonal. Formally, the transposed matrix of a matrix A of size m×n is the matrix AT of size n×m defined as AT[i, j] = A[j, i].
Example
A 2×3 matrix becomes 3×2: the first row (1, 2, 3) becomes the first column, the second (4, 5, 6) the second.
| A | ||
|---|---|---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| AT | |
|---|---|
| 1 | 4 |
| 2 | 5 |
| 3 | 6 |
The main diagonal elements (a11 = 1, a22 = 5) stay in place.
Properties
- (AT)T = A — transposing twice returns the original.
- (A + B)T = AT + BT, (k·A)T = k·AT.
- (A·B)T = BT·AT — the order of factors reverses.
- det AT = det A for a square matrix.
- If AT = A the matrix is symmetric (covariance and distance matrices); if AT = A−1 it is orthogonal (rotation matrices).
- Transposition turns a row vector into a column vector and back.
Where it is used
- Least squares and regression — the coefficients come from the normal equations XT·X·β = XT·y. For points x = 1, 2, 3 the matrix X = {{1, 1}, {1, 2}, {1, 3}} gives XT·X = {{3, 6}, {6, 14}}.
- Statistics — covariance and correlation matrices (XT·X for centred data), the dot product of vectors as xT·y.
- Machine learning — backpropagation in neural networks uses transposed weight matrices.
- 3D graphics — the inverse of a rotation matrix is its transpose; normals are transformed by (M−1)T.
- Tables and data — swap the rows and columns of a report (like "Transpose" in Excel), reshape an array in code.
- Graphs — the transposed adjacency matrix of a directed graph is the graph with all edges reversed.
- Studying — check solutions involving BT·AT, symmetric and orthogonal matrices.
How to use
- Set the size of A with the add/remove row and column buttons and fill in the cells.
- Or enter the matrix as a string
{rows,cols,elements…}, e.g.{2,3,1,2,3,4,5,6}. - The transposed matrix B = AT, the entry Bi,j = Aj,i for every element and the link to the calculation update instantly.