# How to solve for unknown matrix?

How can I solve this? $$\begin{bmatrix} 1 & 1 \\ 1 & 2 \\ \end{bmatrix} X + \begin{bmatrix} 2 & -1\\ -1 & 1\\ \end{bmatrix} X \begin{bmatrix} 1 & 5 \\ 1 & 2 \\ \end{bmatrix} = \begin{bmatrix} 1 & 1\\ 1 & 1\\ \end{bmatrix}$$

I know there's similar question like: Solve for unknown matrix. But this one is much more complex as there are two separate terms with $$X$$.

Can I perform something similar like: $$Ax + Bx = C \implies (A+B)x = C$$? But at the second term, the $$X$$ is at the middle and that order is important in matrix.

Any help would be appreciated!

• Why don't you do exactly the same thing, done in that exercise? Like, do you know, how to multiply and add matrices? Is this the "much more complex" part? I mean, you can also left-multiply both sides by $\begin{bmatrix} 1 & 1 \\ 1 & 2 \\ \end{bmatrix}$ and see what happens – Makina Dec 7 '18 at 23:00
• If you put $X=\begin{bmatrix}x_1 & x_2 \\ x_3 & x_4 \end{bmatrix}$ and expand all the product, then it is still a set of linear equations. – Eclipse Sun Dec 7 '18 at 23:31

If we can't see the trick suggested in the comments, by $$X=\begin{bmatrix} a & b \\ c & d \\ \end{bmatrix}$$ we obtain
$$\begin{bmatrix} 1 & 1 \\ 1 & 2 \\ \end{bmatrix}X= \begin{bmatrix} a+b & a+2b \\ c+d & c+2d \\ \end{bmatrix}$$
$$\begin{bmatrix} 2 & -1\\ -1 & 1\\ \end{bmatrix} X \begin{bmatrix} 1 & 5 \\ 1 & 2 \\ \end{bmatrix} =$$ $$=\begin{bmatrix} 2 & -1\\ -1 & 1\\ \end{bmatrix} \begin{bmatrix} a+b & 5a+2b\\ c+d & 5c+2d\\ \end{bmatrix} =\begin{bmatrix} 2(a+b)-(c+d) & 2(5a+2b)-(5c+2d)\\ -(a+b)+(c+d) & -(5a+2b)+(5c+2d)\\ \end{bmatrix}$$
$$\begin{bmatrix} 3(a+b)-(c+d) & (11a+6b)-(5c+2d)\\ -(a+b)+2(c+d) & -(5a+2b)+(6c+4d)\\ \end{bmatrix}= \begin{bmatrix} 1 & 1 \\ 1 & 1 \\ \end{bmatrix}$$