The Projection Matrix



Similar documents
18.06 Problem Set 4 Solution Due Wednesday, 11 March 2009 at 4 pm in Total: 175 points.

Linear Algebra Review. Vectors

is in plane V. However, it may be more convenient to introduce a plane coordinate system in V.

3 Orthogonal Vectors and Matrices

Recall that two vectors in are perpendicular or orthogonal provided that their dot

Lecture 14: Section 3.3

Vector Math Computer Graphics Scott D. Anderson

Section 2.4: Equations of Lines and Planes

α = u v. In other words, Orthogonal Projection

Vectors Math 122 Calculus III D Joyce, Fall 2012

Beginner s Matlab Tutorial

CS3220 Lecture Notes: QR factorization and orthogonal transformations

MATH APPLIED MATRIX THEORY

Dot product and vector projections (Sect. 12.3) There are two main ways to introduce the dot product

9 Multiplication of Vectors: The Scalar or Dot Product

9.4. The Scalar Product. Introduction. Prerequisites. Learning Style. Learning Outcomes

Equations Involving Lines and Planes Standard equations for lines in space

Module 8 Lesson 4: Applications of Vectors

Notes on Orthogonal and Symmetric Matrices MENU, Winter 2013

Adding vectors We can do arithmetic with vectors. We ll start with vector addition and related operations. Suppose you have two vectors

Geometric description of the cross product of the vectors u and v. The cross product of two vectors is a vector! u x v is perpendicular to u and v

A vector is a directed line segment used to represent a vector quantity.

28 CHAPTER 1. VECTORS AND THE GEOMETRY OF SPACE. v x. u y v z u z v y u y u z. v y v z

Chapter 7 Nonlinear Systems

Inner Product Spaces and Orthogonality

1.3. DOT PRODUCT If θ is the angle (between 0 and π) between two non-zero vectors u and v,

Linear algebra and the geometry of quadratic equations. Similarity transformations and orthogonal matrices

2+2 Just type and press enter and the answer comes up ans = 4

Numerical Analysis Lecture Notes

Vectors 2. The METRIC Project, Imperial College. Imperial College of Science Technology and Medicine, 1996.

Eigenvalues, Eigenvectors, Matrix Factoring, and Principal Components

Eigenvalues and Eigenvectors

How long is the vector? >> length(x) >> d=size(x) % What are the entries in the matrix d?

[1] Diagonal factorization

Orthogonal Projections and Orthonormal Bases

Chapter 19. General Matrices. An n m matrix is an array. a 11 a 12 a 1m a 21 a 22 a 2m A = a n1 a n2 a nm. The matrix A has n row vectors

160 CHAPTER 4. VECTOR SPACES

Cross product and determinants (Sect. 12.4) Two main ways to introduce the cross product

AMATH 352 Lecture 3 MATLAB Tutorial Starting MATLAB Entering Variables

x1 x 2 x 3 y 1 y 2 y 3 x 1 y 2 x 2 y 1 0.

Section 9.5: Equations of Lines and Planes

Math 215 HW #6 Solutions

