Matrix equation solver (Mathematica) [closed]

I have matrix

$$A = \left( \begin{array}{ccc} -1 & 1 & 1 \\ 2 & 3 & -1 \\ -2 & 3 & 3 \end{array} \right)$$

and matrix

$$B = \left( \begin{array}{ccc} -1 & 2 & -1 \\ 1 & 2 & -2 \\ 2 & 1 & -1 \end{array} \right)$$

And I want find a matrix $X$, for which the equation

$$XA-B=2X$$ holds, but I don't know how to do it.

I tried

Solve[XmatA - matB - 2 X = 0],


but it gives:

Set::write: "Tag Plus in -2\ X+XmatA+{{1,-2,1},{-1,-2,2},{-2,-1,1}} is Protected."

Solve::naqs: 0 is not a quantified system of equations and inequalities.

-

closed as off topic by Fabian, Hagen von Eitzen, Cameron Buie, Nameless, Davide GiraudoJan 1 '13 at 18:52

Questions on Mathematics Stack Exchange are expected to relate to math within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

This question is more relevant for Mathematica SE. –  Fabian Jan 1 '13 at 16:33

It says right there - 0 is not a system of equations. It's looking at 0 as the real number, not as the zero matrix. So you need to find a way to reference the matrix $$M = \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}$$ and see if there are any other problems.
However, to solve this by hand, you write the equation as $$XA - 2X = B$$ and since $$2X = 2IX = X(2I)$$you get that $$X(A-2I) = B$$ and if you (can) find $(A-2I)^{-1}$ (i.e. if it exists Spoiler alert: it does), then you may multiply by this inverse to get $$X = B(A-2I)^{-1}$$