Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
MAST10007 Linear Algebra
Lecture Notes These notes have been made in accordance with the provisions of Part VB of the copyright act for teaching purposes of the University. These notes are for the use of students of the University of Melbourne enrolled in MAST10007 Linear Algebra. 1 Topic 1: Linear equations [AR 1.1 and 1.2] 1.1. Systems of linear equations. Row operations. 1.2. Reduction of systems to row-echelon form. 1.3. Reduction of systems to reduced row-echelon form. 1.4. Consistent and inconsistent systems. 2 1.1 Systems of linear equations. Row operations Linear equations Definition (Linear equation and linear system) A linear equation in n variables, x1, x2, . . . , xn, is an equation of the form a1x1 + a2x2 + · · ·+ anxn = b, where the coefficients a1, . . . , an and the constant term b are constants. A finite collection of linear equations in the variables x1, x2, . . . , xn is called a system of linear equations or a linear system. Example x1 + 5x2 + 6x3 = 100 x2 − x3 = −1 −x1 + x3 = 11 3 Definition (Homogeneous linear system) A system of linear equations is called homogeneous if all the constants on the right hand side are zero. Example x1 + 5x2 + 6x3 = 0 x2 − x3 = 0 −x1 + x3 = 0 Definition (Solution of a system of linear equations) A solution to a system of linear equations in the variables x1, . . . , xn is a set of values of these variables which satisfy every equation in the system. 4 Example 1. Data fitting using a polynomial Find the coefficients c , α, β, γ such that the cubic polynomial y = c + αx + βx2 + γx3 passes through the points specified below. x y −0.1 0.90483 0 1 0.1 1.10517 0.2 1.2214
Solution: Substituting the points (x , y) into the cubic polynomial gives: 5 Note: Solving such equations by hand can be tedious, so we can use a computer package such as MATLAB. 6 Example 2. (Revision) Solve the following linear system. 2x − y = 3 x + y = 0 Solution: Graphically Note: ◮ Need an accurate drawing. ◮ Not practical for three or more variables. 7 Elimination Note: Elimination of variables will always give a solution, but we need to do this systematically and not in an adhoc manner, for three or more variables. 8 Definition (Matrix) A matrix is a rectangular array of numbers. A m× n matrix has m rows and n columns. Definition (Coefficient matrix and augmented matrix) The coefficient matrix for a linear system is the matrix formed from the coefficients in the equations. The augmented matrix for a linear system is the matrix formed from the coefficients in the equations and the constant terms. These are usually separated by a vertical line. 9 Example 3. Write down a coefficient matrix and augmented matrix for the following linear system: 2x − y = 3 x + y = 0 Solution: 10 Row Operations To find the solutions of a linear system, we perform row operations to simplify the augmented matrix. An essential condition is that the row operations we perform do not change the set of solutions to the system. Definition (Elementary row operations) The elementary row operations are: 1. Interchanging two rows. 2. Multiplying a row by a non-zero constant. 3. Adding a multiple of one row to another row. Note: The matrices produced after each row operation are not equal but are equivalent, meaning that the solution set is the same for the system represented by each augmented matrix. We use the symbol ∼ to denote equivalence of matrices. 11 Example 4. Solve the following system using elementary row operations: 2x − y = 3 x + y = 0 Solution: 12 1.2 Reduction of systems to row-echelon form Definition (Leading entry) The first non-zero entry in each row of a matrix is called the leading entry. Definition (Row-echelon form) A matrix is in row-echelon form if: 1. For any non-zero two rows, the leading entry of the lower row is further to the right than the leading entry in the higher row. 2. Any rows that consist entirely of zeros are grouped together at the bottom of the matrix. Note: These conditions imply that in each column containing a leading entry, all entries below the leading entry are zero. 13 Examples[ 1 −2 3 4 5 ] row-echelon form 1 0 0 30 4 1 2 0 0 0 3 row-echelon form 0 0 0 2 4 0 0 3 1 6 0 0 0 0 0 2 −3 6 −4 9 not row-echelon form 14 Gaussian elimination Gaussian elimination is a systematic way to reduce a matrix to row-echelon form using row operations. Note: The row-echelon form obtained is not unique. Gaussian elimination 1. Interchange rows, if necessary, to bring a non-zero number to the top of the first column with a non-zero entry. 2. (Optional, but often useful.) Divide the first row by its leading entry to create a new leading entry 1. 3. Add suitable multiples of the top row to lower rows so that all entries below the leading entry are zero. 4. Start again at Step 1 applied to the matrix without the first row. To solve a linear system we read off the equations from the row-echelon matrix and then solve the equations to find the unknowns, starting with the last equation. This final step is called back substitution. 15 Example 5. Solve the following system of linear equations using Gaussian elimination: x − 3y + 2z = 11 2x − 3y − 2z = 13 4x − 2y + 5z = 31 Solution: Step 1. Write the system in augmented matrix form. 16 Step 2. Use elementary row operations to reduce the augmented matrix to row-echelon form. 17 Step 3. Read off the equations from the augmented matrix and use back substitution to solve for the unknowns, starting with the last equation. 18 1.3 Reduction of systems to reduced row-echelon form Definition (Reduced row-echelon form) A matrix is in reduced row-echelon form if the following three conditions are satisfied: 1. It is in row-echelon form. 2. Each leading entry is equal to 1 (called a leading 1). 3. In each column containing a leading 1, all other entries are zero. 19 Examples[ 1 −2 3 −4 5 ] reduced row-echelon form [ 1 2 0 0 0 1 ] reduced row-echelon form 1 0 0 30 1 1 2 0 0 0 3 is not in reduced row-echelon form 1 0 0 2 4 0 1 0 1 6 0 0 0 0 0 0 0 1 −4 9 is not in reduced row-echelon form 20 Gauss-Jordan elimination Gauss-Jordan elimination is a systematic way to reduce a matrix to reduced row-echelon form using row operations. Note: The reduced row-echelon form obtained is unique. Gauss-Jordan elimination 1. Use Gaussian elimination to reduce matrix to row-echelon form. 2. Multiply each non-zero row by an appropriate number to create a leading 1 (type 2 row operations). 3. Use row operations (of type 3) to create zeros above the leading entries. 21 Example 6. Solve the following system of linear equations using Gauss-Jordan elimination: x − 3y + 2z = 11 2x − 3y − 2z = 13 4x − 2y + 5z = 31 Solution: Step 1. Use Gaussian elimination to reduce the augmented matrix to row-echelon form. 22 Step 2. Divide rows by their leading entry. Step 3. Add multiples of the last row to the rows above to make the entries above its leading 1 equal to zero. 23 Step 4. Add multiples of the penultimate (2nd last) row to the rows above to make the entries above its leading 1 equal to zero. Step 5. Read off the answers. 24 1.4 Consistent and inconsistent systems Theorem A system of linear equations has zero solutions, one solution, or infinitely many solutions. There are no other possibilities. We say that the system is: ◮ inconsistent if it has no solutions. ◮ consistent if it has at least one solution. We can determine whether a system is consistent or inconsistent by reducing its augmented matrix to row-echelon form. Note: Every homogeneous linear system is consistent, since it always has at least one solution: x1 = 0, . . . , xn = 0. 25 Inconsistent systems Theorem The system is inconsistent if and only if there is at least one row in the row-echelon matrix having all entries equal to zero except for a non-zero final entry. Example 7. Solve the system with row-echelon form: 1 0 1 −20 2 2 4 0 0 0 −3 Solution: 26 Geometrically, an inconsistent system in 3 variables has no common point of intersection for the planes determined by the system. 27 Consistent systems Theorem Suppose we have a consistent linear system with n variables. ◮ If the row-reduced augmented matrix has exactly n non-zero rows, then the system has a unique solution. ◮ If the row-reduced augmented matrix has < n non-zero rows, then the system has infinitely many solutions. ◮ If r is the number of non-zero rows in the row-echelon form, then n − r parameters are needed to specify the solution set. More precisely, in the row-echelon form of the augmented matrix, there will be n− r columns which contain no leading entry. We can choose the variable corresponding to such a column arbitrarily. The values for the remaining variables are then uniquely determined. Note: r is called the rank of the augmented matrix. 28 Example 8. Solve the system with reduced row-echelon form: 1 0 0 20 1 0 −4 0 0 1 15 Solution: 29 Example 9. Solve the system with reduced row-echelon form: 1 2 0 0 5 1 0 0 1 0 6 2 0 0 0 1 7 3 0 0 0 0 0 0 Solution: 30 31 Geometrically, a consistent system in 3 variables has a common point, line or plane of intersection for the planes determined by the system. 32 Example 10. Calculating flows in networks At each node • we require sum of flows in = sum of flows out. Determine a, b, c and d in the following network.
33 Solution: 34 35 36 Note: ◮ x = t(−1, 1,−1, 1), t ∈ R is the general solution of the homogeneous linear system. ◮ x = (9, 1, 6, 0) is called a particular solution of the linear system. 37 Example 11. Find the values of a, b ∈ R for which the system x − 2y + z = 4 2x − 3y + z = 7 3x − 6y + az = b has (a) no solution, (b) a unique solution, (c) an infinite number of solutions. Solution: 38 39 Topic 2: Matrices and Determinants [AR 1.3–1.7, 2.1–2.4] 2.1 Matrix notation 2.2 Matrix operations 2.3 Matrix inverses 2.4 Elementary matrices 2.5 Linear systems revisited 2.6 Determinants