Library homepage

  • school Campus Bookshelves
  • menu_book Bookshelves
  • perm_media Learning Objects
  • login Login
  • how_to_reg Request Instructor Account
  • hub Instructor Commons
  • Download Page (PDF)
  • Download Full Book (PDF)
  • Periodic Table
  • Physics Constants
  • Scientific Calculator
  • Reference & Cite
  • Tools expand_more
  • Readability

selected template will load here

This action is not available.

Mathematics LibreTexts

11.6: Solving Systems with Gaussian Elimination

Learning Objectives

Carl Friedrich Gauss lived during the late \(18^{th}\) century and early \(19^{th}\) century, but he is still considered one of the most prolific mathematicians in history. His contributions to the science of mathematics and physics span fields such as algebra, number theory, analysis, differential geometry, astronomy, and optics, among others. His discoveries regarding matrix theory changed the way mathematicians have worked for the last two centuries.

CNX_Precalc_Figure_09_06_001new.jpg

We first encountered Gaussian elimination in Systems of Linear Equations: Two Variables . In this section, we will revisit this technique for solving systems, this time using matrices.

Writing the Augmented Matrix of a System of Equations

A matrix can serve as a device for representing and solving a system of equations. To express a system in matrix form, we extract the coefficients of the variables and the constants, and these become the entries of the matrix. We use a vertical line to separate the coefficient entries from the constants, essentially replacing the equal signs. When a system is written in this form, we call it an augmented matrix .

For example, consider the following \(2 × 2\) system of equations.

\[\begin{align*} 3x+4y&= 7\\ 4x-2y&= 5 \end{align*}\]

We can write this system as an augmented matrix:

\(\left[ \begin{array}{cc|c} 3&4&7\\4&-2&5\end{array} \right]\)

We can also write a matrix containing just the coefficients. This is called the coefficient matrix.

\(\begin{bmatrix}3&4\\4&−2\end{bmatrix}\)

A three-by-three system of equations such as

\[\begin{align*} 3x-y-z&= 0\\ x+y&= 5\\ 2x-3z&= 2 \end{align*}\]

has a coefficient matrix

\(\begin{bmatrix}3&−1&−1\\1&1&0\\2&0&−3\end{bmatrix}\)

and is represented by the augmented matrix

\(\left[ \begin{array}{ccc|c}3&−1&−1&0\\1&1&0&5\\2&0&−3&2\end{array} \right]\)

Notice that the matrix is written so that the variables line up in their own columns: \(x\)-terms go in the first column, \(y\)-terms in the second column, and \(z\)-terms in the third column. It is very important that each equation is written in standard form \(ax+by+cz=d\) so that the variables line up. When there is a missing variable term in an equation, the coefficient is \(0\).

How to: Given a system of equations, write an augmented matrix

Example \(\PageIndex{1}\): Writing the Augmented Matrix for a System of Equations

Write the augmented matrix for the given system of equations.

\[\begin{align*} x+2y-z&= 3\\ 2x-y+2z&= 6\\ x-3y+3z&= 4 \end{align*}\]

The augmented matrix displays the coefficients of the variables, and an additional column for the constants.

\(\left[ \begin{array}{ccc|c}1&2&−1&3\\2&−1&2&6\\1&−3&3&4\end{array} \right]\)

Exercise \(\PageIndex{1}\)

Write the augmented matrix of the given system of equations.

\[\begin{align*} 4x-3y&= 11\\ 3x+2y&= 4 \end{align*}\]

\(\left[ \begin{array}{cc|c} 4&−3&11\\3&2&4\end{array} \right]\)

Writing a System of Equations from an Augmented Matrix

We can use augmented matrices to help us solve systems of equations because they simplify operations when the systems are not encumbered by the variables. However, it is important to understand how to move back and forth between formats in order to make finding solutions smoother and more intuitive. Here, we will use the information in an augmented matrix to write the system of equations in standard form.

Example \(\PageIndex{2}\): Writing a System of Equations from an Augmented Matrix Form

Find the system of equations from the augmented matrix.

\(\left[ \begin{array}{ccc|c}1&−3&−5&-2\\2&−5&−4&5\\−3&5&4&6 \end{array} \right]\)

When the columns represent the variables \(x\), \(y\), and \(z\),

\[\left[ \begin{array}{ccc|c}1&-3&-5&-2\\2&-5&-4&5\\-3&5&4&6 \end{array} \right] \rightarrow \begin{align*} x-3y-5z&= -2\\ 2x-5y-4z&= 5\\ -3x+5y+4z&= 6 \end{align*}\]

Exercise \(\PageIndex{2}\)

Write the system of equations from the augmented matrix.

\(\left[ \begin{array}{ccc|c}1&−1& 1&5\\2&−1&3&1\\0&1&1&-9\end{array}\right]\)

\(\begin{align*} x-y+z&= 5\\ 2x-y+3z&= 1\\ y+z&= -9 \end{align*}\)

Performing Row Operations on a Matrix

Now that we can write systems of equations in augmented matrix form, we will examine the various row operations that can be performed on a matrix, such as addition, multiplication by a constant, and interchanging rows.

Performing row operations on a matrix is the method we use for solving a system of equations. In order to solve the system of equations, we want to convert the matrix to row-echelon form, in which there are ones down the main diagonal from the upper left corner to the lower right corner, and zeros in every position below the main diagonal as shown.

Row-echelon form \(\begin{bmatrix}1&a&b\\0&1&d\\0&0&1\end{bmatrix}\)

We use row operations corresponding to equation operations to obtain a new matrix that is row-equivalent in a simpler form. Here are the guidelines to obtaining row-echelon form.

To solve a system of equations we can perform the following row operations to convert the coefficient matrix to row-echelon form and do back-substitution to find the solution.

Each of the row operations corresponds to the operations we have already learned to solve systems of equations in three variables. With these operations, there are some key moves that will quickly achieve the goal of writing a matrix in row-echelon form. To obtain a matrix in row-echelon form for finding solutions, we use Gaussian elimination, a method that uses row operations to obtain a \(1\) as the first entry so that row \(1\) can be used to convert the remaining rows.

GAUSSIAN ELIMINATION

The Gaussian elimination method refers to a strategy used to obtain the row-echelon form of a matrix. The goal is to write matrix \(A\) with the number \(1\) as the entry down the main diagonal and have all zeros below.

