Sonzaschool
Rudi

Sekondari ya Juu · Kidato cha Sita

Basic Applied Mathematics 2

Solving system of simultaneous equations in 2 unknowns

takriban dakika 6 kusoma

Majadiliano
Mada za sehemu hiiMatricesMada 5

Matrix solution of system of linear equations

There are two main methods of solving systems of linear equations using matrices: the inverse matrix method and Cramer's rule.

Solving system of linear equations by the inverse matrix method

A system of two equations with two unknowns

Consider the system of linear equations:

{a1x+b1y=c1a2x+b2y=c2\begin{cases} a_1x + b_1y = c_1 \\ a_2x + b_2y = c_2 \end{cases}

In matrix form, this becomes:

[a1b1a2b2][xy]=[c1c2]\begin{bmatrix} a_1 & b_1 \\ a_2 & b_2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} c_1 \\ c_2 \end{bmatrix}

Let A=[a1b1a2b2]A = \begin{bmatrix} a_1 & b_1 \\ a_2 & b_2 \end{bmatrix}. The system can be written as:

A[xy]=[c1c2]A \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} c_1 \\ c_2 \end{bmatrix}

Pre-multiplying by A1A^{-1}:

A1A[xy]=A1[c1c2]A^{-1}A \begin{bmatrix} x \\ y \end{bmatrix} = A^{-1} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix}

Since A1A=IA^{-1}A = I (the identity matrix):

[xy]=A1[c1c2]\begin{bmatrix} x \\ y \end{bmatrix} = A^{-1} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix}

Example 10.17: A woman owns 21 domestic animals (goats and chickens) with a total of 76 legs. How many of each animal does she own?

Solution:

Let xx be the number of goats and yy be the number of chickens. Then:

{x+y=214x+2y=76\begin{cases} x + y = 21 \\ 4x + 2y = 76 \end{cases}

In matrix form:

[1142][xy]=[2176]\begin{bmatrix} 1 & 1 \\ 4 & 2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 21 \\ 76 \end{bmatrix}

Let A=[1142]A = \begin{bmatrix} 1 & 1 \\ 4 & 2 \end{bmatrix}. det(A)=(12)(14)=2\det(A) = (1 \cdot 2) - (1 \cdot 4) = -2.

A1=12[2141]=[112212]A^{-1} = \frac{1}{-2} \begin{bmatrix} 2 & -1 \\ -4 & 1 \end{bmatrix} = \begin{bmatrix} -1 & \frac{1}{2} \\ 2 & -\frac{1}{2} \end{bmatrix}

[xy]=[112212][2176]=[(1)(21)+(12)(76)(2)(21)+(12)(76)]=[174]\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} -1 & \frac{1}{2} \\ 2 & -\frac{1}{2} \end{bmatrix} \begin{bmatrix} 21 \\ 76 \end{bmatrix} = \begin{bmatrix} (-1)(21) + (\frac{1}{2})(76) \\ (2)(21) + (-\frac{1}{2})(76) \end{bmatrix} = \begin{bmatrix} 17 \\ 4 \end{bmatrix}

Therefore, x=17x = 17 (goats) and y=4y = 4 (chickens).

A system of three equations with three unknowns

Consider the system:

{a11x+b11y+c11z=d1a22x+b22y+c22z=d2a33x+b33y+c33z=d3\begin{cases} a_{11}x + b_{11}y + c_{11}z = d_1 \\ a_{22}x + b_{22}y + c_{22}z = d_2 \\ a_{33}x + b_{33}y + c_{33}z = d_3 \end{cases}

In matrix form:

[a11b11c11a22b22c22a33b33c33][xyz]=[d1d2d3]\begin{bmatrix} a_{11} & b_{11} & c_{11} \\ a_{22} & b_{22} & c_{22} \\ a_{33} & b_{33} & c_{33} \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} d_1 \\ d_2 \\ d_3 \end{bmatrix}

Let AA be the coefficient matrix. Then:

[xyz]=A1[d1d2d3]\begin{bmatrix} x \\ y \\ z \end{bmatrix} = A^{-1} \begin{bmatrix} d_1 \\ d_2 \\ d_3 \end{bmatrix}

The process involves finding the inverse of the 3x3 matrix AA (which involves finding minors, cofactors, the adjoint, and the determinant), and then multiplying it by the constant matrix.

Solving a system of linear equations using Cramer's rule

A system of two equations and two unknowns

Consider the system:

{a1x+b1y=c1a2x+b2y=c2\begin{cases} a_1x + b_1y = c_1 \\ a_2x + b_2y = c_2 \end{cases}

Cramer's rule states:

x=c1b1c2b2a1b1a2b2=c1b2c2b1a1b2a2b1,y=a1c1a2c2a1b1a2b2=a1c2a2c1a1b2a2b1x = \frac{\begin{vmatrix} c_1 & b_1 \\ c_2 & b_2 \end{vmatrix}}{\begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix}} = \frac{c_1b_2 - c_2b_1}{a_1b_2 - a_2b_1}, \quad y = \frac{\begin{vmatrix} a_1 & c_1 \\ a_2 & c_2 \end{vmatrix}}{\begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix}} = \frac{a_1c_2 - a_2c_1}{a_1b_2 - a_2b_1}

Example 10.20: Solve:

