# Kernel of linear transformation composition

I have matrices A and B of linear transformation. Both have dimension 8x8. I know that dim(Ker(A)) = 2 and dim(Ker(B)) = 1. What are the possible dim(Ker(AB))?

• The range of $B$ is 7-dimensional. Its intersection with the kernel of $A$ could be 2-dimensional, or 1-dimensional. Verify these statements, and then consider the implications for your question. Sep 2, 2014 at 11:02

A vector $v \in \mathbb{F}^n$ (here, $n = 8$) is in $\ker(AB)$ if and only if $(AB)v = A(Bv) = 0$. That is, $v \in \ker(AB)$ if and only if $Bv \in \ker(A)$. We have three options:
1. $\mathrm{im}(B) \cap \ker(A) = \{ 0 \}$. This is not possible as $\dim \mathrm{im}(B) = 7$ while $\dim \ker(A) = 2$.
2. $\mathrm{im}(B) \cap \ker(A)$ is one dimensional. That is, $\mathrm{im}(B) \cap \ker(A) = \mathrm{span}(w_0)$ for $w_0 \neq 0$. Choose some $v_0 \in V$ so that $Bv_0 = w_0 \in \ker(A)$. Then, the collection of all solutions to the equation $Bv = w_0$ is given by the affine line $v_0 + \ker(B)$. The space of all solutions to the equation $Bv = \lambda w_0$ for some $\lambda \in \mathbb{F}$ is given by the affine line $\lambda v_0 + \ker(B)$. Thus, $\ker(AB) = \mathrm{span}(v_0) + \ker(B)$. This space is two dimensional as $\ker(B) \cap \mathrm{span}(v_0) = \{ 0 \}$ ($Bv_0 = w_0 \neq 0$) so $\dim( \ker(AB)) = 2$.
3. $\mathrm{im}(B) \cap \ker(A)$ is two dimensional. That is, $\mathrm{im}(B) \cap \ker(A) = \mathrm{span}(w_0, w_1)$ for $w_0, w_1 \in V$ linearly independent. Then, similarly to the situation before, if we choose some $v_i \in V$ such that $Bv_i = w_i$ then $\ker(AB) = \mathrm{span}(v_0, v_1) + \ker(B)$ which is three dimensional (as $w_0, w_1$ are linearly independent).
Note that this analysis reminds one of the proofs for the rank-nullity theorem. In the end, $2 \leq \dim \ker(AB) \leq 3$.
This analysis is useful if you want to explicitly construct examples in which $\dim \ker(AB) = 2,3$. Alternatively, you can use inequalities about the rank of the product of matrices. Using $\mathrm{rank}(AB) \leq \min(\mathrm{rank}A, \mathrm{rank}B)$ you see that $\mathrm{rank}(AB) \leq \min(6, 7) = 6$ and so $\dim \ker(AB) \geq 2$. On the other hand, using $\mathrm{rank}(A) + \mathrm{rank}(B) - n \leq \mathrm{rank}(AB)$ you see that $5 \leq \mathrm{rank}(AB)$ and then $\dim \ker(AB) \leq 3$. Then you can construct examples that show that both cases are possible.
You have the situation where $U \stackrel{A}{\rightarrow}V\stackrel{B}{\rightarrow}W$ and $U=V=W=\mathbb{R}^8$ if you consider matrices to work on columns. The kernel of AB is the reverse image by $AB$ of $0 \in W$ into the space $U$. This equals the reverse image of ker$(B)\subseteq V$ into $U$ by the map $A$. Now the reverse image of a subspace $X$ of $V$ of dimension $m$ is the dimension of the intersection $Y$ of $X$ with im(A) augmented with the dimension of kef($A$). In our case $m$ = 1 and dim(im($A$))$=8-2=6$ so dim($Y$) = 0 or 1, whether ker($B$) lies in im($A$) or not, so the answer to your question is $0+2$ or $1+2$;