\(A=\begin{bmatrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\end{bmatrix}\xrightarrow{After\space Gaussian\space elimination} A=\begin{bmatrix}1&b_{12}& b_{13}\\0&1&b_{23}\\0&0&1\end{bmatrix}\)

The first step of the Gaussian strategy includes obtaining a \(1\) as the first entry, so that row \(1\) may be used to alter the rows below.

How to: Given an augmented matrix, perform row operations to achieve row-echelon form

Example \(\PageIndex{3}\): Solving a \(2×2\) System by Gaussian Elimination

Solve the given system by Gaussian elimination.

\[\begin{align*} 2x+3y&= 6\\ x-y&= \dfrac{1}{2} \end{align*}\]

First, we write this as an augmented matrix.

\(\left[ \begin{array}{cc|c} 2&3&6\\1&−1&12\end{array} \right]\)

We want a \(1\) in row 1, column 1. This can be accomplished by interchanging row 1 and row 2.

\(R_1\leftrightarrow R_2\rightarrow \left[ \begin{array}{cc|c} 1&−1&12\\2&3&6\end{array} \right]\)

We now have a \(1\) as the first entry in row 1, column 1. Now let’s obtain a \(0\) in row 2, column 1. This can be accomplished by multiplying row 1 by \(−2\), and then adding the result to row 2.

\(-2R_1+R_2=R_2\rightarrow \left[ \begin{array}{cc|c} 1&−1&12\\0&5&5\end{array} \right]\)

We only have one more step, to multiply row 2 by \(\dfrac{1}{5}\).

\(\dfrac{1}{5}R_2=R_2\rightarrow \left[ \begin{array}{cc|c} 1&−1&12\\0&1&1\end{array} \right]\)

Use back-substitution. The second row of the matrix represents \(y=1\). Back-substitute \(y=1\) into the first equation.

\[\begin{align*} x-(1)&= \dfrac{1}{2}\\ x&= \dfrac{3}{2} \end{align*}\]

The solution is the point \(\left(\dfrac{3}{2},1\right)\).

Exercise \(\PageIndex{3}\)

\[\begin{align*} 4x+3y&= 11\\ x-3y&= -1 \end{align*}\]

Example \(\PageIndex{4}\): Using Gaussian Elimination to Solve a System of Equations

Use Gaussian elimination to solve the given \(2 × 2\) system of equations .

\[\begin{align*} 2x+y&= 1\\ 4x+2y&= 6 \end{align*}\]

Write the system as an augmented matrix .

\(\left[ \begin{array}{cc|c} 2&1&1\\4&2&6\end{array} \right]\)

Obtain a \(1\) in row 1, column 1. This can be accomplished by multiplying the first row by \(\dfrac{1}{2}\).

\(\dfrac{1}{2} R_1=R_1\rightarrow \left[ \begin{array}{cc|c} 1&\dfrac{1}{2}&\dfrac{1}{2}\\4&2&6\end{array} \right]\)

Next, we want a \(0\) in row 2, column 1. Multiply row 1 by \(−4\) and add row 1 to row 2.

\(-4R_1+R_2=R_2\rightarrow \left[ \begin{array}{cc|c} 1&\dfrac{1}{2}&\dfrac{1}{2}\\0&0&4\end{array} \right]\)

The second row represents the equation \(0=4\). Therefore, the system is inconsistent and has no solution.

Example \(\PageIndex{5}\): Solving a Dependent System

Solve the system of equations.

\[\begin{align*} 3x+4y&= 12\\ 6x+8y&= 24 \end{align*}\]

Perform row operations on the augmented matrix to try and achieve row-echelon form .

\(A=\left[ \begin{array}{cc|c} 3&4&12\\6&8&24\end{array} \right]\)

\(-\dfrac{1}{2}R_2+R_1=R_1\rightarrow \left[ \begin{array}{cc|c} 0&0&0\\6&8&24\end{array} \right]\)

\(R_1\leftrightarrow R_2=\left[ \begin{array}{cc|c} 6&8&24\\0&0&0\end{array} \right]\)

The matrix ends up with all zeros in the last row: \(0y=0\). Thus, there are an infinite number of solutions and the system is classified as dependent. To find the generic solution, return to one of the original equations and solve for \(y\).

\[\begin{align*} 3x+4y&= 12\\ 4y&= 12-3x\\ y&= 3-\dfrac{3}{4}x \end{align*}\]

So the solution to this system is \(\left(x,3−\dfrac{3}{4}x\right)\).

Example \(\PageIndex{6}\): Performing Row Operations on a \(3×3\) Augmented Matrix to Obtain Row-Echelon Form

Perform row operations on the given matrix to obtain row-echelon form.

\(\left[ \begin{array}{ccc|c} 1&-3&4&3\\2&-5&6&6\\-3&3&4&6\end{array} \right]\)

The first row already has a \(1\) in row 1, column 1. The next step is to multiply row 1 by \(−2\) and add it to row 2. Then replace row 2 with the result.

\(-2R_1+R_2=R_2 \left[ \begin{array}{ccc|c} 1&-3&4&3\\0&1&-2&0\\-3&3&4&6\end{array} \right]\)

Next, obtain a zero in row 3, column 1.

\(3R_1+R_3=R_3 \left[ \begin{array}{ccc|c} 1&-3&4&3\\0&1&-2&0\\0&-6&16&15\end{array} \right]\)

Next, obtain a zero in row 3, column 2.

\(6R_2+R_3=R_3 \left[ \begin{array}{ccc|c} 1&-3&4&3\\0&1&-2&0\\0&0&4&15\end{array} \right]\)

The last step is to obtain a 1 in row 3, column 3.

\(\dfrac{1}{3}R_3=R_3 \left[ \begin{array}{ccc|c} 1&-3&4&3\\0&1&-2&0\\0&0&1&\dfrac{21}{2}\end{array} \right]\)

Exercise \(\PageIndex{4}\)

Write the system of equations in row-echelon form.

\[\begin{align*} x−2y+3z &= 9 \\ −x+3y &= −4 \\ 2x−5y+5z &= 17 \end{align*}\]

\(\left[ \begin{array}{ccc|c} 1&-\dfrac{5}{2}&\dfrac{5}{2}&\dfrac{17}{2}\\0&1&5&9\\0&0&1&2\end{array} \right]\)

Solving a System of Linear Equations Using Matrices

We have seen how to write a system of equations with an augmented matrix , and then how to use row operations and back-substitution to obtain row-echelon form. Now, we will take row-echelon form a step farther to solve a \(3\) by \(3\) system of linear equations. The general idea is to eliminate all but one variable using row operations and then back-substitute to solve for the other variables.

Example \(\PageIndex{7}\): Solving a System of Linear Equations Using Matrices

Solve the system of linear equations using matrices.

\[\begin{align*} x-y+z&= 8\\ 2x+3y-z&= -2\\ 3x-2y-9z&= 9 \end{align*}\]

First, we write the augmented matrix.

\(\left[ \begin{array}{ccc|c} 1&-1&1&8\\2&3&-1&-2\\3&-2&-9&9\end{array} \right]\)

Next, we perform row operations to obtain row-echelon form.

\(−2R_1+R_2=R_2\rightarrow \left[ \begin{array}{ccc|c} 1&-1&1&8\\0&5&-3&-18\\3&-2&-9&9\end{array} \right]\)

\(−3R_1+R_3=R_3\rightarrow \left[ \begin{array}{ccc|c} 1&-1&1&8\\0&5&-3&-18\\0&1&-12&-15\end{array} \right]\)

The easiest way to obtain a \(1\) in row 2 of column 1 is to interchange \(R_2\) and \(R_3\).

\(Interchange\space R_2\space and\space R_3\rightarrow\left[ \begin{array}{ccc|c} 1&-1&1&8\\0&1&-12&-15\\0&5&-3&-18\end{array} \right]\)

\(−5R_2+R_3=R_3\rightarrow\left[ \begin{array}{ccc|c} 1&-1&1&8\\0&1&-12&-15\\0&0&57&57\end{array} \right]\)

\(−\dfrac{1}{57}R_3=R_3\rightarrow\left[ \begin{array}{ccc|c} 1&-1&1&8\\0&1&-12&-15\\0&0&1&1\end{array} \right]\)

The last matrix represents the equivalent system.

\[\begin{align*} x−y+z &= 8 \\ y−12z &= −15 \\ z &= 1 \end{align*}\]

Using back-substitution, we obtain the solution as \((4,−3,1)\).

Example \(\PageIndex{8}\): Solving a Dependent System of Linear Equations Using Matrices

Solve the following system of linear equations using matrices.

\[\begin{align*} −x−2y+z &= −1 \\ 2x+3y &= 2 \\ y−2z &= 0 \end{align*}\]

Write the augmented matrix.

\(\left[ \begin{array}{ccc|c} -1&-2&1&-1\\2&3&0&2\\0&1&-2&0\end{array} \right]\)

First, multiply row 1 by \(−1\) to get a \(1\) in row 1, column 1. Then, perform row operations to obtain row-echelon form.

\(-R_1\rightarrow \left[ \begin{array}{ccc|c} 1&2&-1&1\\2&3&0&2\\0&1&-2&0\end{array} \right]\)

\(R_2\leftrightarrow R_3\rightarrow \left[ \begin{array}{ccc|c} 1&2&-1&1\\0&1&-2&0\\2&3&0&2\end{array} \right]\)

\(−2R_1+R_3=R_3\rightarrow \left[ \begin{array}{ccc|c} 1&2&-1&1\\0&1&-2&0\\0&-1&2&0\end{array} \right]\)

\(R_2+R_3=R_3\rightarrow \left[ \begin{array}{ccc|c} 1&2&-1&1\\0&1&-2&0\\0&0&0&0\end{array} \right]\)

The last matrix represents the following system.

\[\begin{align*} x+2y−z &= 1 \\ y−2z &= 0 \\ 0 &= 0 \end{align*}\]

We see by the identity \(0=0\) that this is a dependent system with an infinite number of solutions. We then find the generic solution. By solving the second equation for \(y\) and substituting it into the first equation we can solve for \(z\) in terms of \(x\).

\[\begin{align*} x+2y−z &= 1 \\ y &= 2z \\ x+2(2z)−z &= 1 \\ x+3z &= 1 \\ z &=\dfrac{1−x}{3} \end{align*}\]

Now we substitute the expression for \(z\) into the second equation to solve for \(y\) in terms of \(x\).

\[\begin{align*} y−2z &= 0 \\ z &= \dfrac{1−x}{3} \\ y−2\left(\dfrac{1−x}{3}\right) &= 0 \\ y &= \dfrac{2−2x}{3} \end{align*}\]

The generic solution is \(\left(x,\dfrac{2−2x}{3},\dfrac{1−x}{3}\right)\).

Exercise \(\PageIndex{5}\)

Solve the system using matrices.

\[\begin{align*} x+4y-z&= 4\\ 2x+5y+8z&= 1\\ 5x+3y-3z&= 1 \end{align*}\]

\((1,1,1)\)

Q&A: Can any system of linear equations be solved by Gaussian elimination?

Yes, a system of linear equations of any size can be solved by Gaussian elimination.

How to: Given a system of equations, solve with matrices using a calculator

Example \(\PageIndex{9A}\): Solving Systems of Equations with Matrices Using a Calculator

\[\begin{align*} 5x+3y+9z&= -1\\ -2x+3y-z&= -2\\ -x-4y+5z&= 1 \end{align*}\]

Write the augmented matrix for the system of equations.

\(\left[ \begin{array}{ccc|c} 5&3&9&-1\\-2&3&-1&-2\\-1&-4&5&1\end{array} \right]\)

On the matrix page of the calculator, enter the augmented matrix above as the matrix variable \([A]\).

\([A]=\left[ \begin{array}{ccc|c} 5&3&9&-1\\-2&3&-1&-2\\-1&-4&5&1\end{array} \right]\)

Use the ref( function in the calculator, calling up the matrix variable \([A]\).

\[\begin{array}{cc} {\left[ \begin{array}{ccc|c} 1&\dfrac{3}{5}&\dfrac{9}{5}&\dfrac{1}{5}\\0&1&\dfrac{13}{21}&-\dfrac{4}{7}\\0&0&1&-\dfrac{24}{187}\end{array} \right] \rightarrow} & {\begin{align*} x+\dfrac{3}{5}y+\dfrac{9}{5}z &= -\dfrac{1}{5} \\ y+\dfrac{13}{21}z &= -\dfrac{4}{7} \\ z &= -\dfrac{24}{187} \end{align*}} \end{array}\]

Using back-substitution, the solution is \(\left(\dfrac{61}{187},−\dfrac{92}{187},−\dfrac{24}{187}\right)\).

Example \(\PageIndex{9B}\): Applying \(2×2\) Matrices to Finance

Carolyn invests a total of \($12,000\) in two municipal bonds, one paying \(10.5%\) interest and the other paying \(12%\) interest. The annual interest earned on the two investments last year was \($1,335\). How much was invested at each rate?

We have a system of two equations in two variables. Let \(x=\) the amount invested at \(10.5%\) interest, and \(y=\) the amount invested at \(12%\) interest.

\[\begin{align*} x+y&= 12,000\\ 0.105x+0.12y&= 1,335 \end{align*}\]

As a matrix, we have

\(\left[ \begin{array}{cc|c} 1&1&12,000\\0.105&0.12&1,335\end{array} \right]\)

Multiply row 1 by \(−0.105\) and add the result to row 2.

\(\left[ \begin{array}{cc|c} 1&1&12,000\\0&0.015&75\end{array} \right]\)

\[\begin{align*} 0.015y &= 75 \\ y &= 5,000 \end{align*}\]

So \(12,000−5,000=7,000\).

Thus, \($5,000\) was invested at \(12%\) interest and \($7,000\) at \(10.5%\) interest.

Example \(\PageIndex{10}\): Applying \(3×3\) Matrices to Finance

Ava invests a total of \($10,000\) in three accounts, one paying \(5%\) interest, another paying \(8%\) interest, and the third paying \(9%\) interest. The annual interest earned on the three investments last year was \($770\). The amount invested at \(9%\) was twice the amount invested at \(5%\). How much was invested at each rate?

We have a system of three equations in three variables. Let \(x\) be the amount invested at \(5%\) interest, let \(y\) be the amount invested at \(8%\) interest, and let \(z\) be the amount invested at \(9%\) interest. Thus,

\[\begin{align*} x+y+z &= 10,000 \\ 0.05x+0.08y+0.09z &= 770 \\ 2x−z &= 0 \end{align*}\]

\(\left[ \begin{array}{ccc|c} 1&1&1&10,000\\0.05&0.08&0.09&770\\2&0&-1&0\end{array} \right]\)

Now, we perform Gaussian elimination to achieve row-echelon form.

\(−0.05R_1+R_2=R_2\rightarrow \left[ \begin{array}{ccc|c} 1&1&1&10,000\\0&0.03&0.04&270\\2&0&-1&0\end{array} \right]\)

\(−2R_1+R_3=R_3\rightarrow \left[ \begin{array}{ccc|c} 1&1&1&10,000\\0&0.03&0.04&270\\0&-2&-3&-20,000\end{array} \right]\)

\(\dfrac{1}{0.03}R_2=R_2\rightarrow \left[ \begin{array}{ccc|c} 1&1&1&10,000\\0&1&\dfrac{4}{3}&9,000\\0&-2&-3&-20,000\end{array} \right]\)

\(2R_2+R_3=R_3\rightarrow \left[ \begin{array}{ccc|c} 1&1&1&10,000\\0&1&\dfrac{4}{3}&9,000\\0&0&-\dfrac{1}{3}&-2,000\end{array} \right]\)

The third row tells us \(−\dfrac{1}{3}z=−2,000\); thus \(z=6,000\).

The second row tells us \(y+\dfrac{4}{3}z=9,000\). Substituting \(z=6,000\),we get

\[\begin{align*} y+\dfrac{4}{3}(6,000) &= 9,000 \\ y+8,000 &= 9,000 \\ y &= 1,000 \end{align*}\]

The first row tells us \(x+y+z=10,000\). Substituting \(y=1,000\) and \(z=6,000\),we get

\[\begin{align*} x+1,000+6,000 &= 10,000 \\ x &= 3,000 \end{align*}\]

The answer is \($3,000\) invested at \(5%\) interest, \($1,000\) invested at \(8%\), and \($6,000\) invested at \(9%\) interest.

Exercise \(\PageIndex{6}\)

A small shoe company took out a loan of \($1,500,000\) to expand their inventory. Part of the money was borrowed at \(7%\), part was borrowed at \(8%\), and part was borrowed at \(10%\). The amount borrowed at \(10%\) was four times the amount borrowed at \(7%\), and the annual interest on all three loans was \($130,500\). Use matrices to find the amount borrowed at each rate.

\($150,000\) at \(7%\), \($750,000\) at \(8%\), \($600,000\) at \(10%\)

Access these online resources for additional instruction and practice with solving systems of linear equations using Gaussian elimination.

Key Concepts

Top Banner

Gauss Elimination Method

Gauss elimination method is used to solve a system of linear equations. Let’s recall the definition of these systems of equations. A system of linear equations is a group of linear equations with various unknown factors. As we know, unknown factors exist in multiple equations. Solving a system involves finding the value for the unknown factors to verify all the equations that make up the system.

If there is a single solution that means one value for each unknown factor, then we can say that the given system is a consistent independent system. If multiple solutions exist, the system has infinitely many solutions; then we say that it is a consistent dependent system. If there is no solution for unknown factors, and this will happen if there are two or more equations that can’t be verified simultaneously, then we say that it’s an inconsistent system.

This can be summarized in a table as given below:

Now, let’s have a look at the method that can be used to find the solution(s) of the given system of equations.

What is the Gauss Elimination Method?

In mathematics, the Gaussian elimination method is known as the row reduction algorithm for solving linear equations systems. It consists of a sequence of operations performed on the corresponding matrix of coefficients. We can also use this method to estimate either of the following:

To perform row reduction on a matrix, we have to complete a sequence of elementary row operations to transform the matrix till we get 0s (i.e., zeros) on the lower left-hand corner of the matrix as much as possible. That means the obtained matrix should be an upper triangular matrix. There are three types of elementary row operations; they are:

Learn more about the elementary operations of a matrix here.

The obtained matrix will be in row echelon form. The matrix is said to be in reduced row-echelon form when all of the leading coefficients equal 1, and every column containing a leading coefficient has zeros elsewhere. This final form is unique; that means it is independent of the sequence of row operations used. We can understand this in a better way with the help of the example given below.

Gauss Elimination Method with Example

Let’s have a look at the gauss elimination method example with a solution.

Solve the following system of equations:

x + y + z = 2

x + 2y + 3z = 5

2x + 3y + 4z = 11

Given system of equations are:

Let us write these equations in matrix form.

Gauss Elimination Method - 1

Subtracting R 1 from R 2 to get the new elements of R 2 , i.e. R 2 → R 2 – R 1 .

From this we get,

Gauss Elimination Method - 2

Let us make another operation as R 3 → R 3 – 2R 1

Gauss Elimination Method - 3

Subtract R 2 from R 1 to get the new elements of R 1 , i.e. R 1 → R 1 – R 2 .

Gauss Elimination Method - 4

Now, subtract R 2 from R 3 to get the new elements of R 3 , i.e. R 3 → R 3 – R 2 .

Gauss Elimination Method - 5

x – z = -1

That means, there is no solution for the given system of equations.

Gauss Elimination Method Problems

1. Solve the following system of equations using Gauss elimination method.

x + y + z = 9

2x + 5y + 7z = 52

2x + y – z = 0

2. Solve the following linear system using the Gaussian elimination method.

4x – 5y = -6

2x – 2y = 1

3. Using Gauss elimination method, solve:

2x – y + 3z = 9

x + y + z = 6

Frequently Asked Questions on Gauss Elimination Method

Why gauss elimination method is used.

The Gauss elimination method is used for solving a given system of linear equations. Other methods of solving system of linear equations are the Jacobi method, Cramer’s rule, Gauss-Seidel method etc.

What type of method is the Gauss elimination method?

The Gauss Elimination method is a direct method for solving a system of linear equations because, within a finite number of determined steps, we can solve the given system of linear equations.

What are the steps of the Gauss elimination method?

The steps of the Gauss elimination method are (1) Write the given system of linear equations in matrix form AX = B, where A is the coefficient matrix, X is a column matrix of unknowns and B is the column matrix of the constants. (2) Reduce the augmented matrix [A : B] by elementary row operations to get [A’ : B’]. (3) We get A’ as an upper triangular matrix. (4) By the backward substitution in A’X = B’, we get the solution of the given system of linear equations.

How Gauss-Jordan Method is different from the Gauss-Elimination method?

Both Gauss-Jordan and Gauss elimination are somewhat similar methods, the only difference is in the Gauss elimination method the matrix is reduced into an upper-triangular matrix whereas in the Gauss-Jordan method is reduced into a diagonal matrix.

Leave a Comment Cancel reply

Your Mobile number and Email id will not be published. Required fields are marked *

Request OTP on Voice Call

Post Comment

gauss elimination method example 4x4

Register with BYJU'S & Download Free PDFs

close

gauss elimination method example 4x4

The purpose of this article is to describe how the solutions to a linear system are actually found. The fundamental idea is to add multiples of one equation to the others in order to eliminate a variable and to continue this process until only one variable is left. Once this final variable is determined, its value is substituted back into the other equations in order to evaluate the remaining unknowns. This method, characterized by step‐by‐step elimination of the variables, is called Gaussian elimination .

Example 1 : Solve this system:

Multiplying the first equation by −3 and adding the result to the second equation eliminates the variable x :

This final equation, −5 y = −5, immediately implies y = 1. Back‐substitution of y = 1 into the original first equation, x + y = 3, yields x = 2. (Back‐substitution of y = 1 into the original second equation, 3 x − 2 y = 4, would also yeild x = 2.) The solution of this system is therefore ( x, y ) = (2, 1), as noted in Example 1.

Gaussian elimination is usually carried out using matrices. This method reduces the effort in finding the solutions by eliminating the need to explicitly write the variables at each step. The previous example will be redone using matrices.

Example 2 : Solve this system:

The first step is to write the coefficients of the unknowns in a matrix:

This is called the coefficient matrix of the system. Next, the coefficient matrix is augmented by writing the constants that appear on the right‐hand sides of the equations as an additional column: 

This is called the augmented matrix , and each row corresponds to an equation in the given system. The first row, r 1 = (1, 1, 3), corresponds to the first equation, 1 x + 1 y = 3, and the second row, r 2 = (3, −2, 4), corresponds to the second equation, 3 x − 2 y = 4. You may choose to include a vertical line—as shown above—to separate the coefficients of the unknowns from the extra column representing the constants.

Now, the counterpart of eliminating a variable from an equation in the system is changing one of the entries in the coefficient matrix to zero. Likewise, the counterpart of adding a multiple of one equation to another is adding a multiple of one row to another row. Adding −3 times the first row of the augmented matrix to the second row yields

The new second row translates into −5 y = −5, which means y = 1. Back‐substitution into the first row (that is, into the equation that represents the first row) yields x = 2 and, therefore, the solution to the system: ( x, y ) = (2, 1).

Gaussian elimination can be summarized as follows. Given a linear system expressed in matrix form, A x = b , first write down the corresponding augmented matrix:

Then, perform a sequence of elementary row operations , which are any of the following:

Type 1. Interchange any two rows.

Type 2. Multiply a row by a nonzero constant.

Type 3. Add a multiple of one row to another row.

Example 3 : Solve the following system using Gaussian elimination:

The augmented matrix which represents this system is

The first goal is to produce zeros below the first entry in the first column , which translates into eliminating the first variable, x , from the second and third equations. The row operations which accomplish this are as follows:

The second goal is to produce a zero below the second entry in the second column, which translates into eliminating the second variable, y , from the third equation. One way to accomplish this would be to add −1/5 times the second row to the third row. However, to avoid fractions, there is another option: first interchange rows two and three. Interchanging two rows merely interchanges the equations, which clearly will not alter the solution of the system:

Now, add −5 times the second row to the third row:

Since the coefficient matrix has been transformed into echelon form, the “forward” part of Gaussian elimination is complete. What remains now is to use the third row to evaluate the third unknown, then to back‐substitute into the second row to evaluate the second unknown, and, finally, to back‐substitute into the first row to evaluate the first unknwon.

The third row of the final matrix translates into 10 z = 10, which gives z = 1. Back‐substitution of this value into the second row, which represents the equation y − 3 z = −1, yields y = 2. Back‐substitution of both these values into the first row, which represents the equation x − 2 y + z = 0, gives x = 3. The solution of this system is therefore ( x, y, z ) = (3, 2, 1).

Example 4 : Solve the following system using Gaussian elimination:

For this system, the augmented matrix (vertical line omitted) is

First, multiply row 1 by 1/2:

Now, adding −1 times the first row to the second row yields zeros below the first entry in the first column:

Interchanging the second and third rows then gives the desired upper‐triangular coefficient matrix: 

The third row now says z = 4. Back‐substituting this value into the second row gives y = 1, and back‐substitution of both these values into the first row yields x = −2. The solution of this system is therefore ( x, y, z ) = (−2, 1, 4).

Gauss‐Jordan elimination . Gaussian elimination proceeds by performing elementary row operations to produce zeros below the diagonal of the coefficient matrix to reduce it to echelon form. (Recall that a matrix A ′ = [ a ij ′] is in echelon form when a ij ′= 0 for i > j , any zero rows appear at the bottom of the matrix, and the first nonzero entry in any row is to the right of the first nonzero entry in any higher row.) Once this is done, inspection of the bottom row(s) and back‐substitution into the upper rows determine the values of the unknowns.

However, it is possible to reduce (or eliminate entirely) the computations involved in back‐substitution by performing additional row operations to transform the matrix from echelon form to reduced echelon form. A matrix is in reduced echelon form when, in addition to being in echelon form, each column that contians a nonzero entry (usually made to be 1) has zeros not just below that entry but also above that entry. Loosely speaking, Gaussian elimination works from the top down, to produce a matrix in echelon form, whereas Gauss‐Jordan elimination continues where Gaussian left off by then working from the bottom up to produce a matrix in reduced echelon form. The technique will be illustrated in the following example.

Example 5 : The height, y , of an object thrown into the air is known to be given by a quadratic function of t (time) of the form y = at 2 + bt + c . If the object is at height y = 23/4 at time t = 1/2, at y = 7 at time t = 1, and at y = 2 at t = 2, determine the coefficients a, b , and c .

Since t = 1/2 gives y = 23/4

while the other two conditions, y ( t = 1) = 7 and y ( t = 2) = 2, give the following equations for a, b , and c :

Therefore, the goal is solve the system

The augmented matrix for this system is reduced as follows: 

At this point, the forward part of Gaussian elimination is finished, since the coefficient matrix has been reduced to echelon form. However, to illustrate Gauss‐Jordan elimination, the following additional elementary row operations are performed:

This final matrix immediately gives the solution: a = −5, b = 10, and c = 2.

Example 6 : Solve the following system using Gaussian elimination:

The augmented matrix for this system is

Multiples of the first row are added to the other rows to produce zeros below the first entry in the first column:

Next, −1 times the second row is added to the third row:

The third row now says 0 x + 0 y + 0 z = 1, an equation that cannot be satisfied by any values of x, y , and z . The process stops: this system has no solutions.

The previous example shows how Gaussian elimination reveals an inconsistent system. A slight alteration of that system (for example, changing the constant term “7” in the third equation to a “6”) will illustrate a system with infinitely many solutions.

Example 7 : Solve the following system using Gaussian elimination:

The same operations applied to the augment matrix of the system in Example 6 are applied to the augmented matrix for the present system:

Here, the third row translates into 0 x + 0 y + 0 z = 0, an equation which is satisfied by any x, y , and z . Since this offer no constraint on the unknowns, there are not three conditions on the unknowns, only two (represented by the two nonzero rows in the final augmented matrix). Since there are 3 unknowns but only 2 constrants, 3 − 2 =1 of the unknowns, z say, is arbitrary; this is called a free variable . Let z = t , where t is any real number. Back‐substitution of z = t into the second row (− y + 5 z = −6) gives 

Back substituting z = t and y = 6 + 5 t into the first row ( x + y − 3 z = 4) determines x : 

Therefore, every solution of the system has the form

where t is any real number. There are infinitely many solutions, since every real value of t gives a different particular solution. For example, choosing t = 1 gives ( x, y, z ) = (−4, 11, 1), while t = 3 gives ( x, y, z ) = (4, −9, −3), and so on. Geometrically, this system represents three planes in R 3 that intersect in a line, and (*) is a parametric equation for this line.

Example 7 provided an illustration of a system with infinitely many solutions, how this case arises, and how the solution is written. Every linear system that possesses infinitely many solutions must contain at least one arbitrary parameter (free variable). Once the augmented matrix has been reduced to echelon form, the number of free variables is equal to the total number of unknowns minus the number of nonzero rows:

This agrees with Theorem B above, which states that a linear system with fewer equations than unknowns, if consistent, has infinitely many solutions. The condition “fewer equations than unknowns” means that the number of rows in the coefficient matrix is less than the number of unknowns. Therefore, the boxed equation above implies that there must be at least one free variable. Since such a variable can, by definition, take on infinitely many values, the system will have infinitely many solutions.

Example 8 : Find all solutions to the system

First, note that there are four unknwons, but only thre equations. Therefore, if the system is consistent, it is guaranteed to have infinitely many solutions, a condition characterized by at least one parameter in the general solution. After the corresponding augmented matrix is constructed, Gaussian elimination yields 

The fact that only two nonzero rows remain in the echelon form of the augmented matrix means that 4 − 2 = 2 of the variables are free:

Therefore, selecting y and z as the free variables, let y = t 1 and z = t 2 . The second row of the reduced augmented matrix implies

and the first row then gives

Thus, the solutions of the system have the form

where t 1 t 2 are allowed to take on any real values.

Example 9 : Let b = ( b 1 , b 2 , b 3 ) T and let A be the matrix

For what values of b 1 , b 2 , and b 3 will the system A x = b be consistent?

The augmented matrix for the system A x = b reads

which Gaussian eliminatin reduces as follows: 

The bottom row now implies that b 1 + 3 b 2 + b 3 must be zero if this system is to be consistent. Therefore, the given system has solutins (infinitely many, in fact) only for those column vectors b = ( b 1 , b 2 , b 3 ) T for which b 1 + 3 b 2 + b 3 = 0.

Example 10 : Solve the following system (compare to Example 12):

A system such as this one, where the constant term on the right‐hand side of every equation is 0, is called a homogeneous system. In matrix form it reads A x = 0 . Since every homogeneous system is consistent—because x = 0 is always a solution—a homogeneous system has eithe exactly one solution (the trivial solution, x = 0 ) or infiitely many. The row‐reduction of the coefficient matrix for this system has already been performed in Example 12. It is not necessary to explicitly augment the coefficient matrix with the column b = 0 , since no elementary row operation can affect these zeros. That is, if A ′ is an echelon form of A , then elementary row operations will transform [ A | 0 ] into [ A ′| 0 ]. From the results of Example 12,

Since the last row again implies that z can be taken as a free variable, let z = t , where t is any real number. Back‐substitution of z = t into the second row (− y + 5 z = 0) gives 

and back‐substitution of z = t and y = 5 t into the first row ( x + y − 3 z = 0) determines x : 

Therefore, every solution of this system has the form ( x, y, z ) = (−2 t , 5 t, t ), where t is any real number. There are infinitely many solutins, since every real value of t gives a unique particular solution.

Note carefully the differnece between the set of solutions to the system in Example 12 and the one here. Although both had the same coefficient matrix A , the system in Example 12 was nonhomogeneous ( A x = b , where b ≠ 0 ), while the one here is the corresponding homogeneous system, A x = 0 . Placing their solutions side by side,

general solution to Ax = 0 : ( x, y, z ) = (−2 t , 5 t , t )

general solution to Ax = b : ( x, y, z ) = (−2 t , 5 t , t ) + (−2, 6, 0)

Theorem C . The general solutions to a consistent nonhomogeneous lienar system, A x = b , is equal to the general solution of the corresponding homogeneous system, A x = 0 , plus a particular solution of the nonhomogeneous system. That is, if x = x h represents the general solution of A x = 0 , then x = x h + x represents the general solution of A x + b , where x is any particular soltion of the (consistent) nonhomogeneous system A x = b .

[Technical note: Theorem C, which concerns a linear system , has a counterpart in the theory of linear diffrential equations . Let L be a linear differential operator; then the general solution of a solvable nonhomogeneous linear differential equation, L(y) = d (where d ≢ 0), is equal to the general solution of the corresponding homogeneous equation, L(y) = 0, plus a particular solution of the nonhomogeneous equation. That is, if y = y h repreents the general solution of L(y) = 0, then y = y h + y represents the general solution of L(y) = d , where y is any particular solution of the (solvable) nonhomogeneous linear equation L(y) = d .]

Example 11 : Determine all solutions of the system

Write down the augmented matrix and perform the following sequence of operations: 

Since only 2 nonzero rows remain in this final (echelon) matrix, there are only 2 constraints, and, consequently, 4 − 2 = 2 of the unknowns— y and z say—are free variables. Let y = t 1 and z = t 2 . Back‐substitution of y = t 1 and z = t 2 into the second row ( x − 3 y + 4 z = 1) gives

Finally, back‐substituting x = 1 + 3 t 1 − 4 2 , y = t 1 ,and z = t 2 into the first row (2 w − 2 x + y = −1) determines w :

Therefore, every solution of this system has the form

where t 1 and t 2 are any real numbers. Another way to write the solution is as follows: 

where t 1 , t 2 ∈ R .

Example 12 : Determine the general solution of

which is the homogeneous system corresponding to the nonhomoeneous one in Example 11 above.

Since the solution to the nonhomogeneous system in Example 11 is 

Example 13 : Prove Theorem A: Regardless of its size or the number of unknowns its equations contain, a linear system will have either no solutions, exactly one solution, or infinitely many solutions.

Proof . Let the given linear system be written in matrix form A x = b . The theorem really comes down to tthis: if A x = b has more than one solution, then it actually has infinitely many. To establish this, let x 1 and x 2 be two distinct solutions of A x = b . It will now be shown that for any real value of t , the vector x 1 + t ( x 1 − x 2 ) is also a solution of A x = b ; because t can take on infinitely many different values, the desired conclusion will follow. Since A x 1 = b and A x 2 ,

Therefore, x 1 + t ( x 1 − x 2 ) is indeed a solution of A x = b , and the theorem is proved.

Previous Operations with Matrices

Next Using Elementary Row Operations to Determine A−1

has been added to your

Reading List!

Removing #book# from your Reading List will also remove any bookmarked pages associated with this title.

Are you sure you want to remove #bookConfirmation# and any corresponding bookmarks?

gauss elimination method example 4x4

Gaussian Elimination

DOWNLOAD Mathematica Notebook

Gaussian elimination is a method for solving matrix equations of the form

To perform Gaussian elimination starting with the system of equations

compose the " augmented matrix equation"

LU decomposition of a matrix is frequently used as part of a Gaussian elimination process for solving a matrix equation.

A matrix that has undergone Gaussian elimination is said to be in echelon form .

For example, consider the matrix equation

In augmented form, this becomes

Switching the first and third rows (without switching the elements in the right-hand column vector) gives

Subtracting 9 times the first row from the third row gives

Subtracting 4 times the first row from the second row gives

Restoring the transformed matrix equation gives

Explore with Wolfram|Alpha

WolframAlpha

More things to try:

Referenced on Wolfram|Alpha

Cite this as:.

Weisstein, Eric W. "Gaussian Elimination." From MathWorld --A Wolfram Web Resource. https://mathworld.wolfram.com/GaussianElimination.html

Subject classifications

Logo white

banner

Augmented Matrix

Row operations on a matrix, reduced row-echelon form, practice questions, gauss jordan elimination – explanation & examples.

Gauss Jordan Elimination

The Gauss Jordan Elimination, or Gaussian Elimination, is an algorithm to solve a system of linear equations by representing it as an augmented matrix, reducing it using row operations, and expressing the system in reduced row-echelon form to find the values of the variables.

In this lesson, we will see the details of Gaussian Elimination and how to solve a system of linear equations using the Gauss-Jordan Elimination method. Examples and practice questions will follow.

What is Gaussian Elimination?

Gaussian Elimination is a structured method of solving a system of linear equations. Thus, it is an algorithm and can easily be programmed to solve a system of linear equations. The main goal of Gauss-Jordan Elimination is:

Let’s see what an augmented matrix form is, the $ 3 $ row operations we can do on a matrix and the reduced row echelon form of a matrix.

A system of linear equations is shown below:

$ \begin{align*} 2x + 3y &= \,7 \\ x – y  &= 4  \end{align*} $

We will write the  augmented matrix of this system by using the coefficients of the equations and writing it in the style shown below:

$ \left[ \begin{array}{ r r | r } 2 & 3 & 7 \\ 1 & -1 & 4  \end{array} \right] $

An example using $ 3 $ simultaneous equations is shown below:

$ \begin{align*} 2x + y + z  &= \,10 \\ x + 2y + 3z &= 1 \\  – x – y – z  &= 2  \end{align*} $

Representing this system as an augmented matrix:

$ \left[ \begin{array}{ r r r | r } 2 & 1 & 1 & 10 \\ 1 & 2 & 3 & 1 \\ – 1 & – 1 &  – 1  & 2  \end{array} \right] $

There are $ 3 $ elementary row operations that we can do on matrices. It won’t change the solution of the system. They are:

The Gauss Jordan Elimination’s main purpose is to use the $ 3 $ elementary row operations on an augmented matrix to reduce it into the reduced row echelon form (RREF). A matrix is said to be in reduced row echelon form , also known as  row canonical form , if the following $ 4 $ conditions are satisfied:

How to do Gauss Jordan Elimination

There aren’t any  definite steps to the Gauss Jordan Elimination Method, but the algorithm below outlines the steps we perform to arrive at the augmented matrix’s reduced row echelon form.

How to do Gauss Jordan Elimination

Let’s take a few examples to elucidate the process of solving a system of linear equations via the Gauss Jordan Elimination Method .

Solve the system shown below using the Gauss Jordan Elimination method:

$ \begin{align*} { – x } + 2y &= \, { – 6 } \\ { 3x } – 4y  &= { 14 }  \end{align*} $

The first step is to write the  augmented matrix of the system. We show this below:

$ \left[ \begin{array}{ r r | r } – 1 & 2 & – 6 \\ 3 & -4 & 14  \end{array} \right] $

Now, our task is to reduce the matrix into the reduced row echelon form (RREF) by performing the $ 3 $ elementary row operations.

The augmented matrix that we have is:

$ \left[ \begin{array}{ r r | r } – 1 & 2 & – 6 \\ 3 & – 4 & 14  \end{array} \right] $

We can multiply the first row by $ – 1 $ to make the leading entry $ 1 $. Shown below:

$ \left[ \begin{array}{ r r | r } 1 & – 2 & 6 \\ 3 & – 4 & 14  \end{array} \right] $

We can now multiply the first row by $ 3 $ and subtract it from the second row. Shown below:

$ \left[ \begin{array}{ r r | r } 1 & -2 & 6 \\ {3 – ( 1 \times 3 ) } & { -4 – ( -2 \times 3 ) } & { 14 –  ( 6 \times 3 ) }  \end{array} \right] $

$  = \left[  \begin{array}{ r r | r } 1 & – 2 & 6 \\ 0 & 2 & – 4  \end{array} \right] $

We have a $ 0 $ as the first entry of the second row.

To make the second entry of the second row $ 1 $, we can multiply the second row by $ \frac{ 1 }{ 2 } $. Shown below:

$  \left[ \begin{array}{ r r | r } 1 & – 2 & 6 \\ { \frac{ 1 }{ 2 } \times 0} & { \frac{ 1 }{ 2 } \times 2 } & { \frac{ 1 }{ 2 } \times – 4}  \end{array} \right] $

$  = \left[ \begin{array}{ r r | r } 1 & – 2 & 6 \\ 0 & 1 & – 2  \end{array} \right] $

We are almost there! 

The second entry of the first row should be $ 0 $. In order to do that, we multiply the second row by $ 2 $ and add it to the first row. Shown below:

$ \left[ \begin{array}{ r r | r } { 1 + (0 \times 2 ) } & { – 2 + (1 \times 2 ) } & {6 + ( – 2 \times 2 ) } \\ 0 & 1 & – 2  \end{array} \right] $

$  = \left[  \begin{array}{ r r | r } 1 & 0 & 2 \\ 0 & 1 & – 2  \end{array} \right] $

This is the  reduced row echelon   form . From the augmented matrix , we can write two equations (solutions):

$ \begin{align*} x  + 0y &= \, 2 \\  0x  + y  &=  -2  \end{align*} $

$ \begin{align*} x &= \, 2 \\ y &= – 2  \end{align*} $

Thus, the solution of the system of equations is $ x = 2 $ and $ y = – 2 $.

$ \begin{align*} x + 2y &= \, 4 \\ x – 2y  &= 6  \end{align*} $

Let’s write the augmented matrix of the system of equations:

$ \left[  \begin{array}{ r r | r } 1 & 2 & 4 \\ 1 & – 2 & 6  \end{array} \right] $

Now, we do the elementary row operations on this matrix until we arrive in the reduced row echelon form.

We multiply the first row by $ 1 $ and then subtract it from the second row. This is basically subtracting the first row from the second row:

$ \left[ \begin{array}{ r r | r } 1 & 2 & 4 \\ 1 – 1 & – 2 – 2 & 6 – 4  \end{array} \right] $

$ =\left[ \begin{array}{ r r | r } 1 & 2 & 4 \\ 0 & – 4 & 2  \end{array} \right] $

We multiply the second row by $ -\frac{ 1 }{ 4 }$ to make the second entry of the row, $ 1 $:

$\left[ \begin{array}{ r r | r } 1 & 2 & 4 \\ 0 \times -\frac{ 1 }{ 4 } & – 4 \times -\frac{ 1 }{ 4 } & 2 \times -\frac{ 1 }{ 4 }  \end{array} \right] $

$ =\left[ \begin{array}{ r r | r } 1 & 2 & 4 \\ 0 & 1 & -\frac{ 1 }{ 2 }  \end{array} \right] $

Lastly, we multiply the second row by $ – 2 $ and add it to the first row to get the reduced row echelon form of this matrix:

$\left[ \begin{array}{ r r | r } 1+(- 2\times 0) & 2+( – 2 \times 1) & 4 + ( – 2 \times -\frac{ 1 }{ 2 } ) \\ 0 & 1 & -\frac{ 1 }{ 2 }  \end{array} \right] $

$=\left[ \begin{array}{ r r | r } 1 & 0 & 5 \\ 0 & 1 & -\frac{ 1 }{ 2 }  \end{array} \right] $

$ \begin{align*} x + 0y &= \, 5 \\ 0x+ y  &= -\frac{ 1 }{ 2 }  \end{align*} $

$ \begin{align*} x &= \, 5 \\ y &= -\frac{ 1 }{ 2 }  \end{align*} $

Thus, the solution of the system of equations is $ x = 5 $ and $ y = -\frac{ 1 }{ 2 } $.

$ \begin{align*} 2x + y &= \, – 3 \\ – x – y  &= 2  \end{align*} $

$ \begin{align*} x + 5y &= \, 15 \\ – x + 5y  &= 25  \end{align*} $

We start off by writing the augmented matrix of the system of equations:

$ \left[ \begin{array}{r r | r} 2 & 1 & – 3 \\ – 1 & – 1 & 2  \end{array} \right] $

Now, we do the elementary row operations to arrive at our solution.

First , We inverse the signs of second row and exchange the rows. So, we have: $ \left[ \begin{array}{r r | r} 1 & 1 & – 2 \\ 2 & 1 & – 3  \end{array} \right] $ Second, We subtract twice of first row from second row: $ \left[ \begin{array}{r r | r} 1 & 1 & – 2 \\ 2 – ( 2 \times 1 ) & 1 – ( 2 \times 1 ) & – 3 – ( 2 \times – 2 )  \end{array} \right] $ $ = \left[ \begin{array}{r r | r} 1 & 1 & – 2 \\ 0 & – 1 & 1  \end{array} \right] $ Third , We inverse the second row to get: $ = \left[\begin{array}{r r | r} 1 & 1 & – 2 \\ 0 & 1 & – 1  \end{array} \right] $ Lastly , We subtract the second row from the first row and get: $ = \left[\begin{array}{r r | r} 1 & 0 & – 1 \\ 0 & 1 & – 1  \end{array} \right] $

From this augmented matrix , we can write two equations (solutions):

$ \begin{align*} x + 0y &= \, – 1 \\ 0x+ y  &= – 1   \end{align*} $

$ \begin{align*} x &= \, – 1 \\ y &= – 1  \end{align*} $

Thus, the solution of the system of equations is $ x = – 1  $ and $ y = – 1 $.

$ \begin{align*} x &= \, – 5 \\ y &= 4  \end{align*} $

Thus, the solution of the system of equations is $ x = – 5  $ and $ y = 4 $.

Previous Lesson  |  Main Page | Next Lesson

Study.com

We're sorry, this computer has been flagged for suspicious activity.

If you are a member, we ask that you confirm your identity by entering in your email.

You will then be sent a link via email to verify your account.

If you are not a member or are having any other problems, please contact customer support.

Thank you for your cooperation

Follow on Facebook

Math Calculators ▶ Gaussian Elimination Calculator

Send Us Your Feedback / Suggestion

cn

For further assistance, please Contact Us

wa

Adblocker Detected

ad

We always struggled to serve you with the best online calculations, thus, there's a humble request to either disable the AD blocker or go with premium plans to use the AD-Free version for calculators.

Premium Plans

Disable your Adblocker and refresh your web page 😊

Gaussian Elimination Calculator

Gaussian Elimination Calculator

Set the matrix of a linear equation and write down entries of it to determine the solution by applying the gaussian elimination method by using this calculator.

Size of the matrix:

Table of Content

Get the Widget!

Add this calculator to your site and lets users to perform easy calculations.

How easy was it to use our calculator? Did you face any problem, tell us!

This free Gaussian elimination calculator is specifically designed to help you in resolving systems of equations. Yes, now getting the most accurate solution of equations is just a couple of clicks away.

What Is Gaussian Elimination Algorithm?

In the light of mathematical analysis:

“The particular method that is used to find solution to the linear equations by arranging the augmented matrix of their coefficient numbers is known as the Gaussian Algorithm”

How to Apply Gaussian Elimination Algorithm?

Here we are going to apply this theorem on an example below. So for better understanding, just stay focused!

Example # 01:

Find solution of the following system of equations as under:

$$ 3x_{1} + 6x_{2} = 23 $$

$$ 6x_{1} + 2x_{2} = 34 $$

No doubt our widely used gaussian elimination calculator with steps will show detailed calculations to simplify these equations, but we need to analyse the scenario manually.

The equivalent augmented matrix form of the above equations are as follows:

$$ \begin{bmatrix} 3&6&23 \\ 6&2&34 \\\end{bmatrix} $$

Gaussian Elimination Steps:

Divide the zeroth row by 3.

$$ \left[\begin{array}{cc|c}1&2& \frac{23}{3} \\6&2&34 \\\end{array}\right] $$

Multiply the first row by 6 and then subtract it from the zeroth row.

$$ \left[\begin{array}{cc|c}1&2&\frac{23}{3} \\0&-10&-12 \\\end{array}\right] $$

Go for dividing the first row by -10.

$$ \left[\begin{array}{cc|c}1&2&\frac{23}{3} \\0&1&\frac{6}{5}\\\end{array}\right] $$

Get going for finding the product of zeroth row and 2. After doing that, subtract the result from the first row.

$$ \left[\begin{array}{cc|c}1&0&\frac{26333333334}{5000000000}\\0&1& \frac{6}{5}\\\end{array}\right] $$

As you see on the left side of the matrix, we get the identity matrix. So the answer on the right side pof the equation would be the values of the variables in the equations.

So the final results are as follows:

$$ b_{1} = 5.266 $$

$$ b_{2} = 1.2 $$

The same results can also be verified by using outer free gauss elimination calculator.

How Gaussian Elimination Method Calculator Works?

Get going to understand how this free gaussian elimination solver matrix row reduction algorithm simplifies equation systems.

The best gauss jordan elimination calculator with steps does the following calculations:

References:

From the source of Wikipedia: Gaussian elimination, Row operations, Echelon form, Computing determinants, inverse of a matrix, Ranks

go

Everybody needs a calculator at some point, get the ease of calculating anything from the source of calculator-online.net. Feel free to contact us at your convenience!

Other Links

Knowledge Base

Privacy Policy

Terms of Service

Content Disclaimer

Online Converter

gauss elimination method example 4x4

User Preferences

Content preview.

Arcu felis bibendum ut tristique et egestas quis:

Keyboard Shortcuts

M.7 gauss-jordan elimination.

Gauss-Jordan Elimination is an algorithm that can be used to solve systems of linear equations and to find the inverse of any invertible matrix. It relies upon three elementary row operations one can use on a matrix:

For an example of the first elementary row operation, swap the positions of the 1st and 3rd row.

\[ \begin{pmatrix} 4 & 0 & -1 \\ 2 & -2 & 3 \\ 7 & 5 & 0 \end{pmatrix}\Rightarrow  \begin{pmatrix} 7 & 5 & 0 \\ 2 & -2 & 3 \\ 4 & 0 & -1 \end{pmatrix} \]

For an example of the second elementary row operation, multiply the second row by 3.

\[ \begin{pmatrix} 4 & 0 & -1 \\ 2 & -2 & 3 \\ 7 & 5 & 0 \end{pmatrix} \Rightarrow \begin{pmatrix} 4 & 0 & -1 \\ 6 & -6 & 9 \\ 7 & 5 & 0 \end{pmatrix} \]

For an example of the third elementary row operation, add twice the 1st row to the 2nd row.

\[ \begin{pmatrix} 4 & 0 & -1 \\ 2 & -2 & 3 \\ 7 & 5 & 0 \end{pmatrix}\Rightarrow  \begin{pmatrix} 4 & 0 & -1 \\ 10 & -2 & 1 \\ 7 & 5 & 0 \end{pmatrix} \]

Reduced-row echelon form

The purpose of Gauss-Jordan Elimination is to use the three elementary row operations to convert a matrix into reduced-row echelon form. A matrix is in reduced-row echelon form , also known as row canonical form , if the following conditions are satisfied:

For example

\[A = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 3 \\ 0 & 0 & 0 \end{pmatrix}, B = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}, C = \begin{pmatrix} 0 & 7 & 3 \\ 1 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}, D = \begin{pmatrix} 1 & 7 & 3 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} \]

