# Matrices

Matrices are systems of linear equations. It is important in engineering and other fields to be able to solve these systems, and there are many methods to solve these iteratively.

## Contents |

## Introduction

The main way to solve matrices in previous courses has been Gaussian Elimination. This involves using row reduction and equating the x variables to the numbers on the right column. The Gauss-Jordan Method should also be known, where row reduction is used from top to bottom and then from bottom to top, to create a zero matrix on the left with a diagonal of 1s, with the solutions from x_{1} to x_{n} running down the right column. These should be revised for this course as they can be assessed.

There are also iterative methods to solve these systems of equations shown below, involving multiple iterations to find approximations of the solution.

## Iterative Methods

To find if the matrix converges to the solutions after multiple iterations, it is required to analyse the diagonal row. If this row is dominate, the matrix will converge.

- Example:
- Here is a matrix, with the diagonal row shown in bold:
**-x**+ x_{1}_{2}+ 4x_{3}= 3- 5x
_{1}**-x**+ x_{2}_{3}= 10 - 2x
_{1}+ 8x_{2}**-x**= 11_{3}

To check if the diagonal row is dominate, the absolute of the coefficient of the diagonal must be larger than the sum of the absolute of the other coefficients.

- Example:
- |-1| > |1| + |4|
- 1 > 5 FALSE, therefore it is not dominate and will not converge.

Therefore, it is important to rearrange the equations to make the diagonal row is dominate.

- Example:
**5x**-x_{1}_{2}+ x_{3}= 10- 2x
_{1}+**8x**-x_{2}_{3}= 11 - -x
_{1}+ x_{2}+**4x**= 3_{3}

- |5| > |-1| + |1|
- 5 > 2 TRUE
- |8| > |2| + |-1|
- 8 > 3 TRUE
- |4| > |-1| + |1|
- 4 > 2 TRUE
- Therefore, the matrix converges.

### Jacobi Method

The Jacobi Method requires a matrix that is diagonally dominate. Then, rearrange each row in the matrix to have the diagonal dominate term equal to the rest of the equation.

- Example:
- x1 = (x2 - x3 + 10)/5

Then, substitute the initial values, usually x_{1,2,3} = 0, into the right hand side of each equation to provide the new values of x_{1,2,3}. Substitute the new values of x_{1,2,3} into the equations for each iteration.

### Gauss-Seidel Method

The Gauss-Seidel Method is the same as the Jacobi method, but the newly calculated value of x_{1} is used for the calculation of the new value of x_{2} and so on. It is important to solve the equations from x_{1} to x_{n} in order, substituting the newest values as you go through the rows of equations. This method is better than the Jacobi Method as the iterations converge faster to the exact solution.

## End

This is the end of this topic. Click here to go back to the main subject page for Numerical Methods & Statistics.