3
$\begingroup$

can you explain me the easiest way for solving this matrix equation? I have this matrix:

a={{-4,1,3,0},{-2,7,1,-1},{1,-1,9,-3},{-1,0,5,-10}

and the Equation is:

2a-x+IdentityMatrix[4]==0

Where x is the Unknown Matrix

or the better question apart from this upper exercise would be, how can i solve matrix equations that have this form A+X=...(0, or any other matrix)

$\endgroup$
3
  • 1
    $\begingroup$ So, try replacing x with 2 a + IdentityMatrix[4]... $\endgroup$ Jun 12, 2016 at 15:18
  • $\begingroup$ I know, thats the "common way", but is there like a command like at the polynomials for example: Solve[x+1==0,x] but just for matrix solving? $\endgroup$ Jun 12, 2016 at 15:21
  • $\begingroup$ Array[x, {4,4}] /. Solve[Flatten[ Thread /@ Thread[2 a - Array[x, {4, 4}] + IdentityMatrix[4] == 0]], Flatten@Array[x, {4, 4}]] or Solve[Flatten[ Table[2 a[[i, j]] - x[i, j] + Boole[i == j] == 0, {i, 4}, {j, 4}]], Flatten[Array[x, {4, 4}]]] $\endgroup$ Jun 12, 2016 at 16:14

1 Answer 1

2
$\begingroup$

The following is a general technique, using Solve

a = {{-4, 1, 3, 0}, {-2, 7, 1, -1}, {1, -1, 9, -3}, {-1, 0, 5, -10}};
X = Array[x, {4, 4}]
sol = Solve[2 a - X + IdentityMatrix[4] == Array[0 &, {4, 4}], Flatten[X]]
X /. Flatten[sol] // MatrixForm
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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