Matrices A and B are in reduced-row echelon form, but matrices C and D are not. C is not in reduced-row echelon form because it violates conditions two and three. D is not in reduced-row echelon form because it violates condition four. In addition, the elementary row operations can be used to reduce matrix D into matrix B .

Steps for Gauss-Jordan Elimination

To perform Gauss-Jordan Elimination:

Selected video examples are shown below:

To obtain the inverse of a n × n matrix A :

You are now following this question

Gaussian Elimination technique by matlab

Razi Naji

Direct link to this question

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab

   8 Comments Show Hide  7 older comments

John D'Errico

Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#comment_453808

Razi Naji

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#comment_453927

Tanzina Nasrin  Tania

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#comment_780828

Robby Ching

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#comment_864243

AKSHAY KUMAR

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#comment_1104629

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#comment_1106849

jealryn obordo

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#comment_1996265

Muntasir

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#comment_2217315

Sign in to comment.

Sign in to answer this question.

Accepted Answer

suraj kumar

Direct link to this answer

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#answer_416931

   1 Comment Show Hide  None

Muhammed Ali

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#comment_1237068

More Answers (6)

M Waqar Nadeem

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#answer_644702

   3 Comments Show Hide  2 older comments

Belkacem Faraheddine

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#comment_2065464

Ahmad

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#comment_2133395

