==== Proposition: solving $AX=B$ when $A$ is invertible ==== If $A$ is an invertible $n\times n$ matrix and $B$ is an $n\times k$ matrix, then the matrix equation \[ AX=B\] has a unique solution: $X=A^{-1}B$. === Proof === First we check that $X=A^{-1}B$ really is a solution to $AX=B$. To see this, note that if $X=A^{-1}B$, then \begin{align*} AX&=A(A^{-1}B)\\&=(AA^{-1})B\\&=I_n B \\&= B. \end{align*} Now we check that the solution is unique. If $X$ and $Y$ are both solutions, then $AX=B$ and $AY=B$, so \[AX=AY.\] Multiplying both sides on the left by $A^{-1}$, we get \[ A^{-1}AX=A^{-1}AY\implies I_nX=I_nY\implies X=Y.\] So any two solutions are equal, so $AX=B$ has a unique solution. ■ ==== Corollary ==== If $A$ is an $n\times n$ matrix and there is a non-zero $n\times m$ matrix $K$ so that $AK=0_{n\times m}$, then $A$ is not invertible. === Proof === Since $A0_{n\times m}=0_{n\times m}$ and $AK=0_{n\times m}$, the equation $AX=0_{n\times m}$ has (at least) two solutions: $X=0_{n\times m}$ and $X=K$. Since $K$ is non-zero, these two solutions are different. So there is not a unique solution to $AX=B$, for $B$ the zero matrix. If $A$ was invertible, this would contradict the uniqueness statement of the last Proposition. So $A$ cannot be invertible. ■ ==== Examples ==== * We can now see why the matrix $\def\mat#1{\left[\begin{smallmatrix}#1\end{smallmatrix}\right]}A=\mat{1&2\\-3&-6}$ is not invertible. If $X=\mat{-2\\1}$ and $K=\mat{2\\-1}$, then $K$ is non-zero, but $AK=0_{2\times 1}$. So $A$ is not invertible, by the Corollary. * $A=\mat{1&4&5\\2&5&7\\3&6&9}$ is not invertible, since $K=\mat{1\\1\\-1}$ is non-zero and $AK=0_{3\times 1}$. ===== $2\times 2$ matrices: determinants and invertibility ===== ==== Question ==== Which $2\times 2$ matrices are invertible? For the invertible matrices, can we find their inverse? ==== Lemma ==== If $A=\mat{a&b\\c&d}$ and $J=\mat{d&-b\\-c&a}$, then we have \[ AJ=\delta I_2=JA\] where $\delta=ad-bc$. === Proof === This is a calculation (done in the lectures; you should also check it yourself). ■ ==== Definition: the determinant of a $2\times 2$ matrix ==== {{page>determinant of a 2x2 matrix}} ==== Theorem: the determinant determines the invertibility (and inverse) of a $2\times 2$ matrix ==== Let $A=\mat{a&b\\c&d}$ be a $2\times 2$ matrix. - $A$ is invertible if and only if $\det(A)\ne0$. - If $A$ is invertible, then $A^{-1}=\frac{1}{\det(A)}\mat{d&-b\\-c&a}$. === Proof === If $A=0_{2\times 2}$, then $\det(A)=0$ and $A$ is not invertible. So the statement is true is this special case. Now assume that $A\ne0_{2\times 2}$ and let $J=\mat{d&-b\\-c&a}$. By the previous lemma, we have \[AJ=(\det(A))I_2=JA.\] If $\det(A)\ne0$, then multiplying this equation through by the scalar $\frac1{\det(A)}$, we get \[ A\left(\frac1{\det(A)}J\right)=I_2=\left(\frac1{\det(A)}J\right) A,\] so if we write $B=\frac1{\det(A)}J$ to make this look simpler, then we obtain \[ AB=I_2=BA,\] so in this case $A$ is invertible with inverse $B=\frac1{\det(A)}J=\frac1{\det(A)}\mat{d&-b\\-c&a}$. If $\det(A)=0$, then $AJ=0_{2\times 2}$ and $J\ne 0_{2\times2}$ (since $A\ne0_{2\times2}$, and $J$ is obtained from $A$ by swapping two entries and multiplying the others by $-1$). Hence by the previous corollary, $A$ is not invertible in this case. ■