Linear Algebra

Matrix Transpose

The transpose of a matrix A, written Aᵀ, swaps its rows and columns: the entry in row i and column j of Aᵀ equals the entry in row j and column i of A. Enter your matrix and the calculator returns Aᵀ.

Matrix Transpose

Swap rows and columns to get Aᵀ.

Try:
Answer[[1, 4], [2, 5], [3, 6]]
  1. Matrix A2×3 [[1, 2, 3], [4, 5, 6]]
  2. RuleThe transpose Aᵀ swaps rows and columns: (Aᵀ)ᵢⱼ = Aⱼᵢ.
  3. Transpose Aᵀ3×2 [[1, 4], [2, 5], [3, 6]]

Rearrangement, not computation

Transposing a matrix reflects it across the diagonal running from its top-left corner. What was a row becomes a column and what was a column becomes a row, so a wide matrix turns tall and a tall one turns wide. No arithmetic is involved at all — every entry keeps its value and only changes address.

This calculator returns the transpose of a matrix of any shape, with the dimensions of both the input and the result reported.

The transpose is the one matrix operation that computes nothing. Its usefulness is entirely structural: it makes dimensions line up for a product that would otherwise be undefined, it converts a row vector into a column vector, and it turns a statement about rows into the corresponding statement about columns.

It is also how symmetry is defined. A matrix that equals its own transpose is symmetric, and symmetric matrices have properties — real eigenvalues, perpendicular eigenvectors — that no other class is guaranteed. Recognising one starts here.

How to use this calculator

  1. Enter the matrix Commas between entries, semicolons between rows. Any rectangular shape works, including a single row or a single column.
  2. Note the dimensions on both lines The input and the result are each reported with their size. The two numbers swap, which is the quickest confirmation the operation did what was intended.
  3. Read the result The first row of the original has become the first column of the answer, and so on across the matrix.

The formula, and where it comes from

(Aᵀ)ᵢⱼ = Aⱼᵢ (m×n)ᵀ = n×m (Aᵀ)ᵀ = A

The definition swaps the two indices, which is all the operation does. Entry values are untouched; only the position each occupies changes, and the change is a reflection across the main diagonal.

Entries already on that diagonal do not move, since their two indices are equal and swapping them changes nothing. That is why the diagonal of a matrix and of its transpose are identical, and why the trace is unaffected by transposing.

Doing it twice returns the original, because swapping two indices and swapping them again restores them. The transpose is therefore its own inverse as an operation, which no other matrix operation on this site can claim.

For products the transpose reverses the order of the factors: the transpose of a product equals the product of the transposes taken the other way round. That reversal is forced by the dimensions — after transposing, the shapes only chain together in the opposite order.

What each input means

A Matrix — form field “Matrix (rows separated by ;)”
Any rectangular matrix, entered row by row. Squareness is not required, and a single row or column is a valid input.
Aᵀ Transpose
The reflected matrix. Its row count is the original's column count and vice versa, with every entry preserved.

Worked examples

Every number below is produced by the same calculation engine the tool above runs. Nothing here is typed by hand, so the walkthrough cannot drift from what you get when you enter the same values yourself.

A wide matrix becoming tall

Transpose a 2×3 matrix. The shape change is the most visible thing the operation does.

Inputs Matrix (rows separated by ;) = 1, 2, 3; 4, 5, 6

  1. Matrix A 2×3 [[1, 2, 3], [4, 5, 6]]
  2. Rule The transpose Aᵀ swaps rows and columns: (Aᵀ)ᵢⱼ = Aⱼᵢ.
  3. Transpose Aᵀ 3×2 [[1, 4], [2, 5], [3, 6]]

Result [[1, 4], [2, 5], [3, 6]]

Two rows of three become three rows of two. The entry that was second in the first row is now first in the second row — its two indices have simply exchanged places.

Six entries go in and six come out, since nothing is created or discarded. Only their arrangement differs, which is why the operation is exact for any entries at all.

A square matrix that is not symmetric

Transpose the matrix with rows (1, 2) and (3, 4). The shape is unchanged, so the reflection is easier to see.

Inputs Matrix (rows separated by ;) = 1, 2; 3, 4

  1. Matrix A 2×2 [[1, 2], [3, 4]]
  2. Rule The transpose Aᵀ swaps rows and columns: (Aᵀ)ᵢⱼ = Aⱼᵢ.
  3. Transpose Aᵀ 2×2 [[1, 3], [2, 4]]

