AOS1 Topic 2: Linear and System of Equations

Linear Systems of Equations

1. Definition

A linear equation in n variables \(x_1, x_2, \ldots, x_n\) is of the form:

\[ a_1 x_1 + a_2 x_2 + \ldots + a_n x_n = b \]

where \(a_1, a_2, \ldots, a_n\) are coefficients, \(x_1, x_2, \ldots, x_n\) are variables, and \(b\) is a constant.

A system of linear equations is a set of such equations, for example:

\[ \begin{cases} a_{11}x_1 + a_{12}x_2 + \ldots + a_{1n}x_n = b_1 \\ a_{21}x_1 + a_{22}x_2 + \ldots + a_{2n}x_n = b_2 \\ \vdots \\ a_{m1}x_1 + a_{m2}x_2 + \ldots + a_{mn}x_n = b_m \end{cases} \]

Solutions to System of Linear Equations

Any set of values of \(x_1, x_2, \ldots, x_n\) which simultaneously satisfies the system of linear equations given above is called a solution of the system. If the system of equations has one or more solutions, the equations are called consistent. Also, if the system of equations does not admit any solution, then the equations are called inconsistent.

Consider the system of equations \(AX = B\) and these equations are said to be Homogeneous if \(B = 0\) and Non-homogeneous if \(B \neq 0\).

How to Solve System of Linear Equations?

The following methods of solving system of linear equations \(AX = B\), are applicable only when the coefficient matrix \(A\) is non-singular, i.e., \(|A| \neq 0\).

Cramer's method

Inverse method

Gauss-Jordan method

Gauss Elimination method

LU Decomposition method of factorisation (or) Method of Triangularisation

System of Linear Equations in Two Variables

The system of linear equations in two variables is the set of equations that contain only two variables. For example, \(2x + 3y = 4\); \(3x + 5y = 12\) are the system of equations in two variables. There are several methods of solving linear equations in two variables, such as:

Graphical method

Substitution Method

Elimination Method

Cross-Multiplication Method

Matrix method

2. Solution Methods

There are several methods to solve linear systems of equations:

Graphical Method

Suitable for systems with two variables.

Each equation is represented as a line on a graph.

The solution is the point(s) where the lines intersect.

Substitution Method

Solve one of the equations for one variable in terms of the others.

Substitute this expression into the other equations.

Repeat until you solve for all variables.

Elimination Method (or Addition Method)

Add or subtract equations to eliminate one variable.

Continue the process to solve for the remaining variables.

Matrix Method

Represent the system as a matrix equation \(AX = B\).

Use matrix operations to solve for the variable matrix \(X\).

Gaussian Elimination

Convert the system to an upper triangular form using row operations.

Back-substitute to find the solutions.

Example 1

Cramer's Method

Consider the system of equations and solve by Cramer's Method:

\(2x + 3y = 5\)
\(4x + y = 11\)

Solution:

We are given the system of linear equations:

2x + 3y = 5    (1)
4x + y = 11    (2)

Step 1: Write the System in Matrix Form

The matrix form is \(AX = B\), where:

A = \(\begin{pmatrix} 2 & 3 \\ 4 & 1 \end{pmatrix}\),   X = \(\begin{pmatrix} x \\ y \end{pmatrix}\),   B = \(\begin{pmatrix} 5 \\ 11 \end{pmatrix}\)

Step 2: Calculate the Determinant of Matrix A

We calculate the determinant of matrix \(A\) as follows:

\(\det(A) = \begin{vmatrix} 2 & 3 \\ 4 & 1 \end{vmatrix} = (2 \times 1) - (3 \times 4)\)
\(\det(A) = 2 - 12 = -10\)


Step 3: Find \(\det(A_x)\) and \(\det(A_y)\)

Now, we replace the columns of matrix \(A\) with matrix \(B\) to calculate \(\det(A_x)\) and \(\det(A_y)\).

Finding \(\det(A_x)\):

A_x = \(\begin{pmatrix} 5 & 3 \\ 11 & 1 \end{pmatrix}\)
\(\det(A_x) = (5 \times 1) - (3 \times 11) = 5 - 33 = -28\)

Finding \(\det(A_y)\):

