Introduction 
Matrix Action 
Perpframes, Aligners and Hangers 
Stretchers 
Coordinates 
Projections 
SVD 
Matrix Subspaces  
Linear Systems, Pseudo-Inverse 
Condition Number 
Matrix Norm, Rank One 
Data Compression 
Noise Filtering 
Todd Will
UW-La Crosse
  Multiple Hits 
Projecting to a line

Projections

Projecting to a plane 
Simplified formula 
Exercise

Hitting with one matrix and then another 

Here's a perpframe [Graphics:projectionsgr1.gif] and [Graphics:projectionsgr2.gif] specified by angle [Graphics:projectionsgr3.gif]
[Graphics:projectionsgr4.gif] 

Plot an ellipse with a minor axis of 0.5 in the direction of [Graphics:projectionsgr6.gif] and major axis of 1.2 in the direction of [Graphics:projectionsgr7.gif]



Answer: You know how to plot the unit circle: 

[Graphics:projectionsgr8.gif]
[Graphics:projectionsgr9.gif] 

You know how to use an xy-stretcher to stretch the circle into an ellipse with the desired axes lengths: 

[Graphics:projectionsgr10.gif]
[Graphics:projectionsgr11.gif]
[Graphics:projectionsgr12.gif] 


The ellipse you're looking at now is given by [Graphics:projectionsgr13.gif][Graphics:projectionsgr14.gif]
 
 

All you need to do is hang the ellipse on the perpendicular frame. 

To do that you hit the curve [Graphics:projectionsgr15.gif] with the [Graphics:projectionsgr16.gif] matrix. 
 

[Graphics:projectionsgr17.gif] 

[Graphics:projectionsgr18.gif]
[Graphics:projectionsgr19.gif] 
 

An ellipse with a minor axis of 0.5 in the direction of [Graphics:projectionsgr20.gif] and major axis of 1.2 in the direction of [Graphics:projectionsgr21.gif]

Just what the doctor ordered. 


In the problem above you used two matrix hits to plot an ellipse. 

Plot the same ellipse again, but this time use only one matrix hit. 

AnswerAbove, you defined a stretcher matrix and a hanger matrix and then plotted the results of a hit with the stretcher followed by a hit with the hanger: 

[Graphics:projectionsgr22.gif]
[Graphics:projectionsgr23.gif] 

If you multiply the out (hanger) (stretcher) you get: 
 

product = (hanger) (stretcher) =[Graphics:projectionsgr24.gif].
 
 

Now hit the unit circle with the product: 

[Graphics:projectionsgr25.gif]
[Graphics:projectionsgr26.gif] 
This time you get the desired ellipse using just one matrix hit. 
 

Apparently, 

