Understanding Transposes and Permutations: Why Rows and Columns Change Roles

A practical path through transpose and permutation matrices: why transpose is needed, how it connects rows and columns, why (AB)^T reverses order, why permutation matrices satisfy P^{-1}=P^T, and how left multiplication PA actually rearranges rows.

The First Question: Why Do We Need a Transpose?

When transpose is first introduced, the operation itself is easy:

\[A\rightarrow A^T.\]

Rows become columns and columns become rows.

But that immediately raises the more important question:

Why would we ever want to turn rows into columns in the first place?

Without answering that question, transpose can feel like an arbitrary rule.

Same Information, Different Orientation

Suppose a bakery has three products: Cake, Cookies and Bread. We record the flour and sugar required for each product:

\[A=\begin{bmatrix}2&1&3\\1&3&2\end{bmatrix}.\]

The rows represent ingredients and the columns represent products.

Thus the Cake information is already a column:

\[\begin{bmatrix}2\\1\end{bmatrix}.\]

But the same data could instead be organized with products as rows and ingredients as columns:

\[A^T=\begin{bmatrix}2&1\\1&3\\3&2\end{bmatrix}.\]

The underlying information has not changed. Its orientation has changed.

So one practical interpretation is:

\[\boxed{\text{Transpose changes how the same relationships are oriented.}}\]

Transpose and Vectors

The mathematical importance goes deeper than rearranging data.

Consider a column vector

\[v=\begin{bmatrix}2\\3\\4\end{bmatrix}.\]

Its transpose is the row vector

\[v^T=\begin{bmatrix}2&3&4\end{bmatrix}.\]

Now take another column vector

\[w=\begin{bmatrix}5\\6\\7\end{bmatrix}.\]

The matrix product

\[v^Tw\]

is valid because the dimensions are

\[(1\times3)(3\times1).\]

It gives

\[v^Tw=2(5)+3(6)+4(7)=56.\]

This is exactly the dot product:

\[\boxed{v^Tw=v\cdot w}.\]

Therefore transpose allows familiar geometric ideas such as dot products to be expressed naturally through matrix multiplication.

For example, perpendicular vectors satisfy

\[v^Tw=0.\]

Connection to Quantum Notation

This also connects to quantum computing. A quantum state is normally represented as a column vector:

\[|\psi\rangle=\begin{bmatrix}\alpha\\\beta\end{bmatrix}.\]

For complex vectors, the corresponding bra uses the conjugate transpose:

\[\langle\psi|=\begin{bmatrix}\alpha^*&\beta^*\end{bmatrix}.\]

Thus the familiar quantum expression

\[\langle\psi|\psi\rangle\]

is closely related to the real-vector expression \(v^Tv\), with complex conjugation added.

The Mechanical Rule

If \(A_{ij}\) means the entry in row \(i\), column \(j\), then transpose exchanges those indices:

\[\boxed{(A^T)_{ij}=A_{ji}}.\]

For example, an entry at position \((1,2)\) moves to position \((2,1)\).

If

\[A:m\times n,\]

then

\[\boxed{A^T:n\times m}.\]

Transpose as Reflection Across the Diagonal

For a square matrix, transpose can be visualized as reflecting the entries across the main diagonal.

For example,

\[A=\begin{bmatrix}1&2\\3&4\end{bmatrix}\]

becomes

\[A^T=\begin{bmatrix}1&3\\2&4\end{bmatrix}.\]

The diagonal entries remain fixed because their row and column indices are equal.

Symmetric Matrices

Sometimes reflection across the diagonal changes nothing.

For example,

\[S=\begin{bmatrix}2&5&1\\5&3&4\\1&4&7\end{bmatrix}.\]

Here

\[S^T=S.\]

Such a matrix is called symmetric:

\[\boxed{S^T=S}.\]

The entries on opposite sides of the diagonal match each other.

Transposing Twice

Transpose exchanges rows and columns. Doing it again reverses that exchange:

\[\boxed{(A^T)^T=A}.\]

The Strange Rule: Why Does Multiplication Reverse?

A particularly important transpose rule is

\[\boxed{(AB)^T=B^TA^T}.\]

The natural question is:

Why does the order reverse?

Matrix multiplication originally combines a row of \(A\) with a column of \(B\).

After transposing, that row of \(A\) becomes a column of \(A^T\), while that column of \(B\) becomes a row of \(B^T\).

But matrix multiplication still requires row first and column second.

Therefore the new row, coming from \(B^T\), must appear first, and the new column, coming from \(A^T\), must appear second:

\[\boxed{B^TA^T}.\]

A Numerical Check

Take

\[A=\begin{bmatrix}1&2\\3&4\end{bmatrix},\qquad B=\begin{bmatrix}5&6\\7&8\end{bmatrix}.\]

Then

\[AB=\begin{bmatrix}19&22\\43&50\end{bmatrix}\]

and therefore

\[(AB)^T=\begin{bmatrix}19&43\\22&50\end{bmatrix}.\]

Meanwhile,

\[B^TA^T=\begin{bmatrix}5&7\\6&8\end{bmatrix}\begin{bmatrix}1&3\\2&4\end{bmatrix}=\begin{bmatrix}19&43\\22&50\end{bmatrix}.\]

