matrix calculations solutions of systems of linear
play

Matrix Calculations: Solutions of Systems of Linear Equations A. - PowerPoint PPT Presentation

Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems Matrix Calculations: Solutions of Systems of Linear Equations A. Kissinger Institute for Computing and


  1. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems Matrix Calculations: Solutions of Systems of Linear Equations A. Kissinger Institute for Computing and Information Sciences Radboud University Nijmegen Version: spring 2017 A. Kissinger Version: spring 2017 Matrix Calculations 1 / 47

  2. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems Outline Review: pivots and Echelon form Vectors and linear combinations Homogeneous systems Non-homogeneous systems A. Kissinger Version: spring 2017 Matrix Calculations 2 / 47

  3. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems Pivots • A pivot is the first non-zero entry of a row:   0 2 1 − 2   3 5 − 5 1   0 0 -2 2 • If a row is all zeros, it has no pivot :   0 2 1 − 2 3 5 − 5 1   0 0 0 0 We call this a zero row . A. Kissinger Version: spring 2017 Matrix Calculations 4 / 47

  4. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems Echelon form A matrix is in Echelon form if: 1 All of the rows with pivots occur before zero rows, and 2 Pivots always occur to the right of previous pivots   3 2 5 − 5 1  �   0 0 2 1 − 2     0 0 0 -2 2  0 0 0 0 0       3 2 5 − 5 1 3 2 5 − 5 1 3 2 5 − 5 1       0 0 2 1 − 2 0 0 4 − 2 2 0 0 4 − 2 2  ☠  ☠  ☠             0 0 0 0 0 0 2 0 1 − 2 0 0 2 1 − 2    0 0 0 -2 2 0 0 0 0 0 0 0 0 0 0 A. Kissinger Version: spring 2017 Matrix Calculations 5 / 47

  5. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems Points and polynomials Here’s a really useful thing about polynomials: Theorem For any n points in a plane, there exists a unique polynomial of degree n − 1 which hits them all. That is: given points ( x 1 , y 1 ) , . . . , ( x n , y n ) , there is precisely one polynomial function of the form: f ( x ) = a 0 + a 1 x + a 2 x 2 + a 3 x 3 + · · · + a n − 1 x n − 1 with f ( x i ) = y i for all i ≤ n. NB. No two points should be on the same vertical line! • The data fitting problem is: given the points ( x i , y i ) obtained from some experiment, find the a 0 , . . . , a n − 1 • This can be done with what we have seen so far! A. Kissinger Version: spring 2017 Matrix Calculations 6 / 47

  6. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems Data fitting example • Suppose we have 3 points (1 , 6), (2 , 3) and (3 , 2) • we wish to find f ( x ) = a 0 + a 1 x + a 2 x 2 that hits them all • The requirements f (1) = 6, f (2) = 3 and f (3) = 2 yield: a 0 + a 1 · 1 + a 2 · 1 2 = 6 a 0 + a 1 · 2 + a 2 · 2 2 = 3 a 0 + a 1 · 3 + a 2 · 3 2 = 2 • The augmented matrix and its Echelon form are:     1 1 1 6 1 1 1 6 1 2 4 3 0 1 3 − 3 and     1 3 9 2 0 0 1 1 • Its solution is a 2 = 1, a 1 = − 6 en a 0 = 11, ie. (11 , − 6 , 1) � • and so the required function if f ( x ) = 11 − 6 x + x 2 . A. Kissinger Version: spring 2017 Matrix Calculations 7 / 47

  7. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems Unique solutions From the first lecture: Theorem A system of equations in n variables has a unique solution if and only if its Echelon form has n pivots. Example ( denotes a pivot) � 1 � � � x 1 + x 2 = 3 1 3 1 1 3 gives and x 1 − x 2 = 1 1 − 1 1 0 1 1 (using transformations R 2 := R 2 − R 1 and R 2 := − 1 2 R 2 ) Question: What if there are more solutions? Can we describe them in a generic way? A. Kissinger Version: spring 2017 Matrix Calculations 8 / 47

  8. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems A new tool: vectors • A vector is a list of numbers. • We can write it like this: ( x 1 , x 2 , . . . , x n ) • ...or as a matrix with just one column:   x 1 x 2     .  .  .   x n (which is sometimes called a ‘column vector’). A. Kissinger Version: spring 2017 Matrix Calculations 10 / 47

  9. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems A new tool: vectors • Vectors are useful for lots of stuff. In this lecture, we’ll use them to hold solutions. • Since variable names don’t matter, we can write this: x 1 := 2 x 2 := − 1 x 3 := 0 • ...more compactly as this:   2 − 1   0 • ...or even more compactly as this: (2 , − 1 , 0). A. Kissinger Version: spring 2017 Matrix Calculations 11 / 47

  10. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems Linear combinations • We can multiply a vector by a number to get a new vector:     x 1 cx 1 x 2 cx 2         c ·  := . .     . . . .    x n cx n This is called scalar multiplication . • ...and we can add vectors together:       x 1 y 1 x 1 + y 1 x 2 y 2 x 2 + y 2              +  := . . .  .   .   .  . . .     x n y n x n + y n as long as the are the same length. A. Kissinger Version: spring 2017 Matrix Calculations 12 / 47

  11. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems Linear combinations Mixing these two things together gives us a linear combination of vectors:       x 1 y 1 cx 1 + dy 1 + . . . x 2 y 2 cx 2 + dy 2 + . . .             c ·  + d ·  + . . . = . . .  .   .   .  . . .     x n y n cx n + dy n + . . . A set of vectors v 1 , v 2 , . . . , v k is called linearly independent if no vector can be written as a linear combination of the others. A. Kissinger Version: spring 2017 Matrix Calculations 13 / 47

  12. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems Linear independence • These vectors: � 1 � � 0 � � 1 � v 1 = v 2 = v 3 = 0 1 1 are NOT linearly independent, because v 3 = v 1 + v 2 . • These vectors:       1 1 0 v 1 = 2 v 2 = 0 v 3 = 1       3 1 1 are NOT linearly independent, because v 1 = v 2 + 2 · v 3 . A. Kissinger Version: spring 2017 Matrix Calculations 14 / 47

  13. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems Linear independence • These vectors:       1 0 0 v 1 = 0 v 2 = 1 v 3 = 0       0 0 1 are linearly independent . There is no way to write any of them in terms of each other. • These vectors:       1 0 0 v 1 = 0 v 2 = 1 v 3 = 2       0 0 2 are linearly independent . There is no way to write any of them in terms of each other. A. Kissinger Version: spring 2017 Matrix Calculations 15 / 47

  14. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems Linear independence • These vectors:       1 2 0 v 1 = 2 v 2 = − 1 v 3 = 5       3 4 2 are...??? • ‘Eyeballing’ vectors works sometimes, but we need a better way of checking linear independence! A. Kissinger Version: spring 2017 Matrix Calculations 16 / 47

  15. Review: pivots and Echelon form Vectors and linear combinations Radboud University Nijmegen Homogeneous systems Non-homogeneous systems Checking linear independence Theorem Vectors v 1 , . . . , v n are linearly independent if and only if, for all numbers a 1 , . . . , a n ∈ R one has: a 1 · v 1 + · · · + a n · v n = 0 implies a 1 = a 2 = · · · = a n = 0 Example The 3 vectors (1 , 0 , 0) , (0 , 1 , 0) , (0 , 0 , 1) are linearly independent, since if a 1 · (1 , 0 , 0) + a 2 · (0 , 1 , 0) + a 3 · (0 , 0 , 1) = (0 , 0 , 0) then, using the computation from the previous slide, ( a 1 , a 2 , a 3 ) = (0 , 0 , 0) , so that a 1 = a 2 = a 3 = 0 A. Kissinger Version: spring 2017 Matrix Calculations 17 / 47

Recommend


More recommend