the action of the matrix product: product = (hanger) (stretcher 

is the same as 

the action of the stretcher followed by the action of the hanger
 
 

Key point:  The action of a matrix product: A=B C is the same as the action of the C followed by the action of B
 



 

The point on a line through {0,0} closest to P.

Here's a plot of the point [Graphics:projectionsgr27.gif]
[Graphics:projectionsgr28.gif] 

What point on the x-axis is closest to the point [Graphics:projectionsgr29.gif]

Answer: It's gotta be the point [Graphics:projectionsgr30.gif]

Click here only if you're in doubt about this. 

What point on the y-axis is closest to the point [Graphics:projectionsgr39.gif]

Answer: It's gotta be the point [Graphics:projectionsgr40.gif]

Click here only if you're in doubt about this. 


How can you get these closest points with matrix hits? 

AnswerTo get the closest point on the x-axis, hit [Graphics:projectionsgr49.gif] with the xy-stretcher that squashes the y-coordinate but leaves the x-coordinate unchanged. 

The xy-stretcher you want is [Graphics:projectionsgr50.gif]

Check: [Graphics:projectionsgr51.gif][Graphics:projectionsgr52.gif]=[Graphics:projectionsgr53.gif] 
 

To get the closest point on the y-axis hit [Graphics:projectionsgr54.gif] with the xy-stretcher that squashes the x-coordinate but leaves the y-coordinate unchanged. 

The xy-stretcher you want is [Graphics:projectionsgr55.gif]

Check: [Graphics:projectionsgr56.gif][Graphics:projectionsgr57.gif]=[Graphics:projectionsgr58.gif] 


Here's a plot of a perpframe and the point [Graphics:projectionsgr59.gif]

[Graphics:projectionsgr60.gif] 
 

The plot also shows lines through [Graphics:projectionsgr61.gif] parallel to [Graphics:projectionsgr62.gif] and [Graphics:projectionsgr63.gif] 

What point on the green line is closest to the point [Graphics:projectionsgr64.gif]


Answer: This is a lot harder than asking what point on the x-axis is closest to [Graphics:projectionsgr65.gif]

Look at the following plots. 

[Graphics:projectionsgr66.gif] 
 
[Graphics:projectionsgr67.gif] 
 
[Graphics:projectionsgr68.gif] 
 
[Graphics:projectionsgr69.gif] 

S is the point on the green line closest to [Graphics:projectionsgr70.gif]

Explain how the S got where it did. 


Answer:  Look again at the first two plots. 

[Graphics:projectionsgr71.gif] 
 
[Graphics:projectionsgr72.gif] 

You get from the first plot to the second plot by rotating the perpframe vectors [Graphics:projectionsgr73.gif] and [Graphics:projectionsgr74.gif] to the x and y axes. 

This rotates the green line to the x-axis and the point [Graphics:projectionsgr75.gif] to the new position [Graphics:projectionsgr76.gif]

You get this rotation with the [Graphics:projectionsgr77.gif]


Look at the second and third plots: 

[Graphics:projectionsgr78.gif] 
 
[Graphics:projectionsgr79.gif] 

R is the point on the x-axis closest to Q. 

You can get R by hitting Q with the [Graphics:projectionsgr80.gif]

This squashes Q's y-coordinate, but leaves the x-coordinate unchanged. 


Look at the third and fourth plots: 

[Graphics:projectionsgr81.gif] 
 
[Graphics:projectionsgr82.gif] 
 

Here you rotate the xy-axis back to the perpframe vectors. 

The point R gets rotated to S. 

This is a job for the [Graphics:projectionsgr83.gif]


Summary: You arrived at S by hitting P, 
 

  • first with [Graphics:projectionsgr84.gif]

  •  
  • then with [Graphics:projectionsgr85.gif]

  •  
  • and finally with [Graphics:projectionsgr86.gif]
 

This says you can get the coordinates of the point on the green line closest to [Graphics:projectionsgr87.gif] by computing 

[Graphics:projectionsgr88.gif]
 
 
 

Compute this point and add it to the plot 
 

[Graphics:projectionsgr89.gif]
[Graphics:projectionsgr90.gif]
[Graphics:projectionsgr91.gif] 

Looks good. 


Take a look at the original setup again. 

What point on the blue line is closest to the point [Graphics:projectionsgr92.gif]
 

[Graphics:projectionsgr93.gif] 

Answer:  This time you should try to imagine the picture for each step: 
 

  • Use the aligner matrix to rotate the [Graphics:projectionsgr94.gif] and [Graphics:projectionsgr95.gif] to the xy-axis. 

  • This rotates P to a new position Q. 
  • Use a stretcher matrix to find the point on the y-axis (the new location of the blue line) closest to Q. 
  • Use the hanger matrix to rotate back to the original perpframe. 
This says that [Graphics:projectionsgr96.gif] should give you the point on the blue line closest to P. 

You use [Graphics:projectionsgr97.gif]for the stretcher since you want to squash the x but leave the y unchanged. 

Compute [Graphics:projectionsgr98.gif] and add it to the plot. 

[Graphics:projectionsgr99.gif] 

Looks good. 



 

It's good to be able to imagine all of the matrix action that leads from [Graphics:projectionsgr100.gif] to the blue dot, but you deserve to see it too. 

Enjoy! 


The point on a plane through {0,0,0} closest to P.

Here's a plot of a point [Graphics:projectionsgr101.gif]and a perpframe [Graphics:projectionsgr102.gif]
[Graphics:projectionsgr103.gif] 

The plot also shows the plane through [Graphics:projectionsgr104.gif] spanned by [Graphics:projectionsgr105.gif] and [Graphics:projectionsgr106.gif] 

What point on the plane is closest to the point [Graphics:projectionsgr107.gif]


Answer this question in stages. 

First align the plane spanned by [Graphics:projectionsgr108.gif] and [Graphics:projectionsgr109.gif] with the xy-plane. 

Do this by hitting with the aligner=[Graphics:projectionsgr110.gif]

Q=[Graphics:projectionsgr111.gif]
[Graphics:projectionsgr112.gif] 

The aligner has rotated the perpframe to xyz-axis. 

The original plane has been rotated to the xy-plane. 

The point P has been rotated to the point Q. 

The distances from P to the original plane are the same as distances from Q to the xy-plane. 

But finding the point on the xy-plane closest to Q is a snap. 

Just hit Q with a stretcher matrix that leaves the x and y coordinates unchanged, but squashes the z coordinate. 
 

[Graphics:projectionsgr113.gif] 
[Graphics:projectionsgr114.gif] 
The point R is the point on the xy-plane closest to Q. 
 

Now hang the plane back in its original position to find the point closest to P. 

Do this with the hanger matrix. 

[Graphics:projectionsgr115.gif] 
[Graphics:projectionsgr116.gif] 
Watch all three stages. 

Summary: You arrived at S, the point on the plane closest to P, by hitting P, 
  • first with [Graphics:projectionsgr117.gif]
  • then with [Graphics:projectionsgr118.gif]
  • and finally with [Graphics:projectionsgr119.gif]
This says you can get the coordinates of the point on the green line closest to [Graphics:projectionsgr120.gif] by computing 
[Graphics:projectionsgr121.gif] 

Simplified formulas.

You'll see later that the product [Graphics:projectionsgr122.gif] simplifies to just [Graphics:projectionsgr123.gif]
 

More generally, (but without the pictures), if 

  • [Graphics:projectionsgr124.gif] is an orthonormal basis for [Graphics:projectionsgr125.gif] 

  • and S is the subspace spanned by [Graphics:projectionsgr126.gif], r<m. 


Then the point in S closest to Q is given by 


S[Graphics:projectionsgr127.gif]
 
 
 

Exercise

1.  Here's a plot of a perpframe and the curve 

{x[t],y[t]}={1+Cos[t] (0.2 -Sin[t]) Sin[t],  1.2 +Cos[t] (0.6 -Sin[t])} 

[Graphics:exercisegr1.gif] 

Hitting this curve with the stretcher matrix [Graphics:exercisegr3.gif] reflects the curve across the y-axis. 

[Graphics:exercisegr4.gif] 

Your job is to define matrices A, B, C, (in terms of [Graphics:exercisegr5.gif] and [Graphics:exercisegr6.gif]), so that the matrix product ABC reflects the curve across the green line as shown below: 

[Graphics:exercisegr7.gif] 


© 1999 Todd Will
Last Modified: 22-Feb-1999
Hit Counter