Computing Library › Linear Algebra
Linear Algebra

The Transpose

Reflecting a matrix across its main diagonal turns rows into columns and reverses the order of products.

Definition

The transpose of a matrix A, written A^T, is formed by swapping rows and columns: the entry in row i, column j of A^T equals the entry in row j, column i of A. An m-by-n matrix becomes n-by-m. Transposing twice returns the original: (A^T)^T = A.

Algebraic rules

The reversal rule for products is the one most often misremembered. It follows directly from the definition and mirrors the reversal that appears when taking the inverse of a product.

Symmetry

A matrix equal to its own transpose, A = A^T, is symmetric; it must be square and its entries mirror across the diagonal. A matrix with A^T = -A is skew-symmetric and has zeros on its diagonal. Symmetric matrices have exceptionally clean structure: real eigenvalues and orthogonal eigenvectors, the content of the spectral theorem.

The transpose and inner products

The transpose is the discrete form of the adjoint. For real vectors, the dot product x . y equals x^T y. More generally, = , which says the transpose moves an operator from one side of an inner product to the other. This identity is the backbone of least-squares theory and of the normal equations.

python
import numpy as np
A = np.array([[1, 2, 3], [4, 5, 6]])
print(A.T)          # 3x2
S = A @ A.T         # always symmetric
print(np.allclose(S, S.T))  # True

Products of the form A^T A appear constantly: they are square, symmetric, and positive semidefinite, which is why they anchor least-squares fitting of experimental data against model predictions.