solve using matrices

x+3y-3z=12
3x-y+4z=0
-x+2y-z=1

Put in matrix form (the 4th column is the RHS):

1 3 -3 12
3 -1 4 0
-1 2 -1 1
proceed to transform to echelon form:
1 3 -3 12
0 10 -13 36 (3R1-R2)
0 5 -4 13 (R1+R3)

1 3 -3 12
0 10 -13 36
0 0 5 -10 (2R3-R2)

1 3 -3 12
0 10 -13 36
0 0 1 -2 (R3/5)

Back substitute
1 3 0 6 (3R3+R1)
0 1 0 1 (13R3+R2)/10
0 0 1 -2

1 0 0 3 (R1-3R2)
0 1 0 1
0 0 1 -2

So x=3, y=1, z=-2

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

The matrix A is given by:
A = {{1, 3, -3}, {3, -1, 4}, {-1, 2, -1}}

The matrix X is given by:
X = {{x}, {y}, {z}}

The matrix B is given by:
B = {{12}, {0}, {1}}

To find the values of x, y, and z, we need to solve the equation AX = B.

First, we need to find the inverse of matrix A. If the inverse exists, we can find it using the formula:
A^(-1) = (1/det(A)) * adj(A)
where det(A) is the determinant of matrix A and adj(A) is the adjugate of matrix A.

The determinant of matrix A is calculated as follows:
det(A) = 1*(2*(-1) + 4*2) - 3*(3*(-1) + 4*(-1)) + (-3)*(3*2 - 3*4)
= 1*(-2) - 3*(-7) + (-3)*(-6)
= -2 + 21 - 18
= 1

The adjugate of matrix A is calculated by taking the transpose of the cofactor matrix. The cofactor of an element a_i,j is given by the product of the sign (-1)^(i+j) and the determinant of the submatrix obtained by removing the i-th row and j-th column. Taking the transpose results in the adjugate.

The cofactor matrix is given by:
C = {{-1, -1, -2}, {-3, 10, -1}, {-6, 8, -10}}

Taking the transpose of C, we get the adjugate matrix:
adj(A) = {{-1, -3, -6}, {-1, 10, 8}, {-2, -1, -10}}

Now, we can calculate the inverse of A using the formula:
A^(-1) = (1/det(A)) * adj(A)
= (1/1) * {{-1, -3, -6}, {-1, 10, 8}, {-2, -1, -10}}
= {{-1, -3, -6}, {-1, 10, 8}, {-2, -1, -10}}

Next, we can find the matrix X by multiplying the inverse of A with B:
X = A^(-1) * B
= {{-1, -3, -6}, {-1, 10, 8}, {-2, -1, -10}} * {{12}, {0}, {1}}

Performing the matrix multiplication, we get:
X = {{-1*12 + (-3)*0 + (-6)*1}, {-1*12 + 10*0 + 8*1}, {-2*12 + (-1)*0 + (-10)*1}}
= {{-12 + 0 - 6}, {-12 + 0 + 8}, {-24 + 0 - 10}}
= {{-18}, {-4}, {-34}}

So, the solution to the system of equations is:
x = -18
y = -4
z = -34

To solve the given system of equations using matrices, we can represent the system in matrix form:

[A] [X] = [B]

Where:
[A] is the coefficient matrix,
[X] is the variable matrix,
[B] is the constant matrix.

Let's represent the given system:

x + 3y - 3z = 12 --> Equation 1
3x - y + 4z = 0 --> Equation 2
-x + 2y - z = 1 --> Equation 3

The coefficient matrix [A] is formed by extracting the coefficients of the variables x, y, and z:

[A] = | 1 3 -3 |
| 3 -1 4 |
| -1 2 -1 |

The variable matrix [X] contains the variables x, y, and z:

[X] = | x |
| y |
| z |

The constant matrix [B] is formed by extracting the constants on the right side of the equations:

[B] = | 12 |
| 0 |
| 1 |

Now, we can solve the system using matrix operations. The solution matrix [X] can be found using the formula:

[X] = [A]⁻¹ [B]

To find the inverse of matrix [A], we'll use the inverse matrix formula:

[A]⁻¹ = (1 / det([A])) [adj([A])]

Where det([A]) is the determinant of matrix [A], and adj([A]) is the adjugate of matrix [A].

1. Calculate the determinant of [A]:

det([A]) = (1 * (-1 * (-1) - 2 * 4)) - (3 * (-1 * (-1) - 2 * 3)) + (-3 * (3 * 4 - (-1) * (-1)))
= (1 * (-1 + 8)) - (3 * (-1 + 6)) + (-3 * (12 + 1))
= 7 - 15 - 39
= -47

2. Calculate the adjugate of [A] (adj([A])):

adj([A]) = [cof([A])]ᵀ

Where cof([A]) is the cofactor matrix of [A].

To calculate each element of the cofactor matrix, use the following formula:

cof(Aᵢ₋ⱼ) = (-1)^(i+j) * det([Mᵢ₋ⱼ])

Where [Mᵢ₋ⱼ] is the (i, j)th minor of matrix [A], obtained by deleting the ith row and jth column.

Now let's find the adjugate of [A]:

cof(A₁₁) = (-1)^(1+1) * det([M₁₁]) = det([A₂₋₂]) = det([-1 -1; 2 -1]) = (-1 * (-1 - 2)) - (2 * (-1 - (-1))) = (-1 + 4) - (2 * 0) = 3

cof(A₁₂) = (-1)^(1+2) * det([M₁₂]) = det([A₂₋₁]) = det([3 4; -1 -1]) = (3 * (-1 - (-4))) - (-1 * (3 - (-4))) = 3 + 7 = 10

cof(A₁₃) = (-1)^(1+3) * det([M₁₃]) = det([A₂₁]) = det([3 4; -1 2]) = (3 * 2) - (4 * (-1)) = 6 + 4 = 10

cof(A₂₁) = (-1)^(2+1) * det([M₂₁]) = det([A₁₃]) = det([1 -3; -1 2]) = (1 * 2) - (-3 * (-1)) = 2 + 3 = 5

cof(A₂₂) = (-1)^(2+2) * det([M₂₂]) = det([A₁₁]) = det([1 -3; -1 -1]) = (1 * (-1)) - (-1 * (-1)) = -1 + 1 = 0

cof(A₂₃) = (-1)^(2+3) * det([M₂₃]) = det([A₁₂]) = det([1 3; -1 -1]) = (1 * (-1 - 3)) - (3 * (-1 - (-1))) = -4 + 6 = 2

cof(A₃₁) = (-1)^(3+1) * det([M₃₁]) = det([A₁₂]) = det([1 3; 2 -1]) = (1 * (-1 - 6)) - (3 * (2 - 2)) = -7 + 0 = -7

cof(A₃₂) = (-1)^(3+2) * det([M₃₂]) = det([A₁₁]) = det([1 -3; 2 -1]) = (1 * (-1)) - (-3 * 2) = -1 + 6 = 5

cof(A₃₃) = (-1)^(3+3) * det([M₃₃]) = det([A₁₃]) = det([1 -3; 2 4]) = (1 * 4) - (-3 * 2) = 4 + 6 = 10

Therefore, the adjugate of [A] is:

adj([A]) = | 3 10 10 |
| 5 0 2 |
| -7 5 10 |

3. Calculate the inverse of [A]:

[A]⁻¹ = (1 / det([A])) [adj([A])]

[A]⁻¹ = (1 / -47) * | 3 10 10 |
| 5 0 2 |
| -7 5 10 |

Simplifying,

[A]⁻¹ = |-(3 / 47) -(10 / 47) -(10 / 47)|
|-(5 / 47) 0 -(2 / 47) |
|-(7 / 47) (5 / 47) -(10 / 47) |

4. Multiply [A]⁻¹ with [B] to find [X]:

[X] = [A]⁻¹ [B]

[X] = |-(3 / 47) -(10 / 47) -(10 / 47)| | 12 |
|-(5 / 47) 0 -(2 / 47) | | 0 |
|-(7 / 47) (5 / 47) -(10 / 47) | | 1 |

[X] = |(12 * (-(3 / 47))) + (0 * (-(10 / 47))) + (1 * (-(10 / 47))) |
|(12 * (-(5 / 47))) + (0 * 0) + (1 * (-(2 / 47))) |
|(12 * (-(7 / 47))) + (0 * (5 / 47)) + (1 * (-(10 / 47)))|

Simplifying,

[X] = | -18/47 |
| -10/47 |
| -32/47 |

Therefore, the solution to the given system of equations is:
x ≈ -18/47
y ≈ -10/47
z ≈ -32/47