Mourad

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#comment_2439343

pss CHARAN

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#answer_562358

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#comment_1314627

vaman doski

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#answer_675106

   0 Comments Show Hide  -1 older comments

Onur Yaprak

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#answer_851395

nissankararao yaswanth

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#answer_876485

Vishwa Lawliet

https://www.mathworks.com/matlabcentral/answers/340236-gaussian-elimination-technique-by-matlab#answer_1040950

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

An Error Occurred

Unable to complete the action because of changes made to the page. Reload the page to see its updated state.

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Asia Pacific

Contact your local office

gauss elimination method example 4x4

IMAGES

  1. Gaussian Elimination Method Example 4x4

    gauss elimination method example 4x4

  2. Gaussian Elimination 4x4

    gauss elimination method example 4x4

  3. PPT

    gauss elimination method example 4x4

  4. Gaussian Elimination Method Example 4x4

    gauss elimination method example 4x4

  5. Gaussian Elimination Method

    gauss elimination method example 4x4

  6. Gauss-Jordan Elimination Method

    gauss elimination method example 4x4

VIDEO

  1. Gauss Elimination Method for solving Simultaneous Equations

  2. MAT285

  3. MAT285

  4. Gauss Elimination Method (No solution)

  5. Numerical Methods Episode 26 Urdu/Hindi -GAUSSIAN ELIMINATION METHOD

  6. Gauss Elimination Method (Unique solution)

