Simultaneous Linear Equations

Several methods for solving systems of simultaneous linear equations. All the examples shown are for 3 variables, but can easily be expanded 2 variables.

Cramer's Rule

For a system of 3 equations:

  • Calculate the determinant of the matrix of coefficients
  • Calculate determinants by replacing 1 column of the matrix with the solutions
  • Use determinants to calculate unknowns

Matrix Inversion

For a system of equations in matrix form The solutions is given by

The system has no solutions if

Gaussian Elimination

Eliminating variables from equations one at a time to give a solution. Generally speaking, for a system of 3 equations

First, eliminate x from and

This gives

Then, eliminate y from

Giving

This gives a solution for , which can then be back-substituted to find the solutions for and .

The advantages of this method are:

  • No need for matrices (yay)
  • Works for homogenous and inhomogeneous systems
  • The matrix need not be square
  • Works for any size of system if a solution exists

Sometimes, the solution can end up being in a parametric form, for example:

This doesn't make sense, as the final equation is satisfied for any value of . Substituting a parameter for gives:

Gauss-Seidel Iteration

Iterative methods involve starting with a guess, then making closer and closer approximations to the solution. If iterations tend towards a limit, then the system converges and the limit will be a solution. If the system diverges, there is no solution for this iteration. For the gauss-seidel scheme:

Rearrange to get iterative formulae:

Using these formulae, make a guess at a starting value and then continue to iterate. For example:

Rearranging:

The solutions are , , , as can be seen from the table below containing the iterations:

rxyz
0000
12.252.352.467
21.0462.0982.952
30.9882.0123.000
40.9972.0013.001

Note that this will only work if the system is diagonally dominant. For a system to be diagonally dominant, the divisor of the iterative equation must be greater than the sum of the other coefficients.

Systems can be rearranged to have this property:

Rearranges to: