# Solution of simultaneous equations

## Solving Simultaneous Equations Using Matrices

• Simultaneous equations can also be solved using matrices and matrix operations. The system of equations can be represented in the form AX = B where A is the matrix of coefficients, X is the matrix of variables and B is the matrix of constants.

• To solve for X (variables), we can multiply both sides of the equation by the inverse of matrix A, provided it exists. The resulting equation would be X = A-1B. This allows us to solve for the variables.

## Check for Consistency

• Not all systems of linear simultaneous equations have solutions. They may be consistent (having one or infinite solutions) or inconsistent (having no solution).

•  A system is inconsistent if the rank of the coefficient matrix A is not equal to the **rank of the augmented matrix [A B]**. In other words, if rank(A)!=rank([A B]), system is inconsistent.

## Number of Solutions

• The number of possible solutions can also be determined using the rank of the matrices:
•  If rank(A)=rank([A B])=n (where n is number of variables), then system is consistent and has unique solution.
•  If rank(A)=rank([A B])
•  If rank(A) ≠ rank([A B]), system is inconsistent and has no solution.

## Using Cramer’s Rule

•  For a system of n simultaneous equations to have a unique solution, the determinant of the coefficient matrix ( A ) must not be zero. If A ≠ 0, the system can be solved using Cramer’s rule.
•  Cramer’s rule involves replacing the jth column of A with B to form a new matrix and calculating its determinant (Dj). The variable associated with the jth column, xj, equals Dj / A .
• Cramer’s rule can be time-consuming for larger matrices. However, it provides a direct method to find solutions without having to calculate matrix inverses.

## Gaussian Elimination and Gauss-Jordan Method

• Gaussian elimination and Gauss-Jordan method are two methods often used to solve systems of simultaneous equations. They transform the system to a simpler one, row by row, until the solutions can be read directly.

• These methods involve row operations, including swapping rows, multiplying a row by a non-zero constant, or adding a multiple of one row to another row. The goal is to create a upper triangular matrix (Gaussian) or diagonal matrix (Gauss-Jordan) to solve.

• Gaussian elimination involves more steps because it only reduces the matrix to row echelon form (upper triangular) whereas Gauss-Jordan reduces it to reduced row echelon form (diagonal).