Skip to main content

Gauss elimination, partial pivoting, 4 unknowns

Short answer

The system is solved by partial pivoting: at each step the row with largest pivot is swapped to the top. Forward elimination yields an upper triangular matrix; back substitution gives x=3.0000, y=-2.0000, z=1.0000, v=5.0000.

Solve the following system of linear equations using the Gauss Elimination method with partial pivoting. x + 2y - 12z + 8v = 27 5x + 4y + 7z - 2v = 4 -3x + 7y + 9z + 5v = 11 6x - 12y - 8z + 3v = 49

Gauss elimination with partial pivoting: at each stage the row having the largest absolute value in the pivot column is brought to the pivot position (row swap) before elimination. This reduces round-off error. Then back substitution is used.

Step 1: System

x + 2y - 12z + 8v = 27
5x + 4y + 7z - 2v = 4
-3x + 7y + 9z + 5v = 11
6x - 12y - 8z + 3v = 49

Step 2: Forward elimination (reduce to upper triangular form)

Augmented matrix [A | b]:

  1.0000    2.0000  -12.0000    8.0000  |   27.0000
  5.0000    4.0000    7.0000   -2.0000  |    4.0000
 -3.0000    7.0000    9.0000    5.0000  |   11.0000
  6.0000  -12.0000   -8.0000    3.0000  |   49.0000

Column 1: largest pivot is in row 4, so swap R1 ↔ R4:

  6.0000  -12.0000   -8.0000    3.0000  |   49.0000
  5.0000    4.0000    7.0000   -2.0000  |    4.0000
 -3.0000    7.0000    9.0000    5.0000  |   11.0000
  1.0000    2.0000  -12.0000    8.0000  |   27.0000

R2 ← R2 − (0.8333) R1; R3 ← R3 − (-0.5000) R1; R4 ← R4 − (0.1667) R1:

  6.0000  -12.0000   -8.0000    3.0000  |   49.0000
  0.0000   14.0000   13.6667   -4.5000  |  -36.8333
  0.0000    1.0000    5.0000    6.5000  |   35.5000
  0.0000    4.0000  -10.6667    7.5000  |   18.8333

R3 ← R3 − (0.0714) R2; R4 ← R4 − (0.2857) R2:

  6.0000  -12.0000   -8.0000    3.0000  |   49.0000
  0.0000   14.0000   13.6667   -4.5000  |  -36.8333
  0.0000    0.0000    4.0238    6.8214  |   38.1310
  0.0000    0.0000  -14.5714    8.7857  |   29.3571

Column 3: largest pivot is in row 4, so swap R3 ↔ R4:

  6.0000  -12.0000   -8.0000    3.0000  |   49.0000
  0.0000   14.0000   13.6667   -4.5000  |  -36.8333
  0.0000    0.0000  -14.5714    8.7857  |   29.3571
  0.0000    0.0000    4.0238    6.8214  |   38.1310

R4 ← R4 − (-0.2761) R3:

  6.0000  -12.0000   -8.0000    3.0000  |   49.0000
  0.0000   14.0000   13.6667   -4.5000  |  -36.8333
  0.0000    0.0000  -14.5714    8.7857  |   29.3571
  0.0000    0.0000    0.0000    9.2475  |   46.2377

Step 3: Back substitution

v = (46.2377) / 9.2475 = 5.0000
z = (29.3571 − (8.7857)(5.0000)) / -14.5714 = 1.0000
y = (-36.8333 − (13.6667)(1.0000) − (-4.5000)(5.0000)) / 14.0000 = -2.0000
x = (49.0000 − (-12.0000)(-2.0000) − (-8.0000)(1.0000) − (3.0000)(5.0000)) / 6.0000 = 3.0000

Answer: x = 3.0000, y = -2.0000, z = 1.0000, v = 5.0000

✓ Answer checked by Claude Opus 5.5 (high effort)

All Numerical Method chapter 3 questions →