StatLect
Index > Matrix algebra

Matrix product and rank

This lecture discusses some facts about matrix products and their rank. In particular, we analyze under what conditions the rank of the matrices being multiplied is preserved.

Table of Contents

Bound on the rank of a product

The next proposition provides a bound on the rank of a product of two matrices.

Proposition Let A be a $K	imes L$ matrix and $B$ an $L	imes M$ matrix. Then,[eq1]

Proof

The space spanned by the columns of $AB$ is the space $S$ of all vectors $s$ that can be written as linear combinations of the columns of $AB$:[eq2]where $v$ is the $M	imes 1$ vector of coefficients of the linear combination. We can also write[eq3]where $Bv$ is an $L	imes 1$ vector (being a product of an $L	imes M$ matrix and an $M	imes 1$ vector). Thus, any vector $sin S$ can be written as a linear combination of the columns of A, with coefficients taken from the vector $Bv$. As a consequence, the space $S$ is no larger than the span of the columns of A, whose dimension is [eq4]. This implies that the dimension of $S$ is less than or equal to [eq5]. Since the dimension of $S$ is the rank of $AB$, we have[eq6]Now, the space spanned by the rows of $AB$ is the space $T$ of all vectors $t$ that can be written as linear combinations of the rows of $AB$:[eq7]where $u$ is the $1	imes K$ vector of coefficients of the linear combination. We can also write[eq8]where $uA$ is a $1	imes L$ vector (being a product of a $1	imes K$ vector and a $K	imes L$ matrix). Thus, any vector $tin T$ can be written as a linear combination of the rows of $B$, with coefficients taken from the vector $uA$. As a consequence, the space $T$ is no larger than the span of the rows of $B$, whose dimension is [eq9]. This implies that the dimension of $T$ is less than or equal to [eq10]. Since the dimension of $T$ is the rank of $AB$, we have[eq11]The two inequalities[eq12]are satisfied if and only if[eq13]

Multiplication by a full-rank square matrix preserves rank

Another important fact is that the rank of a matrix does not change when we multiply it by a full-rank matrix.

Proposition Let A be a $K	imes L$ matrix and $B$ a square $L	imes L$ matrix. If $B$ is full-rank, then[eq14]

Proof

Remember that the rank of a matrix is the dimension of the linear space spanned by its columns (or rows). We are going to prove that the ranks of A and $AB$ are equal because the spaces generated by their columns coincide. Denote by $S$ the space generated by the columns of A. Any vector $sin S$ can be written as a linear combination of the columns of A:[eq15]where $v$ is the $L	imes 1$ vector of coefficients of the linear combination. Since $B$ is full-rank and square, it has $L$ linearly independent columns that span the space of all $L	imes 1$ vectors (they are equivalent to the canonical basis). Therefore, there exists an $L	imes 1$ vector $u$ such that[eq16]Thus[eq17]We have just proved that any vector $sin S$ can be written as a linear combination of the columns of $AB$. Furthermore, the columns of $AB$ do not generate any vector $s
otin S$. To see this, note that for any vector of coefficients $u$, if [eq18]then[eq19]so that $sin S$. Thus, we have proved that the space spanned by the columns of A and that spanned by the columns of $AB$ coincide. As a consequence, also their dimensions (which by definition are equal to the ranks of A and $B$) coincide.

Proposition Let A be a $K	imes L$ matrix and $B$ a square $K	imes K$ matrix. If $B$ is full-rank, then[eq20]

Proof

The proof of this proposition is almost identical to that of the previous proposition. It is left as an exercise (see the exercise below with its solution).

The product of two full-rank square matrices is full-rank

An immediate corollary of the previous two propositions is that the product of two full-rank square matrices is full-rank.

Proposition Let A and $B$ be two $K	imes K$ full-rank matrices. Then, their products $AB$ and $BA$ are full-rank.

Proof

Being full-rank, both matrices have rank K. Therefore, by the previous two propositions[eq21]But $AB$ and $BA$ are $K	imes K$, so thy are full-rank.

Solved exercises

Below you can find some exercises with explained solutions.

Exercise 1

Let A be a $K	imes L$ matrix and $B$ a full-rank $K	imes K$ matrix. Prove that if $B$ is full-rank, then[eq22]

Solution

Keep in mind that the rank of a matrix is the dimension of the space generated by its rows. We are going to prove that the spaces generated by the rows of A and $BA$ coincide, so that they trivially have the same dimension, and the ranks of the two matrices are equal. Denote by $S$ the space spanned by the rows of A. Any $sin S$ is a linear combination of the rows of A:[eq23]where $v$ is the $1	imes K$ vector of coefficients of the linear combination. Since $B$ is full-rank, it has K linearly independent rows that span the space of all $1	imes K$ vectors. As a consequence, there exists a $1	imes K$ vector $u$ such that[eq24]Thus[eq25]This means that any $sin S$ is a linear combination of the rows of $BA$. Moreover, the rows of $BA$ do not generate any vector $s
otin S$: for any vector of coefficients $u$, if [eq26]then[eq27]so that $sin S$. Thus, the space spanned by the rows of A and that spanned by the rows of $AB$ coincide. As a consequence, also their dimensions coincide.

The book

Most of the learning materials found on this website are now available in a traditional textbook format.