Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this assignment:


$A = \begin{pmatrix} 2 & 4 \\ 0 & 3 \end{pmatrix}$

$C = \begin {pmatrix} -1 & 2 \\ -6 & 3 \end{pmatrix}$

Find all B that satisfy $AB = C$.

I know that one option is to say $B = \left( \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \right) $ and multiply it with $A$. By making each member equal to the one in $C$, I have a system of linear equations which I can solve.

However, I also know that I can set up a system like this:

$$ \left( \begin{array} {cc|cc} 2 & 4 & -1 & 2 \\ 0 & 3 & -6 & 3 \end{array} \right)$$

If I manipulate it like I would a system of linear equations (for example, by swapping rows, or adding a multiple of a row to another) to get the identity matrix $\left( \begin{smallmatrix} 1 & 0 \\ 0 & 1 \end{smallmatrix} \right)$, then what I'm looking for (matrix $B$) will appear in the right hand side, like this:

$$ \left( \begin{array} {cc|cc} 1 & 0 & 7/2 & -1 \\ 0 & 1 & -2 & 1 \end{array} \right)$$

In this case, $B = \left( \begin{smallmatrix} 7/2 & -1 \\ -2 & 1\end{smallmatrix} \right)$.

My question is, quite simply, how does this work? It looks like magic to me right now.

share|cite|improve this question
It's the Gauss–Jordan elimination method. – lhf Aug 5 '11 at 21:39
up vote 7 down vote accepted

You want a matrix $B$ that satisfies $AB = C$. That is, if $A$ is invertible, you can left multiply both sides by $A^{-1}$ and get $B = A^{-1}C$.

Notice that simple row operations are just left multiplication by matrices. You may need a minute or two to convince yourself of this, but try it: left multiplying a matrix $A$ by $\begin{pmatrix}1&0 \\ 0&3\end{pmatrix}$ is just multiplying (row 2) by 3; left multiplying by $\begin{pmatrix} 1&2 \\ 0&1\end{pmatrix}$ is just adding 2*(row 2) to (row 1). So performing the same row operations to $A$ and $C$ is essentially left multiplying $A$ and $C$ by the same matrix. When you manipulate $A$ until it becomes the identity, you must have ended up left multiplying it by $A^{-1}$, so the matrix you get on the right is $A^{-1}C$, i.e. $B$.

(In the same way, if you wanted to solve $BA = C$ for $B$, you could use column operations, because right multiplication by matrices is just column operations.)

share|cite|improve this answer
That makes sense, thanks. – Javier Aug 5 '11 at 23:33

All the operations you perform on A and C (and on the intermediary matrices you get after some operations) make you replace A and C by PA and PC for some matrices P. If in the end A is transformed into the identity matrix Id, this means that the product K of the matrices P used is such that KA=Id. Hence K is the inverse A-1 of A and the matrix you get on the right is KC=A-1C, as desired.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.