Linear Equations Gauss & Cramer’s by Dr. Shorouk Ossama
Non-Homogeneous System AX = b The system might has: One Solution = Unique Solution Infinite Solutions = non-trivial Solution No Solution = trivial solution (det A ≠ 0) .. .. Consistent .. In Consistent
Row 3 is impossible to be satisfied -2 R1 + R2 = R`2 - R1 + R3 = R`3 By Back Substation Row 3 is impossible to be satisfied 0 = 1 No Solution (-1/2) R2 + R3 = R`3 1 1 1 -1 3 3 -1 3 5 1 -1 2 2 2 1 1 -1 3 0 -4 1 -4 0 -2 3 -1 6 4 1 1 -1 3 0 -4 6 -4 0 0 0 1
Infinite Number of Solution -2 R1 + R2 = R`2 - R1 + R3 = R`3 By Back Substation Row 3 is consistent Row 2 is -4y+6z=2 Hence, y = -1/4 ( 2 – 6z ) From Row 1, X = 1 – y + z = 3/2 – ½ z Thus, z can take any value, say t So the full solution set is: (-1/2) R2 + R3 = R`3 1 1 1 -1 1 3 -1 3 5 1 -1 2 2 2 1 1 -1 1 0 -4 6 2 0 0 0 0 Infinite Number of Solution
Then y and x can be found by back substitution row2 and 1 Advantage of using gauss elimination more than cramer’s rule when the number of equations differs from the number of unknowns. -3 R1 + R2 = R`1 R1 + R3 = R`3 - R1 + R4 = R`4 Row 4 is consistent, while row 3 is implies z=3. Then y and x can be found by back substitution row2 and 1 So: y= 4 , x=0 (-1/2) R2 + R3 = R`3 1 1 1 -1 1 3 -1 3 5 -1 2 2 1 0 1 3 1 1 -1 1 0 -4 6 2 0 0 -2 -6 0 0 0 0 2 1 1 -1 1 0 -4 6 2 0 -2 3 0 0 -1 2 3/2
The system is inconsistent Show that the following equations are inconsistent: - R1 + R2 = R`2 3 R1 + R3 = R`3 Row 3, 0 ≠ 2 The system is inconsistent -2 R2 + R3 = R`3 1 1 1 12 1 1 0 -3 2 -3 3 0 0 0 0 -2 1 1 -1 2 1 1 -2 3 -1 4 3 -3 7 0 7 2 1 1 1 2 1 0 -3 2 -3 3 0 -6 4 -6 4
Determine the complete sets of values for a and b which make the equations : -2 R1 + R2 = R`2 R1 + R3 = R`3 System has unique solution if: a ≠ -1, then z= (b-1/a+1) 2. System is inconsistency if: a = -1 and b ≠ 1 3. System has infinite solutions If: a = -1 and b = 1 - R2 + R3 = R`3 1 1 -2 3 2 2 -1 2 3 1 a b 2 1 -2 3 1 0 3 -4 -1 0 0 a+1 b-1
Homogeneous Linear Systems: A system of linear equations is said to be homogeneous if the constant terms are all zero; that is, the system has the form: Every homogeneous system of linear equations is consistent because all such systems have x1=0,x2=0,…,xn=0 as a solution. This solution is called the trivial solution; if there are other solutions, they are called non-trivial solutions.
Because a homogeneous linear system always has the trivial solution, there are only two possibilities for its solutions: • The system has only the trivial solution. • The system has infinitely many solutions in addition to the trivial solution. In the special case of a homogeneous linear system of two equations in two unknowns, say: the graphs of the equations are lines through the origin, and the trivial solution corresponds to the point of intersection at the origin.
After solving the system, the corresponding system of equations is: Solving for the leading variables we obtain: Note that the trivial solution results when r = s = t = 0
Any set of equations AX=0 is known as a homogeneous set; it is a set of linear equations with zero right-hand sides. So the equations always have trivial solution x=o, but there may exist non-trivial solutions. What are the conditions for their existence.
We therefore have the following test: For Homogeneous equations AX = 0, where A is square: If det A = 0, there is an infinite number of non-trivial solutions. det A ≠ 0, No solution, (Trivial solution).
Homogeneous System AX = 0 The system might has: No Solution = Trivial Solution at det A ≠ 0 Infinite Solutions = non-trivial Solution at det A = 0 Note: If the matrix is non- square (n ≠ m) It is non-trivial Solution and used Gauss Elimination
Cramer’s Rule: a11 x1 + a12x2 = d1 a21 x1 + a22x2 = d2 The eliminated of x2 and x1 by this process leads to the solution This formula is known as Cramer’s Rule. If the denominator is zero then the two equations can have no solutions or an infinity of solutions.
Example: Solve The Equations x1 + 2x2 = 4 x1 - x2 = 1 Δ det A = = - 1 – 2 = -3 Δ1 = = -4 -2 = -6 Δ2 = = 1 - 4 = -3
Example: Solve The Equations x1 - 2x2 + x3 = -4 2x1 + x2 - x3 = -1 x1 + 3x2 + 2x3 = 7
+ - + Δ det A = = 1 x (2+3) +2 x (4+1) + 1 x (6-1) = 5 + 10 + 5 = 20 Δ1 = = -4 x (2+3) +2 x (-2+7) + 1 x (-3-7) = -20 +10 -10 = -20
Δ2 = = 1 x (-2+7) + 4 x (4+1) + 1 x ( 14+1) = 5 + 20 + 15 = 40 Δ3 = = Δ2 = = 1 x (-2+7) + 4 x (4+1) + 1 x ( 14+1) = 5 + 20 + 15 = 40 Δ3 = = 1 x (7+3) + 2 x (14+1) - 4 x ( 6-1) = 10 + 30 - 20 = 20 20 3 1 3
For two equations in two unknowns the occurrences of unique solutions are easy to detect. For higher-order sets of equations these possibilities are not so obvious. Consider the set of equations: det A = = zero
So the Cramer’s Rule will fail, although there still may be solutions. We can determine whether solutions exist more readily by using Gaussian Elimination. In this case the application of row operations on the augmented matrix leads to:
System is non-trivial solutions if and if only: - R1 + R2 = R`2 R1 + R3 = R`3 System is non-trivial solutions if and if only: a = 5, put z= t By back substitution Y – Z = 0 Y = z = t So, x = -y –z = -2t For any t the solution is non-trivial if t ≠ 0 4 R2 + R3 = R`3 1 1 1 1 0 1 2 0 0 -3 a 0 2 1 1 1 0 0 1 -1 0 0 0 a-5 0
Thanks
Example: the set of equation defined by: x1 + 2x2 + x3 = 1 - 2x1 + 3x2 - x3 = -7 x1 + 4x2 - 2x3 = -7 Where C11, C12 ,… are the cofactors of a11, a12, …..
This is Cramer’s Rule for 3 equations in unknowns This is Cramer’s Rule for 3 equations in unknowns. It is systematic in that, for x1, the determinant in the numerator has the first column of A replaced by d; for x2, the second column is replaced by d; and so on. The generalization to n linear equations in n unknown is fairly clear from this formula. It is a useful theoretical result, but not generally a recommended method of solving more than four equations in four unknown.
Gauss Elimination: We need write the equations in form of augmented matrix for the system. The fourth column consists of the constant on the right- hand sides.
The elementary operations referred to previously become elementary row operations on the matrix. The final matrix is said to be in echelon form: that is, it has zeros below the diagonal elements starting from the top left. We can solve the equations by back substation.
Examples For Echelon Form : The following matrices are in reduced row echelon form.
The following matrices are in row echelon form but not reduced row echelon form.