# How to invert Matrix with letters?

I know how to invert matrix with numbers, but I dont know how to invert matrix with letters. it's defined that $\det(A) \neq 0$ and $a,b,c,d \in \Bbb R$.

That's the matrix $$A=\begin{Bmatrix} a & b \\ c & d \end{Bmatrix}$$

I know the according lemma, but i have to do it manually.

• They're not letters, they're variables. What is the additive inverse of $a$? What is the multiplicative inverse of $a$ (assuming $a\neq 0$)? These are just $-a$ and $1/a$, respectively. – Hayden Mar 30 '14 at 14:16
• Just use the definition that expands the inverse by its minors. – orion Mar 30 '14 at 14:17
• Suppose the letters were the numbers 1,2,3,4 instead. How would you invert the matrix? Afterwards, you can replace those numbers by the letters a,b,c,d respectively. – Klaas van Aarsen Mar 30 '14 at 14:22
• Five answers and I'm the only one who's up-voted the questions so far (thus balancing someone's down-vote, for a total of 0). – Michael Hardy Mar 30 '14 at 14:54

You need a matrix $$A^{-1}=\begin{pmatrix} x_1 &x_2 \\ x_3 & x_4 \end{pmatrix}$$ such that $$A\cdot A^{-1}=\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}=I \tag1$$ Now $$A\cdot A^{-1}=\begin{pmatrix} a & b \\ c & d \end{pmatrix}\cdot\begin{pmatrix} x_1 &x_2 \\ x_3 & x_4 \end{pmatrix}=\begin{pmatrix} ax_1+bx_3 &ax_2+bx_4 \\ cx_1+dx_3 & cx_2+dx_4 \end{pmatrix} \tag2$$ Combining (1) and (2) you have $$\begin{pmatrix} ax_1+bx_3 &ax_2+bx_4 \\ cx_1+dx_3 & cx_2+dx_4 \end{pmatrix}=\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$$ which gives you the following system of four equations in four unknowns (the $x_i$'s): $$\begin{cases} ax_1+bx_3=1\\ax_2+bx_4=0 \\cx_1+dx_3=0\\cx_2+dx_4=1 \end{cases}$$ Your solution will be expressed in terms of $a,b,c,d$ but this is not a problem since these are variables with known values.

You can calculate the inverse using the process of row-reduction. Although there are quicker ways, it might help you get more comfortable working with variables. Check it out:

$$\left[\begin{array}{cc|cc}a&b&1&0\\c&d&0&1\end{array}\right] \sim \left[\begin{array}{cc|cc}a&b&1&0\\0&\frac{ad-bc}{a}&-\frac{c}{a}&1\end{array}\right] \sim \cdots$$

That's just replacing (row 2) with (row 2) -$\frac{c}{a}$(row 1). Continuing in this manner, you should eventually obtain $$\cdots\sim\left[\begin{array}{cc|cc}1&0&\frac{d}{ad-bc}&\frac{-b}{ad-bc}\\0&1&\frac{-c}{ad-bc}&\frac{a}{ad-bc}\end{array}\right]$$

You can factor out that common denominator, and you'll get that the inverse is $\frac{1}{ad-bc}\left[\begin{array}{cc}d&-b\\-c&a\end{array}\right]$.

Just use the formula for the inverse using the adjugate matrix: $$A^{-1}=\frac1{\det A}\text{adj }A$$

In this case it immediately gives you $\displaystyle A^{-1}=\frac1{ad-bc}\left(\begin{matrix}\ \ \ d&\!\!\!-b\\-c&\ a\end{matrix}\right)$.

If all of the matrix entries are different variables, Cramer's rule is what you're looking for.

It states that $A^{-1} = \frac{1}{|A|} A^*$ where $A^*$ is the adjugate matrix. Each entry $a^*_{ij}$ in $A^*$ is the determinant of the matrix that results by removing row $j$ and column $i$ from $A$, multiplied by $(-1)^{i+j}$.

In principle, if you unfold the determinants, you get a formula for each entry of $A^{-1}$ as a rational function of the entries of $A$. But you really don't want to do that unless the matrix is very small; the formulas get huge and unwieldy.

• yes they are different vars. To be more specific, I have to show that Cramers rule applies here. – SuperNova Mar 30 '14 at 14:22
• @user2147674 So just write down what Cramer's rule predicts and show by multiplication that this is fine ... – Hagen von Eitzen Mar 30 '14 at 14:26
• @user2147674: You might have said that from the beginning. What you need to prove is that $AA^*=|A|I$, then. To do this, notice that each entry in $AA^*$ is a determinant expanded by minors -- for the diagonal entries this is exactly $|A|$, off the diagonal it is a matrix with a repeating row, whose determinant is clearly 0. – Henning Makholm Mar 30 '14 at 14:28

$$\left[ \begin{array}{ccc|ccc} a & b & c & 1 & 0 & 0 \\ d & e & f & 0 & 1 & 0 \\ g & h & i & 0 & 0 & 1 \end{array} \right]$$

If you do elementary row operations on this matrix until the left $3\times3$ part of it is an identity matrix, then the right $3\times 3$ part will be the inverse of the initial left $3\times 3$ part.

So $$-a\cdot\text{2nd row} + d\cdot\text{1st row} \mapsto \text{new 2nd row};$$ $$-a\cdot\text{3rd row} + g\cdot\text{1st row} \mapsto \text{new 3rd row}:$$ $$\left[ \begin{array}{cccccc} a & b & c & 1 & 0 & 0 \\ 0 & bd-ae & cd-af & d & -a & 0 \\ 0 & bg-ah & cg-ai & g & 0 & -a \end{array} \right]$$ $$-(bd-ae)\cdot\text{3rd} + (bg-ah)\cdot\text{2nd} \mapsto \text{3rd}:$$ $$\left[ \begin{array}{ccc|ccc} a & b & c & \cdots\cdots \\ 0 & bd - ae & cd - af & \cdots\cdots \\ 0 & 0 & (bg-ah)(cd-af)-(bd-ae)(cg-ai) & \cdots\cdots \end{array} \right.$$ $$\left. \begin{array}{ccc|ccc} \cdots\cdots & 1 & 0 & 0 \\ \cdots\cdots & d & -a & 0 \\ \cdots\cdots & (bgd-ahd)-(bdg-aed) & -bga+a^2 h & bda-a^2 e \end{array} \right]$$

Now do two row operations to get $0$s above the diagonal in the 3rd column, then one more to get $0$ above the diagonal in the 2nd column. Then multiply each row by the appropriate scalar to get $1$s on the diagonal in the left half. Then the right half will be the inverse of the initial left half.