4x-y+z=-5

2x+2y+3z=10
5x-2y+6z=1
solving x,y,z with Matrices

To solve the system of equations using matrices, we can represent the coefficients of the variables and the constants in a matrix form. Let's call this matrix A.

A = | 4 -1 1 |
| 2 2 3 |
| 5 -2 6 |

We also need a matrix containing the variables:

X = | x |
| y |
| z |

And a matrix containing the constants:

B = | -5 |
| 10 |
| 1 |

Now, we can write the system of equations in matrix form as AX = B.

AX = B

To solve this, we can multiply both sides of the equation by the inverse of matrix A:

A^(-1) * AX = A^(-1) * B

The left side of the equation simplifies to:

I * X = A^(-1) * B

Where I is the identity matrix.

X = A^(-1) * B

To find the inverse of matrix A, we can use methods such as Gauss-Jordan elimination or the adjoint matrix method. Once we find the inverse, we can easily calculate X by multiplying it with matrix B.

Note: The inverse of a matrix only exists if the determinant of matrix A is nonzero. If the determinant is zero, the system of equations may have either no solutions or infinitely many solutions.