529,011 views
24 votes
24 votes
Please help me, i need help quickkk-

x+y-z=2
2x+y+z=1
2x-y+2z=3

i got x=-11
y=18
z=5

but it’s probably wrong- HELP PLS

User TuanGeek
by
3.1k points

1 Answer

11 votes
11 votes

Answer:

x = 2.2, y = -1.8, z = -1.6

Explanation:

Put the coefficients of each variable and their constants into a matrix, as shown below.

1 1 -1 2

2 1 1 1

2 -1 2 3

Now use the rref( function to essentially "solve" the equation for all of its variables. You end up with the following matrix:

1 0 0 2.2

0 1 0 -1.8

0 0 1 -1.6

Remember that the first three columns are the coefficients on our variables, and the last column is the constant on the other side. That means that this matrix is essentially telling us the value of each variable.

x + 0y + 0z = 2.2

0x + y + 0z = -1.8

0x + 0y + z = -1.6

User Valdis
by
2.8k points