DM559 Linear and Integer Programming Lecture 3 Matrices and Vectors: Geometric Insight Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark
Geometric Insight Outline Linear Systems 1. Geometric Insight 2. Linear Systems 2
Geometric Insight Outline Linear Systems 1. Geometric Insight 2. Linear Systems 3
Geometric Insight Geometric Insight Linear Systems • Set R can be represented by real-number line. Set R 2 of real number pairs ( a 1 , a 2 ) can be represented by the Cartesian plane. • To a point in the plane A = ( a 1 , a 2 ) it is associated a position vector a = ( a 1 , a 2 ) T , representing the displacement from the origin ( 0 , 0 ) . ⋄ y ( a 1 , a 2 ) a 2 a x a 1 ( 0 , 0 ) 5
Geometric Insight Linear Systems • Two displacement vectors of same length and direction are considered to be equal even if they do not both start from the origin • If object displaced from O to P by displacement p and from P to Q by displacement v , then the total displacement satisfies q = p + v = v + q y y Q q 2 v P p 2 p q x x p 1 q 1 ( 0 , 0 ) ( 0 , 0 ) • v = q − p , think of v as the vector that is added to p to obtain q . 6
Geometric Insight Linear Systems • the length of a vector a = ( a 1 , a 2 ) T is denoted by || a || and from Pythagoras � a 2 1 + a 2 � || a || = 2 = � a , a � • the direction is given by the components of the vector • the unit vector can be derived by normalizing it, that is: 1 u = � v � v Theorem (Inner Product) Let a , b ∈ R 2 and let θ denote the angle between them. Then (from the law of cosines), a c = b − a � a , b � = � a � � b � cos θ θ b Two vectors a and b are orthogonal (or normal or perpendicular) if and only if � a , b � = 0. 7
Geometric Insight Vectors in R 3 Linear Systems z ( a 1 , a 2 , a 3 ) a 1 � y a 2 a 2 1 + a 2 2 + a 2 a = � a � = b a 3 a 3 � a , b � = � a � � b � cos θ x 8
Geometric Insight Lines in R 2 Linear Systems • Cartesian equation of a line: y = ax + b • another way is by giving position vectors. We can let x = t where t is any real number. Then y = ax + b = at + b . Hence the position vector x = ( x , y ) T � � � 1 � � 0 � t = t v + ( 0 , b ) T , x = = t + t ∈ R at + b a b • To derive the Cartesian equation: locate one particular point on the line, eg, the y intercept. Then the position vector of any point on the line is a sum of two displacements, first going to the point and then along the direction of the line. Try with P = ( − 1 , 1 ) and Q = ( 3 , 2 ) • In general, any line in R 2 is given by a vector equation with one parameter of the form x = p + t v where x is the position vector, p is any particular point and v is the direction of the line 9
Geometric Insight Lines in R 3 Linear Systems z x = p + t v y 1 1 + t 3 2 x = 4 − 1 x 3 − 3 + s , x = 7 − 6 s , t ∈ R 2 3 Are these lines intersecting? What is the Cartesian equation of the first? 10
Geometric Insight Linear Systems In R 2 , two lines are: In R 3 , two lines are: • parallel • parallel • intersecting in a unique point • intersecting in a unique point • skew (lay on two parallel planes) What about these lines? Do they intersect? Are they coplanar? x 1 1 = + t L 1 : y 3 2 z 4 − 1 x 5 − 2 = + t L 2 : y 6 1 z 1 7 11
Geometric Insight Planes in R 3 Linear Systems Vector parametric equation: • The position of vectors of points on a plane is described by: x = p + s v + t w , s , t ∈ R provided v and w are non-zero and not parallel. ( p position vector, v and w displacement vectors). • How is the plane through the origin? What if v and w are parallel? • Two intersecting lines determine a plane. What is its description? 12
Geometric Insight Linear Systems 4 z 2 x n x 2 2 4 y 4 13
Geometric Insight Alternative Description of Planes Linear Systems Cartesian equation: • Let n be a given vector in R 3 . All positions represented by postion vectors x that are orthogonal to n describe a plane through the origin. ( n is called a normal vector to the plane) • Vectors n and x are orthogonal iff � n , x � = 0 , hence this equation describes a plane. If n = ( a , b , c ) T and x = ( x , y , z ) T , then the equation becomes: ax + by + cz = 0 14
Geometric Insight Linear Systems 4 z 2 x n x 2 2 4 y 4 15
Geometric Insight Linear Systems • For a point P on the plane with position vector p and a position vector x of any other point on the plane, the displacement vector x − p lies on the plane and n ⊥ x − p • Conversely, if the position vector x of a point is such that � n , x − p � = 0 then the point represented by x lies on the plane. • hence, � n , x � = � n , p � = d and the equation becomes: ax + by + cz = d Eg.: 2 x − 3 y − 5 z = 2 has n = ( 2 , − 3 , − 5 ) T and passes through ( 0 , 0 , e ) 16
Geometric Insight Linear Systems Vector parametric equation ⇐ ⇒ Cartesian equation x 1 2 = s + t = s v + t w , y 2 1 s , t ∈ R z − 1 7 3 x , 3 x − y + z = 0 , n = − 1 x = y 1 z � n , v � = 0 , � n , w � = 0 and � n , s v + t w � = 0 for s , t ∈ R What will change if the plane does not pass through the origin? 17
Geometric Insight Linear Systems Are the two following planes parallel? x + 2 y − 3 x = 0 and − 2 x − 4 y + 6 z = 4 and these? x + 2 y − 3 x = 0 and x − 2 y + 5 z = 4 18
Lines and Hyperplanes in R n Geometric Insight Linear Systems • Point in R n : a = ( a 1 , a 2 , . . . , a n ) T • Length of a vector x = ( x , x 2 , . . . , x n ) T � � x 2 1 + x 2 � x � = 2 + · · · + x 2 n = � x , x � . • The vectors in R n are orthogonal iff � v , w � = 0 . • Line: x = p + t v , t ∈ R How many Cartesian equations? • The set of points ( x 1 , x 2 , . . . , x n ) that satisfy a Cartesian equation a 1 x 1 + a 2 x 2 + · · · + a n x n = d is called hyperplane. ( � n , x − p � = 0.) What is the vector equation? 19
Geometric Insight Outline Linear Systems 1. Geometric Insight 2. Linear Systems 20
Geometric Insight Systems of Linear Equations Linear Systems Definition (System of linear equations, aka linear system) A system of m linear equations in n unknowns x 1 , x 2 , . . . , x n is a set of m equations of the form a 11 x 1 + a 12 x 2 + · · · + a 1 n x n = b 1 a 21 x 1 + a 22 x 2 + · · · + a 2 n x n = b 2 . . . . . . a m 1 x 1 + a m 2 x 2 + · · · + a mn x n = b m The numbers a ij are known as the coefficients of the system. We say that s 1 , s 2 , . . . , s n is a solution of the system if all m equations hold true when x 1 = s 1 , x 2 = s 2 , . . . , x n = s n 21
Geometric Insight Examples Linear Systems x 1 + x 2 + x 3 + x 4 + x 5 = 3 2 x 1 + x 2 + x 3 + x 4 + 2 x 5 = 4 x 1 − x 2 − x 3 + x 4 + x 5 = 5 x 1 + x 4 + x 5 = 4 has solution x 1 = − 1 , x 2 = − 2 , x 3 = 1 , x 4 = 3 , x 5 = 2 . Is it the only one? x 1 + x 2 + x 3 + x 4 + x 5 = 3 2 x 1 + x 2 + x 3 + x 4 + 2 x 5 = 4 x 1 − x 2 − x 3 + x 4 + x 5 = 5 x 1 + x 4 + x 5 = 6 has no solutions 22
Geometric Insight Linear Systems Definition (Coefficient Matrix) The matrix A = ( a ij ) , whose ( i , j ) entry is the coefficient a ij of the system of linear equations is called the coefficient matrix. a 11 a 12 · · · a 1 n a 21 a 22 · · · a 2 n A = . . . ... . . . . . . a m 1 a m 2 · · · a mn Let x = [ x 1 , x 2 , . . . , x n ] T then n × 1 n × 1 m × n a 11 a 12 · · · a 1 n x 1 a 11 x 1 + a 12 x 2 + · · · + a 1 n x n a 21 a 22 · · · a 2 n x 2 a 21 x 1 + a 22 x 2 + · · · + a 2 n x n . = . . . . . ... . . . . . . . . . . . . x n a m 1 x 1 + a m 2 x 2 + · · · + a mn x n a m 1 a m 2 · · · a mn hence, the linear system can be written also as A x = b 23
Geometric Insight Row operations Linear Systems How do we find solutions? x 1 + x 2 + x 3 = 3 R1: R2: 2 x 1 + x 2 + x 3 = 4 x 1 − x 2 + 2 x 3 = 5 R3: Eliminate one of the variables from two of the equations x 1 + x 2 + x 3 = 3 R1’=R1: − x 2 − x 3 = − 2 R2’=R2-2*R1: x 1 − x 2 + 2 x 3 = 5 R3’=R3: x 1 + x 2 + x 3 = 3 R1’=R1: − x 2 − x 3 = − 2 R2’=R2: − 2 x 2 + x 3 = 2 R3’=R3-R1: We can now eliminate one of the variables in the last two equations to obtain the solution 24
Geometric Insight Linear Systems Row operations that do not alter solutions: O1: multiply both sides of an equation by a non-zero constant O2: interchange two equations O3: add a multiple of one equation to another These operations only act on the coefficients of the system For a system A x = b : 1 1 1 3 � � A b = 2 1 1 4 1 − 1 2 5 25
Recommend
More recommend