Gauss Elimination Method

Last Updated : 18 Jun, 2026

The Gaussian Elimination Method is a fundamental algorithm in linear algebra used to solve systems of linear equations.

  • By transforming a system into an upper triangular matrix through a series of row operations.
  • It allows us to find the values of unknowns (like x, y, z) using a series of row operations.

Step-by-step procedure for solving systems of linear equations by reducing the system to row echelon form and then applying back-substitution.

Steps of Gaussian Elimination

  1. Form the Augmented Matrix: Represent the system as an augmented matrix combining coefficients and constants.
  2. Forward Elimination: Use row operations—swapping rows, scaling rows, or adding multiples of one row to another—to convert the matrix into row echelon (upper triangular) form.
  3. Back-Substitution: Solve the resulting triangular system from the bottom up to find the values of the variables.

Example: Consider the system:

  • ( 2x + y - z = 8 )
  • ( -3x - y + 2z = -11 )
  • ( -2x + y + 2z = -3 )

The augmented matrix is: \begin{bmatrix} 2 & 1 & -1 &| \ 8 \\ -3 & -1 & 2 &|\ -11 \\ -2 & 1 & 2 & |\ -3 \end{bmatrix}

  • Step 1: Eliminate ( x ) from rows 2 and 3 using row 1. Multiply row 1 by 1.5 and add to row 2, then add row 1 to row 3.
  • Step 2: Eliminate ( y ) from row 3 using the new row 2.
  • Result: An upper triangular matrix, solved via back-substitution to yield ( x = 2, y = 3, z = -1 ).

Use of Gauss Elimination in Maths

We can use this method to estimate either of the following:

  • Computing Determinants: It simplifies finding the determinant of a square matrix by reducing it to row echelon form. The determinant is calculated by multiplying the diagonal elements and adjusting for row swaps and scalar multiplications.
  • Finding the Inverse of a Matrix: Gauss–Jordan elimination, a variant of Gaussian elimination, is used to find the inverse of a matrix. By augmenting the matrix with the identity matrix and applying row operations, the matrix is transformed into the inverse if it exists.
  • Computing Ranks and Bases: It can be applied to any matrix to determine its rank and the basis for its column space. The row echelon form reveals information about the number of linearly independent rows and the columns that form a basis for the matrix's column space.

Applications of Gaussian Elimination Method

Gaussian elimination is used in CS, especially in foundational areas involving linear systems.

  • Solving Linear Equations: Used to find the values of unknown variables in a system of linear equations.
  • Scientific Computing: Helps solve mathematical problems in science and engineering.
  • Computer Graphics: Used in 3D transformations, image rendering, and lighting calculations.
  • Machine Learning: Supports many linear algebra operations used in data analysis and learning algorithms.
  • Cryptography: Helps solve equations used in coding, encryption, and error correction.
  • Computer Vision: Used in image processing and camera calibration.
  • Robotics: Helps calculate movement and control the motion of robots.

Solved Questions

Question 1: Solve this Equation

x + 2y = 8
3x + 4y = 18

Solution :

x + 2y = 8
3x + 4y = 18

\left[\begin{array}{cc|c}1 & 2 & 8 \\3 & 4 & 18\end{array}\right]

R_2 \rightarrow R_2 - 3 \cdot R_1\left[\begin{array}{cc|c}1 & 2 & 8 \\0 & -2 & -6\end{array}\right]

Now solving the equation:

- 2y = - 6
= y = 3

Substitute into x + 2y = 8

x + 2(3) = 8
x + 6 = 8
x = 2

So, x = 2 and y = 3

Question 2: Solve using Gauss Elimination:

x + y + z = 6
2x + y + z = 14
x + 2y + 3z = 14

Solution:

x + y + z = 6
2x + y + z = 14
x + 2y + 3z = 14

\left[\begin{array}{ccc|c}1 & 1 & 1 & 6 \\ 2 & 1 & 1 & 14 \\ 1 & 2 & 3 & 14\end{array}\right]

Estimate below the first 1

R2 → 2R1 - R2

R3 → 1R - R3

\left[\begin{array}{ccc|c}1 & 1 & 1 & 6 \\0 & -1 & -1 & 2 \\0 & 1 & 2 & 8\end{array}\right]

R2 → R2​/-1 (dividing Row 2 by -1)​

\left[\begin{array}{ccc|c}1 & 1 & 1 & 6 \\0 & 1 & 1 & -2 \\1 & 1 & 2 & 8\end{array}\right]

R1 → 1 R2 - R1

\left[\begin{array}{ccc|c}1 & 0 & 0 & 8 \\0 & 1 & 1 & -2 \\0 & 0 & 1 & 10\end{array}\right]

R2 → R3 - R1

\left[\begin{array}{ccc|c}1 & 0 & 0 & 8 \\0 & 1 & 0 & -12 \\0 & 0 & 1 & 10\end{array}\right]

  • x = 8
  • y = -12
  • z = 10

Unsolved Questions

Question 1: Solve the following system of equations using Gauss Elimination Method:
3x + 2y = 16
4x - y = 9

Question 2: Solve the following system of equations using Gauss Elimination Method:
2x + 5y = 11
6x - 3y = 9

Question 3: Solve the following system of equations using Gauss Elimination Method:
2x + y - z = 1
4x - 6y = -2
-2x + 7y + 2z = 9

Question 4: Solve the following system of equations using Gauss Elimination Method:
x + y + z = 9
2x - 3y + 4z = 13
3x + 2y - z = 3

Comment

Explore