Linear Algebra
Intermediate

Matrix Transpose

Reflects a matrix across its main diagonal.

Formula

(AT)ij=aji(A^T)_{ij} = a_{ji}

Variables

AMatrix

Example

The transpose of [[1,2,3],[4,5,6]] is [[1,4],[2,5],[3,6]].

How it works

The transpose of a matrix is formed by swapping each entry’s row and column position: the element in row i, column j becomes the element in row j, column i. This works because a matrix can be viewed as a grid of coordinates, and transposing simply exchanges those two directions without changing the actual values. The result always flips an m×n matrix into an n×m matrix, so rows become columns and columns become rows.

When to use it

Use the transpose when you need to turn row data into column data, or vice versa, such as in vector and dot-product calculations. It also appears often in linear transformations, symmetry checks, and matrix formulas involving systems of equations or least squares.

Worked example, step by step

Let A = [[2, -1, 4], [0, 3, 5]]. A has 2 rows and 3 columns, so A^T will have 3 rows and 2 columns. Move the entry in row 1, column 1: 2 → row 1, column 1 of A^T. Move the entry in row 1, column 2: -1 → row 2, column 1 of A^T. Move the entry in row 1, column 3: 4 → row 3, column 1 of A^T. Move the entry in row 2, column 1: 0 → row 1, column 2 of A^T. Move the entry in row 2, column 2: 3 → row 2, column 2 of A^T. Move the entry in row 2, column 3: 5 → row 3, column 2 of A^T. So, A^T = [[2, 0], [-1, 3], [4, 5]].

Common mistakes to avoid

  • Only reversing the order of rows instead of swapping rows with columns
  • Forgetting that the transpose changes the matrix dimensions from m×n to n×m
  • Mixing up the indices and writing aij again instead of aji

Did You Know?

Transposing flips a matrix over its diagonal — turning rows into columns.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026