# Composition of linear transformation with nonsquare matrices.

Suppose we have two transformations $$L$$ and $$T$$. The associated matrices are $$A_{5 \times 8}$$ and $$B_{8 \times 5}$$ respectively.

I'm asked whether the matrices $$AB$$ and $$BA$$ are defined and are invertible.

My intuition is:

Both are defined ($$AB_{5 \times 5}$$ and $$BA_{8 \times 8}$$) but neither is invertible. $$AB$$ and $$BA$$ represent the composition of $$T$$ and $$L$$ and $$L$$ and $$T$$ respectively.

$$T$$ is not injective and $$L$$ is not surjective, therefore neither is a bijection and their composition is not a bijection. A matrix is only invertible if the associated linear transformation is a bijection and so neither of those 2 matrices is invertible.

Is my intuition correct?

I would invite you to consider the smaller $$2 \times 1$$ case:

\begin{align*} \mathbf A &= \begin{pmatrix} 1 & 0 \end{pmatrix} \\ \mathbf B &= \begin{pmatrix} 1 \\ 0 \end{pmatrix} \end{align*}

Do you agree that the map represented by $$\mathbf A \mathbf B$$ from $$\mathbb R \to \mathbb R$$ is bijective?

• Thank you for the answer! So to make sure I understand correctly, that map is clearly bijective, it just takes any number in $\mathbb{R}$ and outputs the same number. Is it fair to say then that the composition of an injection and then a surjection could be a bijection? $BA$ in your example would not be bijective and it's basically a projection of $\mathbb{R}^2$ into $\mathbb{R}$? Nov 26, 2019 at 19:19
• Yes, a composition of an injective non-surjective function and a surjective non-injective function can be bijective, basically because the codomain of the composition is not the same as the codomain of the first function, so the non-surjectivity isn't a "dealbreaker". You would be right in saying that $\mathbf B \mathbf A$ certainly isn't bijective (from $\mathbb R^2 \to \mathbb R^2$) in my example. Nov 26, 2019 at 19:27
• Understood, that was a great example. Thank you! Nov 26, 2019 at 19:28
• You're welcome : ) Nov 26, 2019 at 19:28
• What a lovely example of a civil, friendly, exchange of ideas <3 Nov 26, 2019 at 21:20

First of all, matrix multiplications $$A_{m\times n}B_{n\times m}$$ are always defined.

As for the invertibility,

• $$B_{8\times 5}A_{5\times 8}$$ is an $$8\times 8$$ matrix of rank at most 5, therefore it is definitely NOT invertible.
• $$A_{5\times 8}B_{8\times 5}$$ may have full rank, and consequently may be invertible. You can construct examples and counter-examples by playing with the identity matrix and the row-reversed identity matrix.