Linear Equations Lecture 7 PDF
Document Details
Uploaded by GoodGreekArt
Badr University in Assuit
Dr. Hesham Khalaf
Tags
Summary
This document presents a lecture on systems of linear equations, focusing on methods like matrix inversion and Gaussian elimination. It details the formation of matrices representing such systems, and exemplifies their solutions. The target audience appears to be undergraduate students in Biotechnology.
Full Transcript
# BUA Faculty of Biotechnology ## Mathematics (F/R-003) ### System of Linear Equations Dr. Hesham Khalaf [email protected] ## Solution of System of Linear Equation by Matrix Method We now study how to find the solution of system of *m* linear equations in *n* unknowns. Consider the system of...
# BUA Faculty of Biotechnology ## Mathematics (F/R-003) ### System of Linear Equations Dr. Hesham Khalaf [email protected] ## Solution of System of Linear Equation by Matrix Method We now study how to find the solution of system of *m* linear equations in *n* unknowns. Consider the system of equations in unknowns X1, X2, X3, ..., Xn as $a_{11} X_1 + a_{12} X_2 + a_{13} X_3 + ... + a_{1n} X_n = b_1$ $a_{21} X_1 + a_{22} X_2 + a_{23} X_3 + ... + a_{2n} X_n = b_2$ ... ... $a_{n1} X_1 + a_{n2} X_2 + a_{n3} X_3 + ... + a_{nn} X_n = b_n$ is called system of linear equations with *n* unknowns X1, X2, X3, ..., Xn. If the constants b1, b2, b3, ..., bn are all zero then the system is said to be **homogeneous** type. ## The above system can be put in the matrix form as **AX = B** Where A = $\begin{bmatrix} a_{11} & a_{12} & ... & a_{1n} \\ a_{21} & a_{22} & ... & a_{2n} \\ ... & ... & ... & ... \\ a_{n1} & a_{n2} & ... & a_{nn} \\ \end{bmatrix}$ X = $\begin{bmatrix} X_1 \\ X_2 \\ ... \\ X_n \\ \end{bmatrix}$ B = $\begin{bmatrix} b_1 \\ b_2 \\ ... \\ b_n \\ \end{bmatrix}$ The matrix A = $[a_{ij}]_{n \times n}$ is called coefficient matrix, the matrix X is called matrix of unknowns and B is called as matrix of constants, matrices X and B are of order n × 1. ### Definition : **(Consistent)** A set of values X1, X2, X3, ..., Xn of which satisfy all these equations simultaneously is called the solution of the system. If the system has at least one solution then the equations are said to be Consistent otherwise they are said to be inconsistent. ## Methods of solving system of linear Equations **1- Method of inversesion** Consider the matrix equation **AX = B** where **|A| ≠ 0** Pre multiplying by **A**<sup>-1</sup>, we have **A**<sup>-1</sup>(**AX**) = **A**<sup>-1</sup>**B** **X = A**<sup>-1</sup>**B** Thus AX = B, has only one solution if |A| ≠ 0 and is given by X = A<sup>-1</sup>B. **2- Using Elementary row operations : (Gaussian Elimination)** Suppose the coefficient matrix is of the type *m* × *n*. That is we have *m* equations in *n* unknowns Write matrix [A|B] and reduce it to Echelon augmented form by applying elementary row transformations only. Where [A|B] is called the augmented matrix of A by B. ## EXAMPLE Solve the following system of linear equations by A<sup>-1</sup>: a) -x + y + 2z = 2, x + 2y + 3z = 5, 3x + y + z = 4 b) x + y + z = 4, x + 2y - z = 1, 2x - y + z = 3 ### Solution #### **a)** The equation of system can be put in the matrix form as **AX = B ⇒ X = A<sup>-1</sup>B** Where A = $\begin{bmatrix} -1 & 1 & 2 \\ 1 & 2 & 3 \\ 3 & 1 & 1 \\ \end{bmatrix}$ X = $\begin{bmatrix} x \\ y \\ z \end{bmatrix}$ B = $\begin{bmatrix} 2 \\ 5 \\ 4 \end{bmatrix}$ Since A<sup>-1</sup> = $\begin{bmatrix} 1 & -1 & 1 \\ -8 & 7 & -5 \\ 5 & -4 & 3 \end{bmatrix}$ Then X = $\begin{bmatrix} x \\ y \\ z \end{bmatrix}$ = A<sup>-1</sup>B = $\begin{bmatrix} 1 & -1 & 1 \\ -8 & 7 & -5 \\ 5 & -4 & 3 \end{bmatrix}$ $\begin{bmatrix} 2 \\ 5 \\ 4 \end{bmatrix}$ = $\begin{bmatrix} 1 \\ -1 \\ 2 \end{bmatrix}$ x = 1, y = -1, z = 2 #### **b)** The equation of system can be put in the matrix form as **AX = B ⇒ X = A<sup>-1</sup>B** Where A = $\begin{bmatrix} 1 & 1 & 1 \\ 1 & 2 & -1 \\ 2 & -1 & 1 \\ \end{bmatrix}$ X = $\begin{bmatrix} x \\ y \\ z \end{bmatrix}$ B = $\begin{bmatrix} 4 \\ 1 \\ 3 \end{bmatrix}$ |A| = $\begin{vmatrix} 1 & 1 & 1 \\ 1 & 2 & -1 \\ 2 & -1 & 1 \\ \end{vmatrix}$ = (1) – (3) + (-5) = -7 ≠ 0 adj(A) = $\begin{bmatrix} +(1) & -(3) & +(-5) \\ -(2) & +(-1) & -(-3) \\ +(1) & -(-2) & +(1) \\ \end{bmatrix}$<sup>t</sup> = $\begin{bmatrix} 1 & -3 & -5 \\ -2 & -1 & 3 \\ -3 & 2 & 1 \end{bmatrix}$<sup>t </sup>= $\begin{bmatrix} 1 & -2 & -3 \\ -3 & -1 & 2 \\ -5 & 3 & 1 \end{bmatrix}$ Then A<sup>-1</sup> = $\frac{1}{|A|}$ adj(A) = $\frac{1}{-7}$ $\begin{bmatrix} 1 & -2 & -3 \\ -3 & -1 & 2 \\ -5 & 3 & 1 \end{bmatrix}$ Thus X = $\begin{bmatrix} x \\ y \\ z \end{bmatrix}$ = A<sup>-1</sup>B = $\frac{1}{-7}$ $\begin{bmatrix} 1 & -2 & -3 \\ -3 & -1 & 2 \\ -5 & 3 & 1 \end{bmatrix}$ $\begin{bmatrix} 4 \\ 1 \\ 3 \end{bmatrix}$ = $\frac{1}{-7}$ $\begin{bmatrix} -7 \\ -7 \\ -14 \end{bmatrix}$ x = 1, y = 1, z = 2 ## EXAMPLE Solve the following system of linear equations by Gaussian Elimination: a) -x + y + 2z = 2, x + 2y + 3z = 5, 3x + y + z = 4 b) x + y + z = 4, x + 2y - z = 1, 2x - y + z = 3 ### Solution #### **a)** The equation of system can be put in the matrix form as **AX = B** Where A = $\begin{bmatrix} -1 & 1 & 2 \\ 1 & 2 & 3 \\ 3 & 1 & 1 \\ \end{bmatrix}$ X = $\begin{bmatrix} x \\ y \\ z \end{bmatrix}$ B = $\begin{bmatrix} 2 \\ 5 \\ 4 \end{bmatrix}$ **Augmented matrix (Elementary row operations)** [A|B] = $\begin{bmatrix} -1 & 1 & 2 & 2\\ 1 & 2 & 3 & 5\\ 3 & 1 & 1 & 4\\ \end{bmatrix}$~ $\begin{bmatrix} -1 & 1 & 2 & 2\\ 0 & 3 & 5 & 7\\ 0 & 4 & 7 & 10\\ \end{bmatrix}$ ~ $\begin{bmatrix} -1 & 1 & 2 & 2\\ 0 & 1 & \frac{5}{3} & \frac{7}{3}\\ 0 & 0 & \frac{1}{3} & \frac{2}{3} \end{bmatrix}$ -x +y +2z = 2 Then $\frac{5}{3}$y + $\frac{5}{3}$z = $\frac{7}{3}$ ⇒ z = 2 ⇒ y = -1 ⇒ x = 1 $\frac{1}{3}z = \frac{2}{3}$ #### **b)** The equation of system can be put in the matrix form as **AX = B** Where A = $\begin{bmatrix} 1 & 1 & 1 \\ 1 & 2 & -1 \\ 2 & -1 & 1 \\ \end{bmatrix}$ X = $\begin{bmatrix} x \\ y \\ z \end{bmatrix}$ B = $\begin{bmatrix} 4 \\ 1 \\ 3 \end{bmatrix}$ **Augmented matrix (Elementary row operations)** [A|B] = $\begin{bmatrix} 1 & 1 & 1 & 4\\ 1 & 2 & -1 & 1\\ 2 & -1 & 1 & 3\\ \end{bmatrix}$ ~ $\begin{bmatrix} 1 & 1 & 1 & 4\\ 0 & 1 & -2 & -3\\ 0 & -3 & -1 & -5\\ \end{bmatrix}$ ~ $\begin{bmatrix} 1 & 1 & 1 & 4\\ 0 & 1 & -2 & -3\\ 0 & 0 & -7 & -14\\ \end{bmatrix}$ Then x +y +z = 4 y - 2z = -3 -7z = -14 ⇒ z = 2 ⇒ y = 1 ⇒ x = 1 ## Theorem: A system of *n* equations in *n* unknowns represented by the matrix equation **AX = B** is (i) Unique solution if and only if **r(A|B) = r(A) = n**. (ii) Infinite solution if and only if **r(A|B) = r(A) < n**. (iii) No solution if and only if **r(A|B) ≠ r(A)** ## EXAMPLE 1. Use Gauss elimination to calculate the values of *t* to has the following system of linear equations; x + y + z = −2, x + 2y + 2z = 3t - 2, x + 2y + |t|z = t² (i) Unique solution and fine it. (ii) Infinite solution and then fine one. (iii) No solution. ## 2- Use Gauss elimination to calculate the values of *t* to has the following system of linear equations; x + y + tz = t², tx + y + z = 1, x + ty + z = t (i) Unique solution and fine it. (ii) Infinite solution and then fine one. (iii) No solution. ### Solution 1. The equation of system can be put in the matrix form as **AX = B** Where A = $\begin{bmatrix} 1 & 1 & 1 \\ 1 & 2 & 2 \\ 1 & 2 & |t| \end{bmatrix}$ X = $\begin{bmatrix} x \\ y \\ z \end{bmatrix}$ B = $\begin{bmatrix} -2 \\ 3t - 2 \\ t^2 \end{bmatrix}$ **Augmented matrix (Elementary row operations)** [A|B] = $\begin{bmatrix} 1 & 1 & 1 & -2\\ 1 & 2 & 2 & 3t - 2\\ 1 & 2 & |t| & t^2\\ \end{bmatrix}$ ~ $\begin{bmatrix} 1 & 1 & 1 & -2\\ 0 & 1 & 1 & 3t\\ 0 & 1 & |t| - 1 & t^2 + 2 \\ \end{bmatrix}$ ~ $\begin{bmatrix} 1 & 1 & 1 & -2\\ 0 & 1 & 1 & 3t\\ 0 & 0 & |t| - 2 & t^2 - 3t + 2 \\ \end{bmatrix}$ (i) Unique solution **if and only if** r(A|B) = r(A) = 3. Then |t| - 2 ≠ 0 ⇒ |t| ≠ 2 ⇒ t ≠ ±2 ⇒ t ∈ R - {±2} At t = 0 ⇒ x + y + z = -2 y + z = 0 - 2z = 2 ⇒ z = -1 ⇒ y = 1 ⇒ x = -2 (ii) Infinite solution **if and only if** r(A|B) = r(A) < 3 Then |t| - 2 = 0 and t² – 3t + 2 = 0 ⇒ t = ±2 and [t = 1 or t = 2] Thus t = 2 At t = 2 ⇒ x + y + z = -2) y + z = 6) ⇒ z = 6 - y ⇒ x = -8 Thus y ∈ R, Let; y = 1 ⇒ z = 5, x = −8 (iii) No solution **if and only if** r(A|B) ≠ r(A) Then |t| - 2 = 0 and t² – 3t + 2 ≠ 0 ⇒ t = ±2 and [t ≠ 1 or t ≠ 2] Thus t = -2 2. The equation of system can be put in the matrix form as **AX = B**, where A = $\begin{bmatrix} 1 & 1 & t \\ t & 1 & 1 \\ 1 & t & 1 \end{bmatrix}$ X = $\begin{bmatrix} x \\ y \\ z \end{bmatrix}$ B = $\begin{bmatrix} t^2 \\ 1 \\ t \end{bmatrix}$ **Augmented matrix (Elementary row operations)** [A|B] = $\begin{bmatrix} 1 & 1 & t & t^2 \\ t & 1 & 1 & 1 \\ 1 & t & 1 & t \end{bmatrix}$ ~ $\begin{bmatrix} 1 & 1 & t & t^2 \\ 0 & 1 - t & 1 - t^2 & 1 - t^3 \\ 0 & t - 1 & 1 - t & t - t^2 \end{bmatrix}$ ~ $\begin{bmatrix} 1 & 1 & t & t^2 \\ 0 & 1 - t & 1 - t^2 & 1 - t^3 \\ 0 & 0 & 2 - t - t^2 & 1 + t - t^2 - t^3 \end{bmatrix}$ (i) Unique solution **if and only if** r(A|B) = r(A) = 3. Then 2 – t - t²≠ 0 ⇒ t² + t − 2 ≠ 0 (t − 1)(t + 2) ≠ 0 ⇒ t ≠ 1 or t = −2 ⇒ t ∈ R – {−2,1} x +y = 0 At t = 0 ⇒ y + z = 1 2z = 1 ⇒ z = $\frac{1}{2}$ ⇒ y = $\frac{1}{2}$ ⇒ x = -$\frac{1}{2}$ (ii) Infinite solution **if and only if** r(A|B) = r(A) < 3 Then 2 – t− t²= 0 and 1 + t – t² – t³= 0 ⇒ [t = −2 or t = 1 ]and [1 + t - t² (1 + t) = 0] ⇒ [t = −2 or t = 1 ]and [(1+t)(1-t²) = 0] ⇒ [t = −2 or t = 1 ]and [t = −1 or t = 1] Thus t = 1 At t = 1 ⇒ x + y + z = 1 ⇒ z = 1 - x - y Thus x, y ∈ R, Let; x = 1, y = 1 ⇒ z = -1 (iii) No solution **if and only if** r(A|B) ≠ r(A) 2 – t− t²= 0 and 1 + t – t² – t³= 0 Then 2 – t- t²= 0 and 1 + t – t² – t³= 0 ≠ 0 ⇒ [t = −2 or t = 1 ]and [t ≠ −1 or t ≠ 1] Thus t = −2