GEOMETRY OF MATRICES x 1

Similar documents
GEOMETRY OF MATRICES. FIGURE1. VectorinR 2.

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

2. Every linear system with the same number of equations as unknowns has a unique solution.

Math Camp II. Basic Linear Algebra. Yiqing Xu. Aug 26, 2014 MIT

Solutions to Final Practice Problems Written by Victoria Kala Last updated 12/5/2015

MATH 2360 REVIEW PROBLEMS

is Use at most six elementary row operations. (Partial

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017

7. Dimension and Structure.

Elementary Linear Algebra Review for Exam 2 Exam is Monday, November 16th.

MATH 2331 Linear Algebra. Section 2.1 Matrix Operations. Definition: A : m n, B : n p. Example: Compute AB, if possible.

Solutions to Math 51 First Exam October 13, 2015

Solutions to Exam I MATH 304, section 6

Chapter 7. Linear Algebra: Matrices, Vectors,

LINEAR ALGEBRA REVIEW

Math 54 HW 4 solutions

Linear Algebra V = T = ( 4 3 ).

Elementary maths for GMT

4 ORTHOGONALITY ORTHOGONALITY OF THE FOUR SUBSPACES 4.1

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

Math 323 Exam 2 Sample Problems Solution Guide October 31, 2013

Linear independence, span, basis, dimension - and their connection with linear systems

Department of Aerospace Engineering AE602 Mathematics for Aerospace Engineers Assignment No. 4

YORK UNIVERSITY. Faculty of Science Department of Mathematics and Statistics MATH M Test #1. July 11, 2013 Solutions

SECTION 3.3. PROBLEM 22. The null space of a matrix A is: N(A) = {X : AX = 0}. Here are the calculations of AX for X = a,b,c,d, and e. =

Math 313 Chapter 5 Review

MATH 20F: LINEAR ALGEBRA LECTURE B00 (T. KEMP)

Linear Algebra Primer

18.06 Problem Set 3 - Solutions Due Wednesday, 26 September 2007 at 4 pm in

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

EE731 Lecture Notes: Matrix Computations for Signal Processing

MTH 362: Advanced Engineering Mathematics

Row Space and Column Space of a Matrix

18.06 Problem Set 3 Due Wednesday, 27 February 2008 at 4 pm in

The geometry of least squares

Rank and Nullity. MATH 322, Linear Algebra I. J. Robert Buchanan. Spring Department of Mathematics

Study Guide for Linear Algebra Exam 2

Glossary of Linear Algebra Terms. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

EXERCISE SET 5.1. = (kx + kx + k, ky + ky + k ) = (kx + kx + 1, ky + ky + 1) = ((k + )x + 1, (k + )y + 1)

Math 224, Fall 2007 Exam 3 Thursday, December 6, 2007

A SHORT SUMMARY OF VECTOR SPACES AND MATRICES

MATH 1120 (LINEAR ALGEBRA 1), FINAL EXAM FALL 2011 SOLUTIONS TO PRACTICE VERSION

4.9 The Rank-Nullity Theorem

Algorithms to Compute Bases and the Rank of a Matrix

Math Linear Algebra Final Exam Review Sheet

1 Last time: determinants

Chapter 2 Subspaces of R n and Their Dimensions

Linear Algebra. Min Yan

SUMMARY OF MATH 1600

Answer Key for Exam #2

1. Determine by inspection which of the following sets of vectors is linearly independent. 3 3.

Lecture: Linear algebra. 4. Solutions of linear equation systems The fundamental theorem of linear algebra

14: Hunting the Nullspace. Lecture

Chapters 5 & 6: Theory Review: Solutions Math 308 F Spring 2015

NOTES on LINEAR ALGEBRA 1

Chapter 3. Directions: For questions 1-11 mark each statement True or False. Justify each answer.

Lecture 21: 5.6 Rank and Nullity

Assignment 1 Math 5341 Linear Algebra Review. Give complete answers to each of the following questions. Show all of your work.

Linear Algebra March 16, 2019

2018 Fall 2210Q Section 013 Midterm Exam II Solution

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

Matrix & Linear Algebra

Linear Algebra. The analysis of many models in the social sciences reduces to the study of systems of equations.

MATH 240 Spring, Chapter 1: Linear Equations and Matrices

Section 2.2: The Inverse of a Matrix

Matrices Gaussian elimination Determinants. Graphics 2009/2010, period 1. Lecture 4: matrices

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

Introduction to Vectors

Math Camp Lecture 4: Linear Algebra. Xiao Yu Wang. Aug 2010 MIT. Xiao Yu Wang (MIT) Math Camp /10 1 / 88

PRACTICE PROBLEMS FOR THE FINAL

LINEAR ALGEBRA SUMMARY SHEET.

Chapter 2: Matrix Algebra

This MUST hold matrix multiplication satisfies the distributive property.

MTH501- Linear Algebra MCQS MIDTERM EXAMINATION ~ LIBRIANSMINE ~

Linear Algebra, Summer 2011, pt. 2

Solutions to Math 51 First Exam April 21, 2011

Solution Set 3, Fall '12

Answers in blue. If you have questions or spot an error, let me know. 1. Find all matrices that commute with A =. 4 3

1. General Vector Spaces

Math 1553, Introduction to Linear Algebra

Notes on Row Reduction

(a) If A is a 3 by 4 matrix, what does this tell us about its nullspace? Solution: dim N(A) 1, since rank(a) 3. Ax =

Linear Algebra, Summer 2011, pt. 3

Chapter 3. Vector spaces

18.06 Problem Set 3 Solution Due Wednesday, 25 February 2009 at 4 pm in Total: 160 points.

pset3-sol September 7, 2017

Final Review Written by Victoria Kala SH 6432u Office Hours R 12:30 1:30pm Last Updated 11/30/2015

BASIC NOTIONS. x + y = 1 3, 3x 5y + z = A + 3B,C + 2D, DC are not defined. A + C =

2. Linear algebra. matrices and vectors. linear equations. range and nullspace of matrices. function of vectors, gradient and Hessian

Linear Algebra. Chapter Linear Equations

Definitions for Quizzes

Working with Block Structured Matrices

MODULE 8 Topics: Null space, range, column space, row space and rank of a matrix

Math 4377/6308 Advanced Linear Algebra

Lecture 23: 6.1 Inner Products

Vector Space Concepts

Upon successful completion of MATH 220, the student will be able to:

Chapter 1. Vectors, Matrices, and Linear Spaces

Contents. 1 Vectors, Lines and Planes 1. 2 Gaussian Elimination Matrices Vector Spaces and Subspaces 124

Math Final December 2006 C. Robinson

Transcription:

GEOMETRY OF MATRICES. SPACES OF VECTORS.. Definition of R n. The space R n consists of all column vectors with n components. The components are real numbers... Representation of Vectors in R n.... R. The space R is represented by the usual x,x plane. The two components of the vector give the x and x coordinates of a point and the vector is a directed line segment that goes out from (,) x. FIGURE. Vector in R.,.. x... R. We can think of this geometrically as the x and x axes being laid out on a table top with the x axis being perpendicular to this horizontal surface as in figure. The vector is a directed line segment from (,,) to the point (x,x,x ). We frequently attach an arrow to the end of the line segment, at other times we simply connect the line segment to the dot representing the point. Date: September 8,.

GEOMETRY OF MATRICES FIGURE. Vector in R. x x x.. Definition of a vector space. A vector space consists of a set V of objects (called vectors) together with two operations, vector addition(assigning a vector x + y to any vectors x and y in V) and scalar multiplication )assigning a vector α xor α x to any scalar α and a vector x in V) such that following eight axioms are satisfied. V: x + y = y + x (commutative law of vector addition)