A_y = \(\begin{pmatrix} 2 & 5 \\ 4 & 11 \end{pmatrix}\)
\(\det(A_y) = (2 \times 11) - (5 \times 4) = 22 - 20 = 2\)

Step 4: Solve for \(x\) and \(y\)

Using Cramer's Rule, we solve for \(x\) and \(y\) as:

\(x = \frac{\det(A_x)}{\det(A)} = \frac{-28}{-10} = 2.8\)
\(y = \frac{\det(A_y)}{\det(A)} = \frac{2}{-10} = -0.2\)

Final Answer

The solution to the system of equations is:

\(x = 2.8\),   \(y = -0.2\)


Example 2

Inverse method

We are given the system of linear equations:

2x + 3y = 5    (1)
4x + y = 11    (2)


Solution:

We find the inverse of matrix \(A\):

A = \(\begin{pmatrix} 2 & 3 \\ 4 & 1 \end{pmatrix}\)
\(\det(A) = -10\)
\(A^{-1} = \frac{1}{-10} \begin{pmatrix} 1 & -3 \\ -4 & 2 \end{pmatrix} = \begin{pmatrix} -0.1 & 0.3 \\ 0.4 & -0.2 \end{pmatrix}\)


Now, multiply \(A^{-1}\) by \(B\):

\(X = A^{-1}B = \begin{pmatrix} -0.1 & 0.3 \\ 0.4 & -0.2 \end{pmatrix} \begin{pmatrix} 5 \\ 11 \end{pmatrix}\)
\(x = 2.8\), \(y = -0.2\)

Final Answer: \(x = 2.8\), \(y = -0.2\)

Example 3

3. Gauss-Jordan Method


Start with the augmented matrix:

\(\begin{pmatrix} 2 & 3 & | & 5 \\ 4 & 1 & | & 11 \end{pmatrix}\)

Perform row operations:

  • \(R1 = R1 / 2 \rightarrow \begin{pmatrix} 1 & 1.5 & | & 2.5 \\ 4 & 1 & | & 11 \end{pmatrix}\)
  • \(R2 = R2 - 4R1 \rightarrow \begin{pmatrix} 1 & 1.5 & | & 2.5 \\ 0 & -5 & | & 1 \end{pmatrix}\)
  • \(R2 = R2 / (-5) \rightarrow \begin{pmatrix} 1 & 1.5 & | & 2.5 \\ 0 & 1 & | & -0.2 \end{pmatrix}\)
  • \(R1 = R1 - 1.5R2 \rightarrow \begin{pmatrix} 1 & 0 & | & 2.8 \\ 0 & 1 & | & -0.2 \end{pmatrix}\)

Final Answer: \(x = 2.8\), \(y = -0.2\)

Example 4

4. Gauss Elimination Method


Start with the augmented matrix:

\(\begin{pmatrix} 2 & 3 & | & 5 \\ 4 & 1 & | & 11 \end{pmatrix}\)

Perform row operations to get an upper triangular matrix:

  • \(R1 = R1 / 2 \rightarrow \begin{pmatrix} 1 & 1.5 & | & 2.5 \\ 4 & 1 & | & 11 \end{pmatrix}\)
  • \(R2 = R2 - 4R1 \rightarrow \begin{pmatrix} 1 & 1.5 & | & 2.5 \\ 0 & -5 & | & 1 \end{pmatrix}\)

Solve for \(y\) and back-substitute to find \(x\):

\(y = -0.2\), \(x = 2.8\)

Final Answer: \(x = 2.8\), \(y = -0.2\)

Example 5

5. LU Decomposition Method


Decompose matrix \(A\) into \(L\) and \(U\):

\(L = \begin{pmatrix} 1 & 0 \\ 2 & 1 \end{pmatrix}\),   \(U = \begin{pmatrix} 2 & 3 \\ 0 & -5 \end{pmatrix}\)


Solve \(LY = B\) and then \(UX = Y\):

\(Y = \begin{pmatrix} 5 \\ 1 \end{pmatrix}\),   \(X = \begin{pmatrix} 2.8 \\ -0.2 \end{pmatrix}\)

Final Answer: \(x = 2.8\), \(y = -0.2\)