* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Matrices and RRE Form Notation. R is the real numbers, C is the
Survey
Document related concepts
Rotation matrix wikipedia , lookup
Linear least squares (mathematics) wikipedia , lookup
Eigenvalues and eigenvectors wikipedia , lookup
Jordan normal form wikipedia , lookup
Determinant wikipedia , lookup
Singular-value decomposition wikipedia , lookup
Principal component analysis wikipedia , lookup
Four-vector wikipedia , lookup
Matrix (mathematics) wikipedia , lookup
Perron–Frobenius theorem wikipedia , lookup
Non-negative matrix factorization wikipedia , lookup
Orthogonal matrix wikipedia , lookup
Ordinary least squares wikipedia , lookup
Matrix calculus wikipedia , lookup
Cayley–Hamilton theorem wikipedia , lookup
Matrix multiplication wikipedia , lookup
Transcript
Matrices and RRE Form Notation. R is the real numbers, C is the complex numbers (we will only consider complex numbers towards the end of the course). “∈” is read as “an element of”. For instance, “x ∈ R” means that “x is an element of R”, which can also be said as “x is in the real numbers”. The expression S = {A | B} is read as “S is the set of all A such that B holds”. For instance, for a, b ∈ R with a ≤ b, the closed interval [a, b] in R can be defined as [a, b] = {x ∈ R | a ≤ x ≤ b}. Matrices An m × n matrix is an array a11 a12 · · · a21 a22 A= .. . am1 am2 · · · a1n a2n amn of real numbers aij . An m × n matrix has m rows and n columns. aij is the entry in the i-th row and j-th column. We often write A = (aij ). Rm is the set of all m × 1 column vectors with real coefficients. If v ∈ Rm , then v1 v2 v = .. . vm with v1 , . . . , vm ∈ R. Rn is the set of all 1 × n row vectors with real coefficients. If w ∈ Rn , then w = (w1 , . . . , wn ) with w1 , . . . , wn ∈ R. Both Rm and Rn have scalar multiplication (multiply all entries in the vector by a real number) and vector addition (add the entries in each component). Elementary row operations on a matrix A and Reduced Row Echelon Form There are three types of Elementary Row Operations on a matrix. They are: I. Interchange two rows. II. Multiply a row by a nonzero real number. III. Replace a row by its sum with a multiple of another (different) row. Definition 0.1. A matrix A is in row echeleon (RE) form if 1 i. The first nonzero entry (from the left) in each nonzero row is a 1. ii. If row k does not consist entirely of zeros, the number of leading zero entries (from the left) in row k + 1 is greater than the number of leading zeros in row k. iii. If there are rows whose entries are all zero, they are below the rows having nonzero entries. Definition 0.2. A matrix A is said to be in reduced row echelon (RRE) form if: i. The matrix is in row echelon form. ii. The first nonzero entry (from the left) in each row is the only nonzero entry in its column. Definition 0.3. Two matrices A and B are row equivalent if B can be obtained from A by a sequence of elementary row operations. If B can be obtained from A by a sequence of elementary row operations, then A can be obtained from B by performing (in opposite order) the elementary row operations which undo the elementary row operations used to obtain B from A. Theorem 0.4. Suppose that A is a matrix. Then A is row equivalent to a unique matrix which is in reduced row echelon form. A “leading one” of a matrix in RE form (or RRE form) is the first nonzero entry (which is necessarily a one) in a nonzero row. The following are examples of matrices in RRE form with circles around their leading ones. 1 0 2 3 1 0 0 1 1 0 3 0 0 1 2 4 , 1 0 0 , 1 2 0 0 0 1 0 0 0 0 0 0 Algorithm to put a matrix in RRE Form (1) Algorithm to put a matrix A in RE form. (a) Interchange rows of A until the element in the first row of the first nonzero column of A is nonzero. (b) Multiply the first row of A by a nonzero constant so that the element in the first row of the first nonzero column of A is a 1. (c) Add multiples of the first row of A to the lower rows of A to obtain that the first nonzero column of A has a one in its first row, and has zeros in every row below it. (d) Perform this algorithm on A with the first row removed. (2) Algorithm to put a matrix A which is in RE form into RRE form. Starting with the right most column, for every column which has a leading one, add multiples of the row containing this leading one to higher rows until all entries in the column above the leading one are zero. Example 0.5. Use the Algorithm matrix 0 A= 2 2 to put a matrix in RRE form to transform the 0 −2 0 7 12 4 −10 6 12 28 4 −5 6 −5 −1 into RRE form. 2 We first perform operation (1)(a) of the algorithm. interchange 0 0 −2 0 7 12 2 4 −10 6 12 28 rows 1 and 2 2 4 −10 6 12 28 0 0 −2 0 7 12 −→ 2 4 −5 6 −5 −1 2 4 −5 6 −5 −1 Now we perform (1)(b) and (1)(c). multiply row 1 add -2 times row 1 1 2 −5 3 6 14 1 2 −5 3 6 14 to row 3 by 21 0 0 −2 0 7 12 0 0 −2 0 7 12 −→ −→ 2 4 −5 6 −5 −1 0 0 5 0 −17 −29 Now we perform (1)(d), which tells us to start again with (1)(a), after removing the first row of the last matrix. We accomplish this by continuing to write the first row, but remember that we are done with it (for the first part of the algorithm which puts the matrix in RE form), and that we are performing the algorithm on the submatrix 0 0 −2 0 7 12 . 0 0 5 0 −17 −29 Thus the next iteration of the algorithm, applying (1)(b) to this submatrix, then performing (1)(c) yields Multiply row 2 Add -5 times row 2 1 2 −5 3 6 1 2 −5 3 6 14 by − 21 to row 3 7 0 0 1 0 − 72 −→ −→ 0 0 1 0 − 2 −6 0 0 5 0 −17 −29 0 0 0 0 12 Now we perform (1)(d), which tells us to start again with (1)(a), after removing the first two rows of the last matrix. We accomplish this by continuing to write the first two rows, but remember that we are done with them (for the first part of the algorithm which puts the matrix in RE form), and that we are performing the algorithm on the submatrix 0 0 0 0 12 1 . The next iteration of the algorithm, applying (1)(b) to this submatrix, yields Multiply row 3 1 2 −5 3 6 by 2 0 0 1 0 −7 −→ 2 0 0 0 0 1 14 −6 2 We have finished the first part of the algorithm, and have transformed A into RE form. Now we perform the second part of the algorithm which transforms this last matrix into RRE form. Add 27 times Add −6 times 1 2 −5 3 6 14 1 2 −5 3 0 2 row 3 to row 2 row 3 to row 1 0 0 1 0 0 1 0 0 1 0 0 1 −→ −→ 0 0 0 0 1 2 0 0 0 0 1 2 Add 5 times 1 2 0 3 0 7 row 2 to row 1 0 0 1 0 0 1 −→ 1 2 0 0 0 0 3 14 −6 1 The algorithm now ends with this final matrix which is in RRE form. It is the RRE form of A. We have circled the leading ones in the matrix. Linear Systems of Equations A linear system of m equations and n unknowns is a system (1) a11 x1 + a12 x2 + · · · + a1n xn a21 x1 + a22 x2 + · · · + a2n xn = b1 = b2 .. . am1 x1 + am2 x2 + · · · + amn xn = bm with aij and bi ∈ R. x1 , . . . , xn are the unknowns. The linear system (1) is called homogeneous if all of the bi are zero. The linear system (1) is called inhomogeneous if at least one of the bi is not zero. The coefficient matrix of the linear system (1) is the m × n matrix A = (aij ). The augmented matrix of (1) is the m × (n + 1) matrix (A|v) where v is the column vector b1 b2 v = .. ∈ Rm . . bm Theorem 0.6. Suppose that A is the (augmented) matrix of a linear system of equations, and B is obtained from A by a sequence of elementary row operations. Then the solutions to the system of linear equations corresponding to A and the system of linear equations corresponding to B are the same. To prove this theorem, it suffices (by induction) to verify it when B is obtained from A by a single elementary row operation. A linear system of equations has a unique solution, infinitely many solutions, or no solutions (the system is inconsistent). A homogeneous linear system of equations always has the “trivial solution” (all the xi are zero). Standard Form for writing a solution to a linear system of equations The standard form expresses the “lead variables” in terms of “free variables”. The system is consistent if and only if the solution column in a RE or RRE form of the augmented matrix of the system does not contain a leading one. Assuming that the system is consistent, in a RE (or RRE) form of the augmented matrix, the columns of the coefficient matrix containing a leading one correspond to lead variables. The columns of the coefficient matrix not containing a leading one correspond to free variables. The sum of the number of lead variables and free variables is the total number of variables in the system. To find the standard form of the solution to a linear system of equations, first put the augmented matrix in RRE form by performing elementary row ops. Then read off the solution by setting successive free variables equal to new variables. 4 Example 1. Find the Standard Form Solution to the system (2) x + y + 2z = 9 2x + 4y − 3z = 1 3x + 6y − 5z = 0. The augmented matrix of the system is 9 1 1 2 2 4 −3 1 A= 3 6 −5 0 Now put the matrix A in RRE form. Solution 1. Strictly follow the algorithm. 9 9 1 1 1 2 1 1 2 A = 2 4 −3 1 → 0 2 −7 −17 → 0 3 6 −5 0 0 3 −11 −27 0 9 9 1 1 2 1 1 2 → 0 1 − 7 − 17 → → 0 1 − 72 − 17 2 2 2 1 3 3 0 0 1 0 0 −2 −2 1 0 0 1 → 0 1 0 2 0 0 1 3 1 1 0 0 1 0 0 0 1 1 2 1 − 72 3 −11 Solution 2. Not strictly following the algorithm (sometimes you can 9 9 1 1 2 1 1 2 1 1 A = 2 4 −3 1 → 0 2 −7 −17 → 0 2 3 6 −5 0 0 3 −11 −27 0 1 9 9 1 1 2 1 1 2 1 0 → 0 1 −4 −10 → 0 1 −4 −10 → 0 1 3 0 2 −7 −17 0 0 1 0 0 1 0 0 1 1 0 6 19 0 1 0 2 0 1 0 2 → → 0 0 1 3 0 0 1 3 From either of the solutions we see that 1 B= 0 0 9 − 17 2 −27 3 2 3 avoid fractions). 9 2 −7 −17 −4 −10 19 6 −4 −10 3 1 the RRE form of A is 0 0 1 1 0 2 0 1 3 The system is consistent since the solution column of the RRE form B does not contain a leading 1. We see that x, y and z are the lead variables, and there are no (zero) free variables. We see that the standard form of the solutions to (2) is x = 1 y = 2 z = 3 5 Example 2. Find the Standard Form Solution to the system (3) x1 + 2x2 + 3x4 = 2 x1 + 2x2 + x3 + 7x4 = 3 x1 + 2x2 + 3x4 + x5 = 7. The augmented matrix of the system is 1 2 0 3 0 2 A = 1 2 1 7 0 3 1 2 0 3 1 7 The RRE form of A is 1 2 0 3 0 2 B = 0 0 1 4 0 1 0 0 0 0 1 5 The system is consistent since the solution column of the RRE form B does not contain a leading 1. We see that x1 , x3 and x5 are the lead variables, and x2 , x4 are the free variables. Setting x2 = t1 and x4 = t2 , we see that the standard form of the solutions to (3) is x1 = 2 − 2t1 − 3t2 x2 = t 1 x3 = 1 − 4t2 x4 = t 2 x5 = 5 with t1 , t2 ∈ R. We conclude that there are infinitely many solutions to the system (3). Example 3. Find the Standard Form Solution to the system (4) x1 + 2x2 + 3x3 = 2 x1 + 2x2 + x3 = 4 x1 + 2x2 + x3 = 1. The augmented matrix of the system is 1 2 3 2 A = 1 2 1 4 1 2 1 1 Subtracting the second row from the first, 1 B= 1 0 we see that A is row equivalent to 2 3 2 2 1 4 0 0 −3 the last column corresponds to the equation 0x1 +0x2 +0x3 = −3, or more simply, 0 = −3. This equation can never be satisfied, so we can already see that the system (4) has no solutions (is inconsistent). We can go further, and compute the RRE form of A, which is 1 2 0 0 0 0 1 0 . 1 0 0 0 6 There is a leading 1 in the last column of this RRE form of the augmented matrix, so the system is inconsistent (or observe that we have the equation 0 = 1 from the last row, so there can be no solutions). Standard Form Solution: There are no solutions. Example 4. Find the Standard Form Solution to the system (5) x1 + 2x2 + 3x4 = 0 x1 + 2x2 + x3 + 7x4 = 0 x1 + 2x2 + 3x4 + x5 = 0. This system is a homogeneous system (so it is consistent). To solve a homogeneous system, we need only work with the coefficient matrix of the system, which is 1 2 0 3 0 A = 1 2 1 7 0 . 1 2 0 3 1 The RRE form of A is 1 2 0 3 0 B= 0 0 1 4 0 0 0 0 0 1 We see that x1 , x3 and x5 are the lead variables, and x2 , x4 are the free variables. Setting x2 = t1 and x4 = t2 , we see that the standard form of the solutions to (5) is x1 x2 x3 x4 x5 = = = = = −2t1 − 3t2 t1 −4t2 t2 0 with t1 , t2 ∈ R. We conclude that there are infinitely many solutions to the homogeneous system (5). Theorem 0.7. An m×n homogeneous system of linear equations has a nontrivial solution if n > m. Proof. Let A be the RRE form of the matrix of the system. A has r ≤ m columns containing a leading one, so there are r ≤ m lead variables. There are n − r ≥ n − m > 0 free variables, so there is a nontrivial solution. 7