Matrices & Determinant. Grade 12 Mathematics: Matrices - Part C (Systems of Equations & Transformations) Subtopics Navigator - Pt. C Solving Systems with Matrices Gaussian Elimination Cramer's Rule Geometric Transformations Eigenvalues and Eigenvectors Advanced Applications Cumulative Exercises Conclusion Lesson Objectives Solve systems of linear equations using matrix methods Apply Gaussian elimination to solve systems Use Cramer's Rule for solving systems Understand geometric transformations using matrices Introduce eigenvalues and eigenvectors Apply matrices to real-world problems Systems of Equations with Matrices Matrices provide powerful methods for solving systems of linear equations. A system of equations can be written in matrix form as AX = B, where: A is the coefficient matrix X is the variable matrix B is the constant matrix The solution is given by X = A⁻¹B, provided A is invertible. Example 1: Solving a 3×3 System Solve the system: 2x + y - z = 7 x - 3y + 2z = 1 3x + 2y - 4z = 5 Step 1: Write in matrix form AX = B [latex]begin{bmatrix} 2 & 1 & -1 \ 1 & -3 & 2 \ 3 & 2 & -4 end{bmatrix} begin{bmatrix} x \ y \ z end{bmatrix} = begin{bmatrix} 7 \ 1 \ 5 end{bmatrix}[/latex] Step 2: Find A⁻¹ (using methods from Part B) |A| = 2(12-4) - 1(-4-6) - 1(2+9) = 2(8) - 1(-10) - 1(11) = 16 + 10 - 11 = 15 A⁻¹ = (1/15)[latex]begin{bmatrix} 8 & 2 & -1 \ 10 & -5 & 5 \ 11 & -1 & -7 end{bmatrix}[/latex] Step 3: Solve X = A⁻¹B [latex]begin{bmatrix} x \ y \ z end{bmatrix} = frac{1}{15} begin{bmatrix} 8 & 2 & -1 \ 10 & -5 & 5 \ 11 & -1 & -7 end{bmatrix} begin{bmatrix} 7 \ 1 \ 5 end{bmatrix} = frac{1}{15} begin{bmatrix} 56+2-5 \ 70-5+25 \ 77-1-35 end{bmatrix} = frac{1}{15} begin{bmatrix} 53 \ 90 \ 41 end{bmatrix}[/latex] Solution: x = 53/15, y = 6, z = 41/15 Exercises (Solving Systems) Solve using matrices: 3x + 2y = 8, x - y = 1 Write the system 2x + 3y - z = 4, x - y + 2z = 3, 3x + y + z = 7 in matrix form What condition must be satisfied for AX = B to have a unique solution? Gaussian Elimination Gaussian elimination is a systematic method for solving systems of linear equations by transforming the augmented matrix into row-echelon form through elementary row operations: Swapping two rows Multiplying a row by a non-zero constant Adding a multiple of one row to another row Example 2: Gaussian Elimination Solve the system using Gaussian elimination: 2x + y - z = 3 x - 2y + 3z = 1 3x + y + 2z = 7 Step 1: Write the augmented matrix [latex]left[begin{array}{ccc|c} 2 & 1 & -1 & 3 \ 1 & -2 & 3 & 1 \ 3 & 1 & 2 & 7 end{array}right][/latex] Step 2: Perform row operations to get row-echelon form R₁ ↔ R₂: [latex]left[begin{array}{ccc|c} 1 & -2 & 3 & 1 \ 2 & 1 & -1 & 3 \ 3 & 1 & 2 & 7 end{array}right][/latex] R₂ → R₂ - 2R₁: [latex]left[begin{array}{ccc|c} 1 & -2 & 3 & 1 \ 0 & 5 & -7 & 1 \ 3 & 1 & 2 & 7 end{array}right][/latex] R₃ → R₃ - 3R₁: [latex]left[begin{array}{ccc|c} 1 & -2 & 3 & 1 \ 0 & 5 & -7 & 1 \ 0 & 7 & -7 & 4 end{array}right][/latex] R₃ → R₃ - (7/5)R₂: [latex]left[begin{array}{ccc|c} 1 & -2 & 3 & 1 \ 0 & 5 & -7 & 1 \ 0 & 0 & 14/5 & 13/5 end{array}right][/latex] Step 3: Back substitution From R₃: (14/5)z = 13/5 ⇒ z = 13/14 From R₂: 5y - 7(13/14) = 1 ⇒ 5y - 13/2 = 1 ⇒ 5y = 15/2 ⇒ y = 3/2 From R₁: x - 2(3/2) + 3(13/14) = 1 ⇒ x - 3 + 39/14 = 1 ⇒ x = 1 + 3 - 39/14 = 4 - 39/14 = 17/14 Solution: x = 17/14, y = 3/2, z = 13/14 Gaussian Elimination Solve using Gaussian elimination: x + y + z = 6, 2x - y + z = 3, x + 2y - z = 2 What is the difference between row-echelon form and reduced row-echelon form? When does Gaussian elimination indicate that a system has no solution? Cramer's Rule Cramer's Rule provides a direct method for solving systems of linear equations using determinants. For a system AX = B, where A is an n×n invertible matrix, the solution is given by: [latex]x_i = frac{|A_i|}{|A|}[/latex] where Aᵢ is the matrix formed by replacing the i-th column of A with the column vector B. Example 3: Cramer's Rule for 3×3 System Solve using Cramer's Rule: 2x + y - z = 3 x - 2y + 3z = 1 3x + y + 2z = 7 Step 1: Find |A| [latex]A = begin{bmatrix} 2 & 1 & -1 \ 1 & -2 & 3 \ 3 & 1 & 2 end{bmatrix}[/latex] |A| = 2(-4-3) - 1(2-9) - 1(1+6) = 2(-7) - 1(-7) - 1(7) = -14 + 7 - 7 = -14 Step 2: Find |Aₓ| (replace first column with B) [latex]A_x = begin{bmatrix} 3 & 1 & -1 \ 1 & -2 & 3 \ 7 & 1 & 2 end{bmatrix}[/latex] |Aₓ| = 3(-4-3) - 1(2-21) - 1(1+14) = 3(-7) - 1(-19) - 1(15) = -21 + 19 - 15 = -17 Step 3: Find |Aᵧ| (replace second column with B) [latex]A_y = begin{bmatrix} 2 & 3 & -1 \ 1 & 1 & 3 \ 3 & 7 & 2 end{bmatrix}[/latex] |Aᵧ| = 2(2-21) - 3(2-9) - 1(7-3) = 2(-19) - 3(-7) - 1(4) = -38 + 21 - 4 = -21 Step 4: Find |A_z| (replace third column with B) [latex]A_z = begin{bmatrix} 2 & 1 & 3 \ 1 & -2 & 1 \ 3 & 1 & 7 end{bmatrix}[/latex] |A_z| = 2(-14-1) - 1(7-3) + 3(1+6) = 2(-15) - 1(4) + 3(7) = -30 - 4 + 21 = -13 Step 5: Apply Cramer's Rule x = |Aₓ|/|A| = (-17)/(-14) = 17/14 y = |Aᵧ|/|A| = (-21)/(-14) = 3/2 z = |A_z|/|A| = (-13)/(-14) = 13/14 Solution: x = 17/14, y = 3/2, z = 13/14 (matches Example 2) Cramer's Rule Solve using Cramer's Rule: 3x + 2y = 7, x - y = 1 What is the main limitation of Cramer's Rule? Why must the determinant of A be non-zero for Cramer's Rule to work? Geometric Transformations Matrices can represent geometric transformations in 2D and 3D space. Common transformations include: Transformation 2D Matrix Effect Rotation (θ) [latex]begin{bmatrix} costheta & -sintheta \ sintheta & costheta end{bmatrix}[/latex] Rotates points by angle θ Scaling [latex]begin{bmatrix} s_x & 0 \ 0 & s_y end{bmatrix}[/latex] Scales by factors sₓ and sᵧ Reflection (x-axis) [latex]begin{bmatrix} 1 & 0 \ 0 & -1 end{bmatrix}[/latex] Reflects over x-axis Shear [latex]begin{bmatrix} 1 & k \ 0 & 1 end{bmatrix}[/latex] Shears parallel to x-axis Example 4: Composite Transformation Find the matrix that represents a rotation of 90° counterclockwise followed by a reflection over the x-axis. Step 1: Rotation matrix for 90° [latex]R = begin{bmatrix} cos 90^circ & -sin 90^circ \ sin 90^circ & cos 90^circ end{bmatrix} = begin{bmatrix} 0 & -1 \ 1 & 0 end{bmatrix}[/latex] Step 2: Reflection matrix over x-axis [latex]F = begin{bmatrix} 1 & 0 \ 0 & -1 end{bmatrix}[/latex] Step 3: Composite transformation (apply reflection after rotation) [latex]T = F times R = begin{bmatrix} 1 & 0 \ 0 & -1 end{bmatrix} begin{bmatrix} 0 & -1 \ 1 & 0 end{bmatrix} = begin{bmatrix} 0 & -1 \ -1 & 0 end{bmatrix}[/latex] Step 4: Apply to point (1, 2) [latex]begin{bmatrix} 0 & -1 \ -1 & 0 end{bmatrix} begin{bmatrix} 1 \ 2 end{bmatrix} = begin{bmatrix} -2 \ -1 end{bmatrix}[/latex] The point (1, 2) transforms to (-2, -1) Geometric Transformations Find the matrix for a 45° rotation counterclockwise What transformation does the matrix [latex]begin{bmatrix} 2 & 0 \ 0 & 2 end{bmatrix}[/latex] represent? Find the image of point (3, 1) under reflection over the y-axis Eigenvalues and Eigenvectors For a square matrix A, a non-zero vector v is an eigenvector if Av = λv for some scalar λ, which is called the eigenvalue corresponding to v. To find eigenvalues, solve the characteristic equation: |A - λI| = 0 For each eigenvalue, find eigenvectors by solving (A - λI)v = 0 Example 5: Finding Eigenvalues and Eigenvectors Find the eigenvalues and eigenvectors of [latex]A = begin{bmatrix} 2 & 1 \ 1 & 2 end{bmatrix}[/latex] Step 1: Set up characteristic equation |A - λI| = 0 [latex]A - lambda I = begin{bmatrix} 2-lambda & 1 \ 1 & 2-lambda end{bmatrix}[/latex] |A - λI| = (2-λ)² - 1 = λ² - 4λ + 3 = 0 Step 2: Solve for eigenvalues λ² - 4λ + 3 = 0 ⇒ (λ - 1)(λ - 3) = 0 ⇒ λ = 1 or λ = 3 Step 3: Find eigenvector for λ = 1 [latex](A - I)v = begin{bmatrix} 1 & 1 \ 1 & 1 end{bmatrix} begin{bmatrix} x \ y end{bmatrix} = begin{bmatrix} 0 \ 0 end{bmatrix}[/latex] x + y = 0 ⇒ y = -x ⇒ v₁ = [latex]begin{bmatrix} 1 \ -1 end{bmatrix}[/latex] (or any scalar multiple) Step 4: Find eigenvector for λ = 3 [latex](A - 3I)v = begin{bmatrix} -1 & 1 \ 1 & -1 end{bmatrix} begin{bmatrix} x \ y end{bmatrix} = begin{bmatrix} 0 \ 0 end{bmatrix}[/latex] -x + y = 0 ⇒ y = x ⇒ v₂ = [latex]begin{bmatrix} 1 \ 1 end{bmatrix}[/latex] (or any scalar multiple) Eigenvalues: λ = 1, 3 Eigenvectors: [latex]begin{bmatrix} 1 \ -1 end{bmatrix}[/latex] for λ=1, [latex]begin{bmatrix} 1 \ 1 end{bmatrix}[/latex] for λ=3 Eigenvalues and Eigenvectors Find eigenvalues of [latex]begin{bmatrix} 3 & 1 \ 2 & 2 end{bmatrix}[/latex] What does it mean if 0 is an eigenvalue of a matrix? Find an eigenvector for the larger eigenvalue in question 1 Advanced Applications Matrices have numerous advanced applications: Computer Graphics - 3D transformations, rotations, scaling Quantum Mechanics - State vectors and operators Google PageRank - Web page ranking algorithm Structural Engineering - Stress analysis and stability Economics - Input-output models, Markov chains Data Science - Principal Component Analysis (PCA) Example 6: Markov Chain Application A market analysis shows that each year, 90% of Android users stay with Android, while 10% switch to iPhone. Similarly, 85% of iPhone users stay with iPhone, while 15% switch to Android. If currently 60% use Android and 40% use iPhone, what will be the distribution after 2 years? Step 1: Create transition matrix [latex]P = begin{bmatrix} 0.9 & 0.15 \ 0.1 & 0.85 end{bmatrix}[/latex] (Android→Android, iPhone→Android in first row) Step 2: Initial state vector [latex]X_0 = begin{bmatrix} 0.6 \ 0.4 end{bmatrix}[/latex] Step 3: Distribution after 1 year [latex]X_1 = P X_0 = begin{bmatrix} 0.9 & 0.15 \ 0.1 & 0.85 end{bmatrix} begin{bmatrix} 0.6 \ 0.4 end{bmatrix} = begin{bmatrix} 0.54 + 0.06 \ 0.06 + 0.34 end{bmatrix} = begin{bmatrix} 0.6 \ 0.4 end{bmatrix}[/latex] Interesting - this is a steady state! Step 4: After 2 years [latex]X_2 = P X_1 = P begin{bmatrix} 0.6 \ 0.4 end{bmatrix} = begin{bmatrix} 0.6 \ 0.4 end{bmatrix}[/latex] (same as before) Conclusion: The distribution remains stable at 60% Android, 40% iPhone Exercises (Applications) Create a transition matrix for a simple weather model (sunny/rainy) How are matrices used in computer graphics transformations? What is the significance of eigenvalues in principal component analysis? Cumulative Exercises Solve the system using matrix inversion: 2x + 3y = 7, x - 2y = -3 Use Gaussian elimination to solve: x + 2y - z = 4, 2x - y + 3z = 1, 3x + y + 2z = 7 Apply Cramer's Rule to solve: 3x - y = 5, 2x + 3y = 7 Find the transformation matrix for a 30° rotation counterclockwise Calculate the eigenvalues of [latex]begin{bmatrix} 4 & 1 \ 2 & 3 end{bmatrix}[/latex] Find the image of point (2, -1) under reflection over the line y = x Solve the system using any method: 2x + y = 5, 4x + 2y = 10. What does the result indicate? Find the matrix that represents a scaling by 2 in x-direction and 3 in y-direction Prove that if λ is an eigenvalue of A, then λ² is an eigenvalue of A² Create a real-world problem that can be solved using matrices and solve it Show/Hide Answers Problem: Solve the system using matrix inversion: 2x + 3y = 7, x - 2y = -3 Step 1: [latex]begin{bmatrix} 2 & 3 \ 1 & -2 end{bmatrix} begin{bmatrix} x \ y end{bmatrix} = begin{bmatrix} 7 \ -3 end{bmatrix}[/latex] Step 2: |A| = (2)(-2) - (3)(1) = -4 - 3 = -7 Step 3: A⁻¹ = (1/-7)[latex]begin{bmatrix} -2 & -3 \ -1 & 2 end{bmatrix}[/latex] Step 4: [latex]begin{bmatrix} x \ y end{bmatrix} = frac{1}{-7} begin{bmatrix} -2 & -3 \ -1 & 2 end{bmatrix} begin{bmatrix} 7 \ -3 end{bmatrix} = frac{1}{-7} begin{bmatrix} -14+9 \ -7-6 end{bmatrix} = frac{1}{-7} begin{bmatrix} -5 \ -13 end{bmatrix} = begin{bmatrix} 5/7 \ 13/7 end{bmatrix}[/latex] Answer: x = 5/7, y = 13/7 Problem: Use Gaussian elimination to solve: x + 2y - z = 4, 2x - y + 3z = 1, 3x + y + 2z = 7 Step 1: Augmented matrix: [latex]left[begin{array}{ccc|c} 1 & 2 & -1 & 4 \ 2 & -1 & 3 & 1 \ 3 & 1 & 2 & 7 end{array}right][/latex] Step 2: R₂ → R₂ - 2R₁: [latex]left[begin{array}{ccc|c} 1 & 2 & -1 & 4 \ 0 & -5 & 5 & -7 \ 3 & 1 & 2 & 7 end{array}right][/latex] Step 3: R₃ → R₃ - 3R₁: [latex]left[begin{array}{ccc|c} 1 & 2 & -1 & 4 \ 0 & -5 & 5 & -7 \ 0 & -5 & 5 & -5 end{array}right][/latex] Step 4: R₃ → R₃ - R₂: [latex]left[begin{array}{ccc|c} 1 & 2 & -1 & 4 \ 0 & -5 & 5 & -7 \ 0 & 0 & 0 & 2 end{array}right][/latex] Step 5: The last row gives 0 = 2, which is impossible Answer: The system has no solution (inconsistent) Problem: Apply Cramer's Rule to solve: 3x - y = 5, 2x + 3y = 7 Step 1: |A| = (3)(3) - (-1)(2) = 9 + 2 = 11 Step 2: |Aₓ| = determinant with x-column replaced: [latex]begin{vmatrix} 5 & -1 \ 7 & 3 end{vmatrix} = (5)(3) - (-1)(7) = 15 + 7 = 22[/latex] Step 3: |Aᵧ| = determinant with y-column replaced: [latex]begin{vmatrix} 3 & 5 \ 2 & 7 end{vmatrix} = (3)(7) - (5)(2) = 21 - 10 = 11[/latex] Step 4: x = |Aₓ|/|A| = 22/11 = 2, y = |Aᵧ|/|A| = 11/11 = 1 Answer: x = 2, y = 1 Problem: Find the transformation matrix for a 30° rotation counterclockwise Step 1: Rotation matrix: [latex]begin{bmatrix} costheta & -sintheta \ sintheta & costheta end{bmatrix}[/latex] Step 2: cos 30° = √3/2 ≈ 0.866, sin 30° = 1/2 = 0.5 Step 3: [latex]begin{bmatrix} 0.866 & -0.5 \ 0.5 & 0.866 end{bmatrix}[/latex] Answer: [latex]begin{bmatrix} sqrt{3}/2 & -1/2 \ 1/2 & sqrt{3}/2 end{bmatrix}[/latex] Problem: Calculate the eigenvalues of [latex]begin{bmatrix} 4 & 1 \ 2 & 3 end{bmatrix}[/latex] Step 1: Characteristic equation: |A - λI| = 0 Step 2: [latex]begin{vmatrix} 4-lambda & 1 \ 2 & 3-lambda end{vmatrix} = (4-lambda)(3-lambda) - (1)(2) = 0[/latex] Step 3: λ² - 7λ + 12 - 2 = λ² - 7λ + 10 = 0 Step 4: (λ - 2)(λ - 5) = 0 ⇒ λ = 2 or λ = 5 Answer: λ = 2, 5 Problem: Find the image of point (2, -1) under reflection over the line y = x Step 1: Reflection matrix over y = x: [latex]begin{bmatrix} 0 & 1 \ 1 & 0 end{bmatrix}[/latex] Step 2: [latex]begin{bmatrix} 0 & 1 \ 1 & 0 end{bmatrix} begin{bmatrix} 2 \ -1 end{bmatrix} = begin{bmatrix} -1 \ 2 end{bmatrix}[/latex] Answer: (-1, 2) Problem: Solve the system using any method: 2x + y = 5, 4x + 2y = 10 Step 1: Notice the second equation is exactly twice the first equation Step 2: This means the equations are dependent (the same line) Step 3: The system has infinitely many solutions Answer: Infinitely many solutions (dependent system) Problem: Find the matrix that represents a scaling by 2 in x-direction and 3 in y-direction Step 1: Scaling matrix: [latex]begin{bmatrix} s_x & 0 \ 0 & s_y end{bmatrix}[/latex] Step 2: With sₓ = 2, sᵧ = 3: [latex]begin{bmatrix} 2 & 0 \ 0 & 3 end{bmatrix}[/latex] Answer: [latex]begin{bmatrix} 2 & 0 \ 0 & 3 end{bmatrix}[/latex] Problem: Prove that if λ is an eigenvalue of A, then λ² is an eigenvalue of A² Step 1: If λ is an eigenvalue of A, then Av = λv for some eigenvector v Step 2: Multiply both sides by A: A(Av) = A(λv) ⇒ A²v = λ(Av) Step 3: Substitute Av = λv: A²v = λ(λv) = λ²v Step 4: Therefore, λ² is an eigenvalue of A² with the same eigenvector v Answer: Proven as shown above Problem: Create a real-world problem that can be solved using matrices and solve it Answer: Answers will vary. Example: A store sells apples for $0.50 each and oranges for $0.75 each. On Monday, they sold 100 apples and 80 oranges. On Tuesday, they sold 120 apples and 90 oranges. Use matrices to find the total revenue for each day. Conclusion/Recap In this final part of our matrices series, we've explored advanced applications including solving systems of equations using various methods (matrix inversion, Gaussian elimination, Cramer's Rule), geometric transformations, eigenvalues and eigenvectors, and real-world applications. Matrices are powerful mathematical tools with applications across numerous fields from computer graphics to economics. Mastering these concepts provides a strong foundation for further study in mathematics, engineering, and data science. Clip It! Share your ANSWER in the Chat. Indicate TITLE e.g Linear Equation 1. .....2. e.t.c