Thus

\[(AB)^T=B^TA^T.\]

For three matrices the same pattern continues:

\[(ABC)^T=C^TB^TA^T.\]

Permutation Matrices Return

Permutation matrices had already appeared during Gaussian elimination when a row exchange was required for pivoting.

For example,

\[P=\begin{bmatrix}0&1\\1&0\end{bmatrix}\]

exchanges two rows when it multiplies a matrix from the left.

Applying the same exchange twice restores the original order, so for this particular permutation

\[P^{-1}=P.\]

Also, this matrix happens to satisfy \(P^T=P\).

More generally, a permutation matrix does not necessarily equal its own inverse, but every permutation matrix satisfies

\[\boxed{P^{-1}=P^T}.\]

Why Does P Inverse Equal P Transpose?

A permutation matrix has exactly one \(1\) in every row and every column, with all remaining entries equal to zero.

Its columns are therefore rearrangements of the standard basis vectors. Each has length one, and different columns are perpendicular.

Consequently,

\[P^TP=I.\]

But the inverse is defined by

\[P^{-1}P=I.\]

Therefore

\[\boxed{P^{-1}=P^T}.\]

Connection Back to LU

With pivoting, our earlier LU relationship became

\[PA=LU.\]

Multiplying by \(P^{-1}\) gives

\[A=P^{-1}LU.\]

Since \(P^{-1}=P^T\),

\[\boxed{A=P^TLU}.\]

So transpose and permutation matrices connect directly back to the elimination and LU factorization developed earlier.

Question: What Is the Difference Between PA and AP?

This leads to another useful question:

If \(PA\) exchanges rows, what happens when the permutation matrix appears on the other side as \(AP\)?

The answer is:

\[\boxed{PA\rightarrow\text{rearranges rows}}\]

while

\[\boxed{AP\rightarrow\text{rearranges columns}.}\]

This follows directly from matrix multiplication rather than being a separate rule that must be memorized.

Watching PA Exchange Rows Step by Step

Take

\[A=\begin{bmatrix}1&2&3\\4&5&6\\7&8&9\end{bmatrix}\]

and

\[P=\begin{bmatrix}0&1&0\\1&0&0\\0&0&1\end{bmatrix}.\]

We want to calculate \(PA\) using ordinary row-by-column multiplication.

First Row of PA

The first row of \(P\) is

\[\begin{bmatrix}0&1&0\end{bmatrix}.\]

Multiply it by the first column of \(A\):

\[0(1)+1(4)+0(7)=4.\]

With the second column:

\[0(2)+1(5)+0(8)=5.\]

With the third:

\[0(3)+1(6)+0(9)=6.\]

Therefore the first row of \(PA\) is

\[\begin{bmatrix}4&5&6\end{bmatrix}.\]

This is exactly row 2 of \(A\).

The reason can also be written as

\[0R_1+1R_2+0R_3=R_2.\]

Second Row of PA

The second row of \(P\) is

\[\begin{bmatrix}1&0&0\end{bmatrix}.\]

The three entries produced are

\[1(1)+0(4)+0(7)=1,\]

\[1(2)+0(5)+0(8)=2,\]

\[1(3)+0(6)+0(9)=3.\]

So the second row becomes

\[\begin{bmatrix}1&2&3\end{bmatrix},\]

which is row 1 of \(A\).

Third Row of PA

The third row of \(P\) is

\[\begin{bmatrix}0&0&1\end{bmatrix}.\]

It selects row 3:

\[\begin{bmatrix}7&8&9\end{bmatrix}.\]

The Final Result

Therefore

\[\boxed{PA=\begin{bmatrix}4&5&6\\1&2&3\\7&8&9\end{bmatrix}}.\]

So rows 1 and 2 have exchanged places.

The Important Insight About Permutation Matrices

There is no special hidden operation occurring here. Ordinary matrix multiplication itself produces the row exchange.

The rows of \(P\) act as selectors:

\[\begin{bmatrix}0&1&0\end{bmatrix}A=R_2,\]

\[\begin{bmatrix}1&0&0\end{bmatrix}A=R_1,\]

\[\begin{bmatrix}0&0&1\end{bmatrix}A=R_3.\]

The special arrangement of zeros and ones causes the rows to be selected in a different order.

The Mental Picture So Far

The main ideas of this part of the study can now be connected:

\[\boxed{A^T:\text{ rows and columns exchange roles}}\]

\[\boxed{(AB)^T=B^TA^T}\]

\[\boxed{P^{-1}=P^T}\]

\[\boxed{PA:\text{ rearranges rows}}\]

\[\boxed{AP:\text{ rearranges columns}}\]

These are not isolated matrix tricks. They all arise from understanding how rows and columns participate in matrix multiplication.

Where the Study Continues

The next important question is how transpose interacts with matrices such as

\[A^TA\]

and why such matrices are automatically symmetric. This will connect transpose to deeper geometric ideas that appear later in linear algebra.


Note metadata

  • Note type: learning-note
  • Subject: learning-notes
  • Source: Introduction to Linear Algebra, Fifth Edition

Related notes