{2x+3y=94x2y=10\begin{cases} 2x + 3y = 9 \\ 4x - 2y = 10 \end{cases}

Solution:

x=931022342=1830412=4816=3x = \frac{\begin{vmatrix} 9 & 3 \\ 10 & -2 \end{vmatrix}}{\begin{vmatrix} 2 & 3 \\ 4 & -2 \end{vmatrix}} = \frac{-18 - 30}{-4 - 12} = \frac{-48}{-16} = 3 y=294102342=203616=1616=1y = \frac{\begin{vmatrix} 2 & 9 \\ 4 & 10 \end{vmatrix}}{\begin{vmatrix} 2 & 3 \\ 4 & -2 \end{vmatrix}} = \frac{20 - 36}{-16} = \frac{-16}{-16} = 1

A system of three equations with three unknowns

For the system (10.17), Cramer's rule is:

x=A1A,y=A2A,z=A3Ax = \frac{|A_1|}{|A|}, \quad y = \frac{|A_2|}{|A|}, \quad z = \frac{|A_3|}{|A|}

Where A|A| is the determinant of the coefficient matrix, and A1|A_1|, A2|A_2|, and A3|A_3| are the determinants of matrices formed by replacing the first, second, and third columns of AA, respectively, with the constants d1d_1, d2d_2, and d3d_3.

Example 10.21: Solve the following system of equations using Cramer's rule:

{x+2y+3z=72x+yz=73x+y+2z=0\begin{cases} x + 2y + 3z = 7 \\ 2x + y - z = 7 \\ 3x + y + 2z = 0 \end{cases}

Solution:

In matrix form:

[123211312][xyz]=[770]\begin{bmatrix} 1 & 2 & 3 \\ 2 & 1 & -1 \\ 3 & 1 & 2 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} 7 \\ 7 \\ 0 \end{bmatrix}

Let A=[123211312]A = \begin{bmatrix} 1 & 2 & 3 \\ 2 & 1 & -1 \\ 3 & 1 & 2 \end{bmatrix}. Calculate the determinant of AA:

A=1111222132+32131=1(2+1)2(4+3)+3(23)=3143=14|A| = 1\begin{vmatrix} 1 & -1 \\ 1 & 2 \end{vmatrix} - 2\begin{vmatrix} 2 & -1 \\ 3 & 2 \end{vmatrix} + 3\begin{vmatrix} 2 & 1 \\ 3 & 1 \end{vmatrix} = 1(2+1) - 2(4+3) + 3(2-3) = 3 - 14 - 3 = -14

Now, create the matrices A1A_1, A2A_2, and A3A_3 by replacing the columns of AA with the constant vector:

A1=[723711012],A2=[173271302],A3=[127217310]A_1 = \begin{bmatrix} 7 & 2 & 3 \\ 7 & 1 & -1 \\ 0 & 1 & 2 \end{bmatrix}, \quad A_2 = \begin{bmatrix} 1 & 7 & 3 \\ 2 & 7 & -1 \\ 3 & 0 & 2 \end{bmatrix}, \quad A_3 = \begin{bmatrix} 1 & 2 & 7 \\ 2 & 1 & 7 \\ 3 & 1 & 0 \end{bmatrix}

Calculate their determinants:

A1=7111227102+37101=7(3)2(14)+3(7)=2128+21=14|A_1| = 7\begin{vmatrix} 1 & -1 \\ 1 & 2 \end{vmatrix} - 2\begin{vmatrix} 7 & -1 \\ 0 & 2 \end{vmatrix} + 3\begin{vmatrix} 7 & 1 \\ 0 & 1 \end{vmatrix} = 7(3) - 2(14) + 3(7) = 21 - 28 + 21 = 14

A2=1710272132+32730=1(14)7(7)+3(21)=144963=98|A_2| = 1\begin{vmatrix} 7 & -1 \\ 0 & 2 \end{vmatrix} - 7\begin{vmatrix} 2 & -1 \\ 3 & 2 \end{vmatrix} + 3\begin{vmatrix} 2 & 7 \\ 3 & 0 \end{vmatrix} = 1(14) - 7(7) + 3(-21) = 14 - 49 - 63 = -98

A3=1171022730+72131=1(7)2(21)+7(1)=7+427=28|A_3| = 1\begin{vmatrix} 1 & 7 \\ 1 & 0 \end{vmatrix} - 2\begin{vmatrix} 2 & 7 \\ 3 & 0 \end{vmatrix} + 7\begin{vmatrix} 2 & 1 \\ 3 & 1 \end{vmatrix} = 1(-7) - 2(-21) + 7(-1) = -7 + 42 - 7 = 28

Now, apply Cramer's rule:

x=A1A=1414=1x = \frac{|A_1|}{|A|} = \frac{14}{-14} = -1 y=A2A=9814=7y = \frac{|A_2|}{|A|} = \frac{-98}{-14} = 7 z=A3A=2814=2z = \frac{|A_3|}{|A|} = \frac{28}{-14} = -2

Therefore, the solution is x=1x = -1, y=7y = 7, and z=2z = -2.

Mwalimu

Unasoma somo hili? Niulize nikuelezee chochote kilichomo.

Ingia ili kumuuliza Mwalimu wa AI wa Sonza kuhusu mada hii.

Ingia ili kuuliza

Majadiliano

Hakuna maswali bado

Ingia ili kuuliza
Inapakia majadiliano…