The given equations are:
2x−y+z=1
x+2y+3z=8
3x+y−4z=1
Writing it in matrix form,
⎡⎢⎣2−1112331−4⎤⎥⎦⎡⎢⎣xyz⎤⎥⎦=⎡⎢⎣181⎤⎥⎦
Perform R2→R2−12R1 and R3→R3−32R1
⎡⎢
⎢
⎢
⎢
⎢⎣2−1105252052−112⎤⎥
⎥
⎥
⎥
⎥⎦⎡⎢⎣xyz⎤⎥⎦=⎡⎢
⎢
⎢
⎢
⎢⎣1152−12⎤⎥
⎥
⎥
⎥
⎥⎦
Perform R3→R3−R2
⎡⎢
⎢
⎢⎣2−110525200−8⎤⎥
⎥
⎥⎦⎡⎢⎣xyz⎤⎥⎦=⎡⎢
⎢
⎢⎣1152−8⎤⎥
⎥
⎥⎦
Hence, the new equations are,
2x−y+z=1 ....(i)
52(y+z)=152⇒y+z=3 ....(ii)
−8z=−8⇒z=1 ....(iii)
Substitute value of z from (iii) in equation (ii)
y+1=3⇒y=2
Substitute values of y and z in (i)
2x−2+1=1⇒2x=2⇒x=1
Hence, x=1,y=2,z=1 is the solution of the given simultaneous equations.