u = [ 2 4 5] has one row with three components (a 3 v = [2 4 5] has three rows separated by semicolons (a 3 w = 2:5 generates the row vector w = [ 2 3

13 MATH FACTS a = The elements of a vector have a graphical interpretation, which is particularly easy to see in two or three dimensions.

Similarity and Diagonalization. Similar Matrices

Simple Programming in MATLAB. Plotting a graph using MATLAB involves three steps:

Chapter 17. Orthogonal Matrices and Symmetries of Space

Lectures notes on orthogonal matrices (with exercises) Linear Algebra II - Spring 2004 by D. Klain

Math 1050 Khan Academy Extra Credit Algebra Assignment

Lecture 5: Singular Value Decomposition SVD (1)

Lecture 2 Matrix Operations

Lecture 1: Systems of Linear Equations

Orthogonal Projections

Exam 1 Sample Question SOLUTIONS. y = 2x

MATH2210 Notebook 1 Fall Semester 2016/ MATH2210 Notebook Solving Systems of Linear Equations... 3

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

Linear Algebra Notes for Marsden and Tromba Vector Calculus

Solutions to Math 51 First Exam January 29, 2015

6. Vectors Scott Surgent (surgent@asu.edu)

Representation of functions as power series

521493S Computer Graphics. Exercise 2 & course schedule change

Chapter 6. Orthogonality

Curve Fitting, Loglog Plots, and Semilog Plots 1

MA261-A Calculus III 2006 Fall Homework 3 Solutions Due 9/22/2006 8:00AM

Algebraic Concepts Algebraic Concepts Writing

Two vectors are equal if they have the same length and direction. They do not

Recall the basic property of the transpose (for any A): v A t Aw = v w, v, w R n.

LINES AND PLANES CHRIS JOHNSON

Definition: A vector is a directed line segment that has and. Each vector has an initial point and a terminal point.

Math 241, Exam 1 Information.

Section 1.1. Introduction to R n

Linearly Independent Sets and Linearly Dependent Sets

Lecture notes on linear algebra

The Vector or Cross Product

Mehtap Ergüven Abstract of Ph.D. Dissertation for the degree of PhD of Engineering in Informatics

Machine Learning and Data Mining. Regression Problem. (adapted from) Prof. Alexander Ihler

CITY UNIVERSITY LONDON. BEng Degree in Computer Systems Engineering Part II BSc Degree in Computer Systems Engineering Part III PART 2 EXAMINATION

Section 5.3. Section 5.3. u m ] l jj. = l jj u j + + l mj u m. v j = [ u 1 u j. l mj

1 Introduction to Matrices

Typical Linear Equation Set and Corresponding Matrices

Matrices 2. Solving Square Systems of Linear Equations; Inverse Matrices

Please follow these guidelines when preparing your answers:

Using Microsoft Excel Built-in Functions and Matrix Operations. EGN 1006 Introduction to the Engineering Profession

Section V.3: Dot Product

The Dot and Cross Products

Partial Least Squares (PLS) Regression.

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

SALEM COMMUNITY COLLEGE Carneys Point, New Jersey COURSE SYLLABUS COVER SHEET. Action Taken (Please Check One) New Course Initiated

Linear Algebra: Vectors

MATH 304 Linear Algebra Lecture 18: Rank and nullity of a matrix.

2-View Geometry. Mark Fiala Ryerson University

Vector Fields and Line Integrals

Normalization and Mixed Degrees of Integration in Cointegrated Time Series Systems

Inner Product Spaces

FURTHER VECTORS (MEI)

Applied Linear Algebra

(!' ) "' # "*# "!(!' +,

MATH1231 Algebra, 2015 Chapter 7: Linear maps

3.2 Matrix Multiplication

Transcription:

The Projection Matrix David Arnold Fall 996 Abstract In this activity you will use Matlab to project a set of vectors onto a single vector. Prerequisites. Inner product (dot product) and orthogonal vectors. The Inner Product We begin with the de nition of the inner product. De nition Let K and L be vectors from 4 n. The inner product (dot product) of vectors K and L is de ned by K L K T L Example If K and L, then Check this result in Matlab. >> u[;] K L K T L 0 u >> v[-4;] v -4

>> u *v ans 0 If K, L and M are vectors from 4 n and c is any real number, then it is not di cult to show that each of the following properties are true: ² K L L K ² K (L + M) K L + K M ² (ck) L K (cl) c(k L) ² K K 0 and K K 0if and only if K. Finally, orthogonal (perpendicular) vectors are de ned as follows. De nition 3 Let K and L be vectors from 4 n. Vectors K and L are orthogonal if and only if K L 0.. The Projection of One Vector Onto Another Figure shows the projection of vector K onto vector L. u proj v L u Figure. The projection of K onto L. In Figure, it is clear that the projection of K onto L is some scalar multiple of L; that is, proj L K cl.

u u-cv cv v Figure. The vector K cl is orthogonal to L. Note that the di erence vector K cl is orthogonal (perpendicular) to L. Consequently, L (K cl) 0 and we can use the previously mentioned properties to arrive at the following result: L K L (cl) 0 L K c(l L) 0 c(l L) L K c L K L L Finally, substitute result () into proj L K cl. () proj L K L K L L L () Example 4 Use formula () to nd the projection of K : onto L proj L K L K L L L 0 0 Check this result in Matlab. 3

>> (v *u)/(v *v)*v ans -. The Projection Matrix Let s rework formula (). First, when you multiply a vector by a scalar, it doesn t matter whether you position the scalar before or after the vector. proj L K L K L L L L L K L L Next, use the transpose de nition of the inner product followed by the associative property of multiplication. Remember, when performing the dot product, a scalar multiplier may be placed anywhere you wish. proj L K L T L L(LT K) L T L (LLT )K LLT L T L K The expression LL T is called an outer product (the transpose operator is outside the product versus its inside position in the inner product). If we de ne P LLT, then the projection formula becomes L T L proj L K P K, where P LLT L T L : The matrix P is called the projection matrix. You can project any vector onto the vector L by multiplying by the matrix P. Example 5 Let K onto L and nd P, the matrix that will project any matrix onto the vector L. Use the result to nd proj L K. First, nd the projection matrix. P LLT L T L T T 4

6 8 8 4 0 : 8 : 4 : 4 : Check this result in Matlab. >> P(v*v )/(v *v) P 0.8000-0.4000-0.4000 0.000 Use this result to nd the projection of K onto L. proj L K P K Check this last result in Matlab. >> P*u : 8 : 4 : 4 : ans - Note that this is identical to the result in Example 4..3 Projecting a Lot of Vectors onto a Single Vector First, use Matlab to generate 00 random vectors and plot them. The following commands will produce an image similar to that in Figure 3. >> U8*rand(,00)-4; >> xu(,:); >> yu(,:); >> plot(x,y, o ) 5

4 0 - -4-4 - 0 4 Figure 3. The image in Figure 3 bears some explanation. Each circle in Figure 3 represents the tip of a vector whose tail begins at the origin. Next, use the projection matrix P to project each of the 00 vectors in matrix U onto the vector L, then plot the results on the graph in the color red. >> PUP*U; >> xpu(,:); >> ypu(,:); >> hold on >> plot(x,y, ro ) 4 0 - -4-4 - 0 4 Figure 4. In Figuure 4, note that each vector in the matrix U is projected onto a line in the direction of the vector L. Homework. Create 00 random vectors in a matrix U with components between and. Plot them. 6

(a) Create a matrix P which will project each of the vectors in matrix U onto the vector L. (b) Use the matrix P to project each vector in matrix U onto the vector L. Plot the results in a second color. (c) Obtain a printout of your result.. The column space of the projection matrix P is a line in the direction of the vector L. (a) What is the dimension of the column space of P? Check your answer with the ATLAST distribution s colbasis command. (b) What is the rank of P? command. Check your answer with Matlab s rank 3. If matrix P projects all vectors onto the vector L, what should the matrix PP do? Can you explain geometrically why the matrices PP and P are equal? Check this in Matlab.