Result [[1, 3], [2, 4]]

The diagonal entries 1 and 4 stay where they are while 2 and 3 exchange places. The result differs from the original, so this matrix is not symmetric.

A square matrix and its transpose share a diagonal, a trace, a determinant and a rank. What they need not share is the matrix itself, and the off-diagonal entries are where the difference lives.

A column vector becoming a row

Transpose a single column of three entries. This is the case that arises constantly when writing vectors inline.

Inputs Matrix (rows separated by ;) = 1; 2; 3

  1. Matrix A 3×1 [[1], [2], [3]]
  2. Rule The transpose Aᵀ swaps rows and columns: (Aᵀ)ᵢⱼ = Aⱼᵢ.
  3. Transpose Aᵀ 1×3 [[1, 2, 3]]

Result [[1, 2, 3]]

A 3×1 matrix becomes 1×3. Vectors are conventionally columns, and the transpose is what lets one be written across the page without changing what it means.

The distinction matters for multiplication. A column times a row gives a 3×3 matrix, while a row times a column gives a single number — the dot product. Which one you get depends entirely on the transpose.

Reading the result

Dimensions swap, entries do not change

An m×n matrix transposes to n×m, and every value present before is present after. If any entry has changed magnitude or sign, something other than a transpose has been applied.

Symmetry is equality with the transpose

A matrix is symmetric when transposing leaves it unchanged, which requires it to be square and mirrored about the diagonal. When the transpose gives the negative of the original instead, the matrix is skew-symmetric and its diagonal must be all zeros.

What transposing preserves

The rank, the trace and the determinant all survive, which is why statements about rows carry over to columns. The matrix itself generally does not survive, so a transpose is not a cosmetic step in a calculation.

When you would use this

Making a product possible

Two matrices of the same shape cannot usually be multiplied, but transposing one makes the inner dimensions agree. That manoeuvre is behind the normal equations of least squares and much of the machinery built on them.

Switching between row and column conventions

Some formulas assume vectors are rows and others assume columns. The transpose reconciles the two without changing any of the data, which is usually all such a mismatch requires.

Assumptions and limitations

What this calculator assumes

  • The matrix may be any rectangular shape, including a single row or column.
  • Entries are copied exactly; no arithmetic is performed on them.
  • Rows are read left to right and become columns read top to bottom.
  • The result has the input's dimensions exchanged.

Where it stops being the right tool

  • No conjugate transpose, so complex matrices are not handled — the entries here are real and the two coincide.
  • One matrix at a time; the transpose of a product must be built from its factors.
  • Symmetry is not tested or reported, though it can be seen by comparing the two matrices.
  • No related rearrangements such as reversing rows or rotating the matrix.

Common mistakes

Reflecting across the wrong diagonal

Why it happens. Two diagonals are available and the anti-diagonal reflection looks equally plausible. It is a different operation, and it does not preserve the trace, the determinant or anything else.

How to avoid it. Fix the top-left entry in place. It never moves under a transpose, so if yours has migrated to another corner the wrong reflection was used.

Assuming a square matrix is unchanged

Why it happens. The shape stays the same, so it can look as though nothing happened — and for a symmetric matrix nothing does.

How to avoid it. Compare the off-diagonal entries. Only a genuinely symmetric matrix equals its own transpose, and most do not.

Keeping the order of factors when transposing a product

Why it happens. Most operations distribute across a product without disturbing the order, so reversing it feels like an extra rule rather than a necessity.

How to avoid it. Reverse the factors. The dimensions force it — after transposing, the shapes only chain in the opposite order.

Frequently asked questions

Does the matrix have to be square?

No. Any m×n matrix has a transpose, which is n×m. Squareness matters only when asking whether a matrix equals its own transpose, since that comparison requires both to have the same shape.

What is the transpose of a transpose?

The original matrix. Swapping the two indices and then swapping them back restores every entry to where it started, so the operation undoes itself exactly.

When is a matrix symmetric?

When it equals its own transpose, which requires it to be square with entries mirrored across the main diagonal. Symmetric matrices are guaranteed real eigenvalues and mutually perpendicular eigenvectors, which is why the property is worth checking.

Does transposing change the determinant or the rank?

Neither. Both are unchanged, along with the trace and the diagonal. That invariance is why any theorem about the rows of a matrix has an immediate counterpart about its columns.