# Solving matrix equation involving singular matrix

Given that $AB=AC$,

• $A=\begin{bmatrix} 3 & 6 \\ 1 & 2 \end{bmatrix}$

• $B=\begin{bmatrix} 1 & 5 \\ 0 & 1 \end{bmatrix}$

Find a matrix $C$ whose elements are all non-zero and is $2\times 2$ matrix.

I attempt to find the inverse of $A$ but it was unsuccessful as it is a singular matrix I have also attempted to solve the question $AB-AC=0$, $A(B-C)=0$ but still unsuccessful...

Thank you

-

Hint: Compute $AB$ and $AC$, then solve a system to compute the entries of $C$.

One possible solution is letting $C =\begin{bmatrix} -1 & 1 \\ 1 & 3 \end{bmatrix}$ There are infinite solutions.

Edit: We have

$AB =\begin{bmatrix} 3 & 21 \\ 1 & 7 \end{bmatrix}$. If $C = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$, then $AC=\begin{bmatrix} 3a+6c & 3b+6d \\ a+2c & b+2d \end{bmatrix}$.

So if $AB=AC$, it will follow that

1. $3a+6c=3$
2. $a+2c=1$
3. $3b+6d=21$
4. $b+2d=7$

Since 1. and 2. are equivalent, we'll work with 1. only. For the same reason we'll take 4. over 3.

Now we have that $a+2c=1$ and $b+2d=3$. Therefore $a=1-2c$ and $b=7-2d$.

This where I think you have trouble: you know $a$ and $b$, but you don't know $c$ and $d$. So what are $c,d$? As it happens $c,d$ can take any value you want! So just choose $c$ and $d$ as you wish, just as long as they satisfy the initial condition that all entries of $C$ are different from $0$. This means that $c$ can't be $0$ or $1\over 2$. Also $d$ can't be $0$ or $7\over 2$. I picked $c=1$ and $d=3$ to get the above mentioned solution.

-
Thank you for your answer but i still encounter some problems with it. AB=[3,21][1,7] then i assume c as [a,b][c,d], so AC = [3a+6c, 3b+6d][a+2c, b+2d]. Therefore the system end up as a+2c=1 and b+2d=7. What could i do with it? (i hope i haven't make any mistakes :) ) –  user51658 Jan 14 '13 at 14:34
I see a lot of people struggling with that, so I'll edit my answer. Wait a few minutes, please. –  Git Gud Jan 14 '13 at 14:35

The approach which you began to take will also work. You can rewrite $AB=AC$ as $A(B-C)=0$. This tells you that the columns of $B-C$ must be in the nullspace of $A$.

The nullspace of $A$ is found by solving $Ax=0$, which gives $\mathcal{N}(a)=\operatorname{span}\{x\}$, where $x=[-2,1]^T$.

Denote the $i^{th}$ column of $B$ and $C$ by $B_i$ and $C_i$. Since each column of $B-C$ must be in $\mathcal{N}(a)$, you have $B_i-C_i\in\mathcal{N}(a)\Rightarrow B_i-C_i=-k_ix,\,i=\{1,2\}$, where $k_i$ is an arbitrary constant, which can be different for each column. Then $C_i=B_i+k_ix,\,i=\{1,2\}$.

This gives your matrix $C$ as $$C=\begin{bmatrix} 1-2k_1&5-2k_2\\ k_1&1+k_2 \end{bmatrix}.$$ The choice $k_1=1,\,k_2=2$ gives the same matrix as Git Gud showed. Any choice for $k_1$ and $k_2$ would satisfy the required condition.

-