COMMENTS

  1. 9.6: Solving Systems with Gaussian Elimination

    Solve the given system by Gaussian elimination. 4x + 3y = 11 x − 3y = − 1 Answer Example 9.6.4: Using Gaussian Elimination to Solve a System of Equations Use Gaussian elimination to solve the given 2 × 2 system of equations. 2x + y = 1 4x + 2y = 6 Solution Write the system as an augmented matrix. [2 1 1 4 2 6] Obtain a 1 in row 1, column 1.

  2. Gaussian Elimination With 4 Variables Using Elementary Row ...

    351K views 5 years ago New Precalculus Video Playlist This precalculus video tutorial provides a basic introduction into the gaussian elimination with 4 variables using elementary row...

  3. 11.6: Solving Systems with Gaussian Elimination

    We then find the generic solution. By solving the second equation for y and substituting it into the first equation we can solve for z in terms of x. x + 2y − z = 1 y = 2z x + 2(2z) − z = 1 x + 3z = 1 z = 1 − x 3. Now we substitute the expression for z into the second equation to solve for y in terms of x.

  4. Gauss Elimination Method

    Gauss Elimination Method Problems 1. Solve the following system of equations using Gauss elimination method. x + y + z = 9 2x + 5y + 7z = 52 2x + y - z = 0 2. Solve the following linear system using the Gaussian elimination method. 4x - 5y = -6 2x - 2y = 1 3. Using Gauss elimination method, solve: 2x - y + 3z = 9 x + y + z = 6 x - y + z = 2

  5. Solving a system of 3 equations and 4 variables using matrix row

    Gauss-Jordan is augmented by an n x n identity matrix, which will yield the inverse of the original matrix as the original matrix is manipulated into the identity matrix. In the case that Sal is discussing above, we are augmenting with the linear "answers", and solving for the variables (in this case, x_1, x_2, x_3, x_4) when we get to row ...

  6. Gaussian Elimination

    Example 4: Solve the following system using Gaussian elimination: For this system, the augmented matrix (vertical line omitted) is First, multiply row 1 by 1/2: Now, adding −1 times the first row to the second row yields zeros below the first entry in the first column:

  7. Gaussian Elimination -- from Wolfram MathWorld

    Gaussian elimination is a method for solving matrix equations of the form. (1) To perform Gaussian elimination starting with the system of equations. (2) compose the " augmented matrix equation". (3) Here, the column vector in the variables is carried along for labeling the matrix rows. Now, perform elementary row operations to put the ...

  8. PDF GAUSSIAN ELIMINATION

    In general, when the process of Gaussian elimination without pivoting is applied to solving a linear system Ax= b,weobtainA= LUwith Land Uconstructed as above. For the case in which partial pivoting is used, we ob-tain the slightly modified result LU= PA where Land Uare constructed as before and Pis a permutation matrix. For example, consider P=

  9. Gaussian Elimination and Gauss-Jordan Elimination Four ...

    http://www.greenemath.com/http://www.facebook.com/mathematicsbyjgreeneIn this video, we will look at one example of how to solve a four variable linear syste...

  10. Gauss jordan elimination

    Let's take a few examples to elucidate the process of solving a system of linear equations via the Gauss Jordan Elimination Method. Example 1 Solve the system shown below using the Gauss Jordan Elimination method: - x + 2 y = - 6 3 x - 4 y = 14 Solution The first step is to write the augmented matrix of the system. We show this below:

  11. Gaussian Elimination: Method & Examples

    Gaussian elimination is the process of using valid row operations on a matrix until it is in reduced row echelon form. There are three types of valid row operations that may be performed on a...

  12. Inverting a 3x3 matrix using Gaussian elimination

    Gauss-Jordan elimination is a lot faster but only for certain matrices--if the inverse matrix ends up having loads of fractions in it, then it's too hard to see the next step for Gauss-Jordan and the determinant/adjugate method is the only way I can solve the problem without pulling my hair out.

  13. Gaussian Elimination Calculator with Steps

    Example # 01: Find solution of the following system of equations as under: 3x1 + 6x2 = 23 6x1 + 2x2 = 34 Solution: No doubt our widely used gaussian elimination calculator with steps will show detailed calculations to simplify these equations, but we need to analyse the scenario manually.

  14. M.7 Gauss-Jordan Elimination

    Steps for Gauss-Jordan Elimination. To perform Gauss-Jordan Elimination: Swap the rows so that all rows with all zero entries are on the bottom. Swap the rows so that the row with the largest, leftmost nonzero entry is on top. Multiply the top row by a scalar so that top row's leading entry becomes 1. Add/subtract multiples of the top row to ...

  15. Gaussian Elimination technique by matlab

    Hello every body , i am trying to solve an (nxn) system equations by Gaussian Elimination method using Matlab , for example the system below : Theme Copy x1 + 2x2 - x3 = 3 2x1 + x2 - 2x3 = 3 -3x1 + x2 + x3 = -6 C = [ 1 2 -1 ; 2 1 -2 ; -3 1 1 ] b= [ 3 3 -6 ] by using this code : Theme Copy % Matlab Program to solve (nxn) system equation

  16. PDF The Gauss-Jordan Elimination Algorithm

    A familiar 3 4 Example 2 Ignoring the rst row and column, ... We'll apply the Gauss-Jordan elimination algorithm to (!:. A. Havens The Gauss-Jordan Elimination Algorithm. 1: 1. =: and;:; (;; = = : The Gauss-Jordan Elimination Algorithm - Solving Systems of Real Linear Equations ...