GEOMETRY OF MATRICES V: ( x + y )+ z = x +( y + z (associative law of vector addition) V: There is an element of V, denoted by or such that + x = x + = x. V: For each x in V, there is an element x in V, such that x + x = x + x =. V: (α + β) x = α x+ β x V6: α ( x + y )=α x+ α y V7: (αβ) x = α (β x) V8: x = x where is a scalar. Note that the definitions of + in V. are different and that there are two types of multiplication in V.7... Properties of a vector space.... Geometric representation of scalar multiplication. A scalar multiple of a vector a, is another vector, say u, whose coordinates are the scalar multiples of a s coordinates, u = ca. Consider the example below. ( ) a =,c= ( ) () 6 u = ca = Geometrically, a scalar multiple of a vector a is a segment of the line that passes through and a and continues forever in both directions. For example if we multiply the vector (,) by. we obtain (7.,.) as shown in figure. x FIGURE. Scalar Multiple of Vector 7.,., 6 7 x

GEOMETRY OF MATRICES If we multiply a vector by a scalar with a negative sign, the direction changes as in figure. FIGURE. Negative Scalar Multiple of Vector x, x,... Geometric representation of addition of vectors. The sum of two vectors a and b is a third vector whose coordinates are the sums of the corresponding coordinates of a and b. Consider the example below. ( ) ( ) a =,b= ( ) () c = a + b = Geometrically, vector addition can be represented by the parallelogram law which is that the sum vector (a+b) corresponds to the directed line segment along the diagonal of the parallelogram having a and b as sides. Another way to say this is to move a copy of the vector a parallel to a so that its tail rests at the head of vector b, and let the geometrical vector connecting the origin and the head of this shifted a be the vector a+b. Yet another way to think of this is to move in the direction and distance defined by a from the tip of b. Consider figure where ( ( ) a =, b = ) ( ) () 7 c = a + b = 6

GEOMETRY OF MATRICES x FIGURE. Vector Addition 6 7,6, c, Copy of a a b 6 7 x The copy of a extends from the tip of b to the point (7,6). The parallelogram is formed by extending a copy of b from the tip of a which also ends at the point (7,6). The line segment from the origin to this point, which is the diagonal of the parallelogram is the vector c.... Subspaces. A subspace of a vector space is a set of vectors (including ) that satisfies two requirements: If a and b are vectors in the subspace and c is any scalar, then : a + b is in the subspace : ca is in the subspace Note that a subspace necessarily contains the zero vector.... Subspaces and linear combinations. A subspace containing the vectors a and b must contain all linear combinations of a and b.... Column space of a matrix. The column space of the m n matrix A consists of all linear combinations of the columns of A. The combinations can be written as Ax. The column space of A is a subspace of R m because each of the columns of A has m rows. The system of equations Ax= b is solvable if and only if b is in the column space of A. What this means is that the system is solvable if there is some way to write b as a linear combination of the columns of A. Consider the following example where A is a x matrix, x is a x vector and b is a x vector. A =,x= ( x x ) b = b b b ()

6 GEOMETRY OF MATRICES The matrix A has two columns. Linear combinations of these columns will lie on a plane in R. Any vectors b which lie on this plane can be written as linear combinations of the columns of A. Other vectors in R cannot be written in this fashion. For example consider the vector b = [,,8]. This can be written as follows ( ) A = = 8 () () + () = 8 where the vector x = [, ]. The vector b = [,,] can also be written as a linear combination of the columns of A. Specifically, ( ) A = = (6) () + () = where x = [, ]. To find the coefficients x that allow us to write a vector b as a linear combination of the columns of A we can perform row reduction on the augmented matrix [A, b]. For this example we obtain à = (7) Multiply the first row by to yield ( ) and subtract it from the second row This will give a new matrix on which to operate. à = (8) Multiply the first row by

GEOMETRY OF MATRICES 7 ( 6 ) and subtract from the third row This will give Now divide the second row by Now multiply the second row by 6 à = () à = () ( ) and subtract from the third row This will give à = () At this point we have an identity matrix in the upper left and know that x = and x =. The third equation implies that ()(x ) + ()(x ) =. So the vector b = [,, ] can be written as linear combination of the columns of A. Now consider the vector b = [,, ]. Write out the augmented matrix system and perform row operations. à = () Multiply the first row by ( ) 8 and subtract from the second row

8 GEOMETRY OF MATRICES This will give Multiply the first row by 8 à = () ( ) and subtract from the third row This will give Now divide the second row by Now multiply the second row by 6 à = () 6 à = 6 () ( ) and subtract from the third row 6 This will give à = (6) Now multiply the third row by /. This will give

GEOMETRY OF MATRICES à = / (7) At this point we have a problem because the third row of the matrix implies that ()(x ) + ()(x ) =, which is not possible. Consider now the general case where b = [b, b, b]. The augmented matrix system can be written à = b b (8) b Multiply the first row by ( ) b and subtract from the second row This will give Multiply the first row by b b b b b à = b b () b ( ) b and subtract from the third row This will give Now divide the second row by b b b b b à = b b () b b b à = b b b b ()

GEOMETRY OF MATRICES Now multiply the second row by ( b b ) and subtract from the third row b b b b b b+b This will give b à = b b b b+b () We have an identity matrix in the upper left hand corner. The general solution is of the form x = b x = b b b + b +b = Consider first the case from equation. For this system b = b b = ( ) b, x = b b = b 8 If we then substitute we obtain ( ) = ( ) () () b + b +b = +8+= () Now consider the case from equation 6 b = b b = ( ) ( ) ( b, x = b b = = (6) b ) If we then substitute we obtain b + b +b = ++6= (7) So for the systems in equations and 6, the given b vector is in the column space of the matrix A and can be written as a linear combination of these columns with coefficients (,) and (,) respectively. For the system in equation we have b = b b = ( ) ( ) ( ) b, x = b b = 8 = (8) b If we then substitute we obtain b + b +b = ++ = ()

GEOMETRY OF MATRICES The condition on the elements of b is not satisfied and so b cannot be written as a linear combination of the column space of A. The first two elements are correctly written as combinations of the first two elements of each column of A, but the last element of the linear combination is 6 rather than. That is () +(/) =..6. Nullspace of a matrix. The nullspace of an m n matrix A consists of all solutions to Ax =. These vectors x are in R n. The elements of x are the multipliers of the columns of A whose weighted sum gives the zero vector. The nullspace containing the solutions x is denoted by N(A). The null space is a subspace of R n while the column space is a subspace of R m. For many matrices, the only solution to Ax = is x =. If n > m, the nullspace will always contain vectors other than x =. Consider a few examples. ( ) : Consider the matrix A =. Multiply the first row by 6 ( ) 6 and subtract it from the second row This will give the new matrix. 6 6 Ã = ( ) This implies that x can be anything. The convention is to set it equal to one. If x =, then we have so x + ()() = x = ( ( ( ( ) + () = ) 6) ) ( ) The null space of the matrix A is the vector. All vectors of this form where the first elemement is - times ( the second ) element will make the equation Ax = true. : Consider the matrix A =. Multiply the first row by ( ) 6 and subtract it from the second row

GEOMETRY OF MATRICES This will give the new matrix. 6 Ã = ( ) This implies that x must be zero. If x =, then we have so x + ()() = x = ( ( ( () + () = ) ) ) The null space of the matrix A is the vector equation Ax = is x =. ( ). The only vector x that will make the : Consider the matrix Multiply the first row by A = 8 6 ( 6 8 ) and subtract it from the second row 8 6 8 This will give the new matrix. Ã = 6 Now multiply the first row by ( 6 ) and subtract it from the third row

GEOMETRY OF MATRICES This will give the new matrix. 6 6 à = Now subtract the second row from the third row This will give the new matrix. à = If we write the system using à we obtain = x x x x The variables x and x can be any values because of the zeroes in the pivot columns. The convention is to set them equal to zero and one. First write the system with x = and and x =. This will give x x = This implies that x must be zero. If x =, then we have x = x += x =

GEOMETRY OF MATRICES The vector x = is in the nullspace of the matrix A as can be seen by writing out the system as follows ( ) + () + () 8 + () = 6 Now write the system with x = and and x =. This will give x x = This implies that x + must be zero. This implies that x = -. Making this substitution we have x = x += x = The vector is in the nullspace of the matrix A as can be seen by writing out the system as follows ( ) + () +( ) 8 + () = 6 We can then write a general x as follows x x x = x + x = x x x : Consider the matrix A = 6 6 7 Multiply the first row by ( ) 6 and subtract it from the second row

GEOMETRY OF MATRICES 6 6 8 This will give the new matrix. Ã = 8 6 7 Now multiply the first row by ( 6 ) and subtract it from the third row 6 6 8 This will give the new matrix. Ã = 8 8 7 Now multiply the first row by negative one and subtract it from the fourth row 7 8 This will give the new matrix. Ã = 8 8 8 Now multiply the second row by one and subtract it from the third row 8 8 This will give the new matrix.

6 GEOMETRY OF MATRICES Ã = 8 8 Now multiply the second row negative one and subtract it from the fourth row 8 8 This will give the new matrix. Ã 6 = 8 If we write the system using Ã6 we obtain 8 x x x x = x +x +x + x = 8x = This implies that x =. The system has three vartiables and only one equation. Assume that x and x are free variables given the zeroes in the pivot columns. Set x = and x = to obtain So the vector system as follows x +x + = x + = x = is in the nullspace of the matrix A as can be seen by writing out the ( ) + () 6 + () 6 + () = 7 Now set x =andx = to obtain

GEOMETRY OF MATRICES 7 So the vector x +x +x = x + = x = is in the nullspace of the matrix A as can be seen by writing out the system as follows ( ) + () 6 + () 6 + () = 7 We can then write a general x as follows x x x = x + x =.. Basis vectors.... Definition of a basis. A set of vectors in a vector space is a basis for that vector space if any vector in the vector space can be written as a linear combination of them. The minimum number of vectors needed to form a basis for R k is k. For example, in R, we need two vectors of length two to form a basis. One vector would only allow for other points in R that lie along the line through that vector.... Example for R. Consider the following three vectors in R [ ] [ ] [ ] a a b a =,a a =, b =. () a b If a and a are a basis for R, then we can write any arbitrary vector as a linear combination of them. That is we can write [ ] [ ] [ ] a a b α + α a =. () a b To see the conditions under which a and a form such a basis we can solve this system for α and α as follows. Appending the column vector b to the matrix A, we obtain the augmented matrix for the system. This is written as [ ] a a à = b () a a b We can perform row operations on this matrix to reduce it to reduced row echelon form. We will do this in steps. The first step is to divide each element of the first row by a. This will give à = [ a b ] a a a a b x x ()

8 GEOMETRY OF MATRICES Now multiply the first row by a to yield [ a a a a a b a ] and subtract it from the second row a a b a a a b a a a a a a a b a b a This will give a new matrix on which to operate. [ à = a b a a a a a a a b a b a a ] Now multiply the second row by a a a a a to obtain [ à = a b a a a b a b a a a a ] () Now multiply the second row by a a row by a a to yield. and subtract it from the first row. First multiply the second [ ] a a ( a b a b ) a a (a a a a ) () Now subtract the expression in equation from the first row of à to obtain the following row. [ ] [ a b a a ] [ a a (a b a b ) a a (a a a a ) = b a ] a (a b a b) a (a a a a ) (6) Now replace the first row in à with the expression in equation 6 of obtain à à = b a a ( a b a b ) a (a a a a ) a b a b a a a a (7) This can be simplified as by putting the upper right hand term over a common denominator, and canceling like terms as follows

GEOMETRY OF MATRICES Ã = = b a a b a a a a a b + a a a b a ( a a a a ) b a a a a b a ( a a a a ) a b a b a a a a a b a b a a a a (8) = b a a b a a a a a b a b a a a a We can now read off the solutions for x and x. They are x = b a a b a a a a () x = a b a b a a a a As long as this determinant is not zero, we can write b as a function of a and a. If the determinant of A is not zero, then a and a are linearly independent. Geometrically this means that they do not lie on the same line. So in R, any two vectors that point in different directions are a basis for the space.... Linear dependence. A set of vectors is linearly dependent if any one of the vectors in the set can be written as a linear combination of the others. The largest number of linearly independent vectors we can have in R k is k.... Linear independence. A set of vectors is linearly independent if and only if the only solution to is α a + α a + + α k a k = () α = α = = α k = () We can also write this in matrix form. The columns of the matrix A are independent if the only solution to the equation Ax = is x =.... Spanning vectors. The set of all linear combinations of a set of vectors is the vector space spanned by those vectors. By this we mean all vectors in this space can be written as a linear combination of this particular set of vectors. Consider for example the following vectors in R. a =,a =,a = ()

GEOMETRY OF MATRICES The vector a can be written as a +a. But vectors in R having a non-zero third element cannot be written as a combination of a and a. These three vectors do not form a basis for R. They span the space that is made up of the floor of R. Similarly the two vectors from equation make up a basis for a space defined as the plane passing through those two vectors...6. Rowspace of a matrix. The rowspace of the m n matrix A consists of all linear combinations of the rows of A. The combinations can be written as x AorA x depending on whether one considers the resulting vectors to be rows or columns. The row space of A is a subspace of R n because each of the rows of A has n columns. The row space of a matrix is the subspace of R n spanned by the rows...7. Linear independence and the basis for a vector space. A basis for a vector space with k dimensions is any set of k linearly independent vectors in that space...8. Formal relationship between a vector space and its basis vectors. A basis for a vector space is a sequence of vectors that has two properties simultaneously. : The vectors are linearly independent : The vectors span the space There will be one and only one way to write any vector in a given vector space as a linear combination of a set of basis vectors. There are an infinite number of basis vectors for a given space, but only one way to write any given vector as a linear combination of a particular basis.... Bases and Invertible Matrices. The vectors ξ,ξ,...,ξ n are a basis for R n exactly when they are the columns of an n n invertible matrix. Therefore R n has infinitely many bases, one associated with every different invertible matrix.... Pivots and Bases. When reducing an m n matrix A to row-echelon form, the pivot columns form a basis for the column space of the matrix A. The pivot rows form a basis for the row space of the matrix A.... Dimension of a vector space. The dimension of a vector space is the number of vectors in every basis. For example, the dimension of R is, while the dimension of the vector space consisting of points on a particular plane is R is also.... Dimension of a subspace of a vector space. The dimension of a subspace space S n of an n- dimensional vector space V n is the maximum number of linearly independent vectors in the subspace.... Rank of a Matrix. : The number of non-zero rows in the row echelon form of an m n matrix A produced by elementary operations on A is called the rank of A. : The rank of an m n matrix A is the number of pivot columns in the row echelon form of A. : The column rank of an m n matrix A is the maximum number of linearly independent columns in A. : The row rank of an m n matrix A is the maximum number of linearly independent rows in A : The column rank of an m n matrix A is equal to the row rank of the m n matrix A. This common number is called the rank of A. 6: An n n matrix A with rank = n is said to be of full rank.

GEOMETRY OF MATRICES... Dimension and Rank. The dimension of the column space of an m n matrix A equals the rank of A, which also equals the dimension of the row space of A. The number of independent columns of A equals the number of independent rows of A. As stated earlier, the r columns containing pivots in the row echelon form of the matrix A form a basis for the column space of A.... Vector spaces and matrices. An m n matrix A with full column rank (i.e., the rank of the matrix is equal to the number of columns) has all the following properties. : The n columns are independent : The only solution to Ax = is x =. : The rank of the matrix = dimension of the column space = n : The columns are a basis for the column space...6. Determinants, Minors, and Rank. Theorem. The rank of an m n matrix A is k if and only if every minor in A of order k +vanishes, while there is at least one minor of order k which does not vanish. Proposition. Consider an m n matrix A. : det A= if every minor of order n - vanishes. : If every minor of order n equals zero, then the same holds for the minors of higher order. (restatement of theorem): The largest among the orders of the non-zero minors generated by a matrix is the rank of the matrix...7. Nullity of an m n Matrix A. The nullspace of an m n matrix A is made up of vectors in R n and is a subspace of R n. The dimension of the nullspace of A is called the nullity of A. It is the the maximum number of linearly independent vectors in the nullspace...8. Dimension of Row Space and Null Space of an m n matrix A. Consider an m n Matrix A. The dimension of the nullspace, the maximum number of linearly independent vectors in the nullspace, plus the rank of A, is equal to n. Specifically, Theorem. rank(a) +nullity(a) =n () Proof. Let the vectors ξ,ξ,...,ξ k be a basis for the nullspace of the m n matrix A. This is a subset of R n with n or less elements. These vectors are, of course, linearly independent. There exist vectors ξ k+,ξ k+,...,ξ n in R n such that ξ,ξ,...,ξ k,ξ k+,...,ξ n form a basis for R n. We can prove that A ( ) ( ) ξ k+ ξ k+ ξ n = Aξk+ Aξ k+... Aξ n is a basis for the column space of A. The vectors Aξ,Aξ,...,Aξ n span the column space of A because ξ,ξ,...,ξ k,ξ k+,...,ξ n form a basis for R n and thus certainly span R n. Because Aξ j = for j k, we see that Aξ k+,aξ k+,...,aξ n also span the column space of A. Specifically we obtain A ( ) ( ) ξ ξ ξ k ξ k+... ξ n =... Aξk+ Aξ k+... Aξ n We need to show that these vectors are independent. Suppose that they are not independent. Then there exist scalars c i such that We can rewrite as follows n i=k+ c i (Aξ i ) = ()

GEOMETRY OF MATRICES This imples that the vector A ( n i=k+ ξ = c i ξ i ) n i=k+ = () c i ξ i (6) is in the nullspace of A. Because ξ,ξ,...,ξ k form a basis for the nullspace of A, there must be scalars, γ,γ,...,γ k such that k ξ = γ i ξ i (7) i= If we substract one expression for ξ from the other, we obtain k n ξ = γ i ξ i c i ξ i = (8) i= j=k+ and because ξ,ξ,...,ξ k,ξ k+,...,ξ n are linearly independent, we must have γ, = γ =... = γ k = c k+ = c k+ =... = c n = () If r is the rank of A, the fact that Aξ k+ Aξ k+... Aξ n form a basis for the column space of A tells us that r = n-k. Because k is the nullity of A then we have rank(a) + nullity(a) =n n k + k = n (). PROJECTIONS.. Orthogonal vectors.... Definition of orthogonal vectors. Two vectors a and b are said to be orthogonal if their inner product is zero, that is if a b =. Geometrically two vectors are orthogonal if they are perpendicular to each other.... Example in R. Consider the two unit vectors [ [ a =,b= ] ] a b = [ ] [ ] = () () + () () = Consider two different vectors that are also orthogonal [ [ ] a =,b= ] a b = [ ] [ ] = () ( ) + () () = We can represent this second case graphically as in figure 6 () ()

GEOMETRY OF MATRICES FIGURE 6. Orthogonal Vectors in R x,, x... An example in R. Consider the two vectors a =,b = a b = [ ] = () () + () () + ( )() = We can represent this three dimensional case as in figure 7 or alternatively as in figure 8. ()... Another example in R. Consider the three vectors a =,b=,c= c a = [ / / ] = ( )( ) + ( )( ) + ( )( ) = ()

GEOMETRY OF MATRICES FIGURE 7. Orthogonal Vectors in R x x x,, Here a and c are orthogonal but a and b are obviously not. We can represent this three dimensional case graphically in figure. Note that the line segment d is parallel to c and perpendicular to a, just as c is orthogonal to a.... Another example in R. Consider the four vectors below where p is a scalar multiple of a. We can see that e is is orthogonal to p. e p = [ ] e a = [ ] a =,b =,p=,e= 6 = = ( )( ) ( ) () + and to a. This example is represented in figure. 6 + ( )( ) 6 () + () () = ( ) () + () () = (6)

GEOMETRY OF MATRICES FIGURE 8. Orthogonal Vectors in R x,, x x.. Projection onto a line.... Idea and definition of a projection. Consider a vector b =[b,b,... b n ]inr n. Also consider a line through the origin in R n that passes through the point a = [a,a,... a n ]. To project the vector onto the line a, we find the point on the line through the point a that is closest to b. We find this point on the line a (call it p) by finding the line connecting b and the line through a that is perpendicular to the line through a. This point p (which is on the line through a) will be some multiple of a, i.e. p = ca where c is a scalar. Consider figure. The idea is to find the point along the line a that is closest to the tip of the vector b. In other words, find the vector b-p that is perpendicular to a. Given that p can be written as scalar multiple of a, this also means that b-ca is perpendicular or orthogonal to a. This implies that a (b-ca) =, or a b -ca a =. Given that a b and a a are scalars we can solve this for the scalar c as in equation 7. a (b ca) = a b ca a = c = a b a a = a b aá (7) Definition. The projection of the vector b onto the line through a is the vector p = ca = a b a a a.

6 GEOMETRY OF MATRICES FIGURE. Orthogonal Vectors in R. x.. d a b. x,, c. x... An Example. Project the vector b = [,,] onto the line through a = [,,]. First find the scalar needed to construct the projection p. For this case a =,b= a b =[,, ] = (8) The projection p is then given by ca or a a =[,, ] = c = a b a a =

GEOMETRY OF MATRICES 7 FIGURE. Orthogonal Vectors in R a b.. p e x x.,,. x p = ca = [ ] = () 6 The difference between b and p (the error vector, if you will) is b-p. This is computed as follows. e = b p = = 6 (6) We can think of the vector b as being split into two parts, the part along the line through a, that is p, and the part perpendicular to the line through a, that is e. We can then write b = p+e.... The projection matrix. We can write the equation for the projection p in another useful fashion.

8 GEOMETRY OF MATRICES FIGURE. Projection on to a Line a b p b. x. x p.,, e. x p = ac = a a b a a = aa a a b (6) = Pb where P = aa a a We call the matrix P the projection matrix.... Example projection matrix. Consider the line through the point a where a = [,, ]. We find the projection matrix for this line as follows. First find a a. Then find aa. a =,a a = [,, ] = (6)

GEOMETRY OF MATRICES aa = [,, ] = (6) Then construct P as follows P = (6) Consider the projection of the point b = [,, ] onto the line through a. We obtain p = Pb This is represented in figure. = = (6) FIGURE. Projection on to a Line x.. x. x. b p b e a p,,

GEOMETRY OF MATRICES.. Projection onto a more general subspace.... Idea and definition. Consider a vector b =[b,b,...b m ]inr m. Then consider a set of n mx vectors a, a,... a n. The goal is to find the combination c a +c a +...+c n a n that is closest to the vector b. This is called the projection of vector b onto the n-dimensional subspace spanned by the a s. If we treat the vectors as columns of a matrix A, then we are looking for the vector in the column space of A that is closest to the vector b, i.e., the point c, such that b and Ac are closest. We find the point in this subspace such that the error vector b - Ac is perpendicular to the subspace. This point is some linear combination of vectors a, a,... a n.. Consider figure where we plot the vectors a = [,,] and a = [,,]. FIGURE. Two Vectors in R x. x. a a.. x,,

GEOMETRY OF MATRICES The subspace spanned by these two vectors is a plane in R. The plane is shown in figure. FIGURE. Two Vectors on a Plane in R. a x. a. x.,, x

GEOMETRY OF MATRICES Now consider a third vector given by b = [6,,]. We represent the three vectors in figure. FIGURE. A Vector in R not on the Plane b x.. a a 6. x.,, x This vector does not lie in the space spanned by a and a. The idea is to find the point in the subspace spanned by a and a that is closest to the point (6,,). The error vector e = b - Ac will be perpendicular to the subspace. In figure 6 the vector (labeled a ) in the space spanned by a and a that is closest to the point b is drawn. The diagram also shows the vector b - a.... Formula for the projection p and the projection matrix P. The error vector e = b - Ac will be orthogonal to each of the vectors in the column space of A, i.e., it will be orthogonal to a, a,... a n. We can write this as n separate conditions as follows. a (b Ac) = a (b Ac) =. a n(b Ac) = (66) We can also write this as a matrix equation in the following manner.

GEOMETRY OF MATRICES FIGURE 6. Projection onto a Subspace 6 x x.. a a,, a b p b. x. A (b Ac) = A b A Ac = A Ac = A b Equation 67 can then be solved for the coefficients c by finding the inverse of A A. This is given by (67) The projection p = Ac is then A Ac = A b c =(A A) A b (68) p = Ac = A(A A) A b The projection matrix that produces p = Pb is (6) P = A(A A) A (7) Given any m n matrix A and any vector b in R m, we can find the projection of b onto the column space of A by premultiplying the vector b by this projection matrix. The vector b is split into

GEOMETRY OF MATRICES two components by the projection. The first component is the vector p which lies in the subspace spanned by the columns of the A matrix. The second component is the vector e, which is the difference between p and b. The idea is that we get to b by first getting to p and then moving in a perpendicular direction from p to b as in figure 6.... Example. Project the vector b = [6,,] onto the space spanned by the vectors a = [,,] and a = [,,]. The matrices are as follows. A = A A and A B are as follows,a = A A = A b = [ ],b= [ ] [ ] = [ ] 6 [ 6 = ] To compute c we need to find the inverse of A A. We can do so as follows We can now solve for c (A A) = The projection p is then given by Ac = [ ] = [ 6 ] [ ] 6 (7) (7) (7) [ ] [6 ] c =(A A) A 6 b = [ ] (7) = and while e = b - p is p = Ac = = [ ] (7)

GEOMETRY OF MATRICES e = b p = 6 = (76) This solves the problem for this particular vector b. For the more general problem is it useful to construct the projection matrix P. P = A (A A) A [ ][ ] = 6 6 [ ] = = 6 6 6 6 6 Notice that e is perpendicular to both a and a. a e =[,, ] = (77) (78) a e =[,, ] = We can think of the vector b as being split into two parts, the part in the space spanned by the columns of A, that is p, and the part perpendicular to this subspace, that is e. We can then write b = p+e. Also note that Pb = p. 6 6 6 6 Pb = p 6 =.. Projections, linear independence, and inverses. To find the coefficients c, the projection p, and the projection matrix P, we need to be able to invert the matrix, A A. Theorem. The matrix A A is invertible if and only if the columns of A are linearly independent. (7)