Solve using matrices.
x – 3y + z = 10
x + y – 3z = -10
-3x – y + z = 2
====================
It is a matrix. Matrix is not a method.
You can use determinants, or Gauss-Jordan, for example.
----
| 1 -3 1 10|
| 1 1 -3 -10|
|-3 -1 1 2|
Using Determinants:
--
Det = 1*(1-3) -(-3)*(1-9) + 1*(-1+3) = -2-24+2 = -24
---
x*Det = -3*(-6+10) - 1*(2-10) + 10*(1-3) = -12+8-20 = -24 --> x = 1
-y*Det = 1*(-6+10) - 1*(2-30) + 10*(1-9) = 4+28-80 = -48 --> y = -2
z*det = 1*(2-10) - (-3)*(2-30) + 10*(-1+3) = -8-84+20 = -72 --> z = 3
=========