lecture5

advertisement
Lecture 3
Hyper-planes, Matrices, and
Linear Systems
Scott Russell
Guarding Art Gallery
Visibility Problem
Art Gallery Problem
To learn more about this problem, you can
google “Art Gallery Problem” or
google “Art Gallery Problems”
Visibility Problems:
Intersection of Ray with Line or Plane
How to describe a line passing
a point along a direction?
How to describe a line and a plane?
How to find their intersection?
Line in 2D
x  2y  1
• By linear equation
x  2y  1
x=3
y=1
Line in 2D
x=3
y=1
• By a point and a vector: passing (3,1) along vector (2,1)
Parametriz ed set
( x, y)  (3,1)  t (2,1) : t
x  3  2t
y  1 
t
By eliminatin g t , we have
x  2y  1
Line in 2D
(3,1)
(0,-1/2)
• By two points: passing (3,1) and (0,-1/2)
Parametriz ed set
 x  3   0  3 

    : t 
      t  

 y  1   0.5 1 

Combine the same term, we have
 x 

3  0 
: t 
   (1  t )    t 

1  0.5
 y 

By eliminatin g t , we have
x  2y  1
Line and Affine Combination
in 2D
• The line passing two points or the affine combination of
two points is given by
Line or Affine Combinatio n of two points
 a1  a2  
line   ,     affine
  b1   b2  
 a1  a2  
  ,    
 b

b
 1  2 


a1  a2 
(1  t )    t   : t 
b1  b2 


System of Linear Equations (2D)
x
 2y 
1
3x  2 y  11
• Row Picture[conventional view]:
two lines meets at a point
3x  2 y  11
x  2y  1
x=3
y=1
System of Linear Equations (2D)
x
 2y 
1
3x  2 y  11
• Column Picture: linear combination of the
first two vectors produces the third vector
1
  2  1 
x   y    
3
 2  11
And geometrically
• Column Picture: linear combination of the
first two vector produce the third vector
1
  2  1 
x   y    
3
 2  11
1
11
 
  2
2
 
1
3
 
1
3 
3
x=3
y=1
Coefficient Matrix and
Matrix-Vector Product
x
 2y 
1
3x  2 y  11
1
  2  1 
x   y    
3
 2  11
1  2  x   1 
3 2   y   11

   
A 2 by 2 matrix is a square table of 4 numbers,
two per row and two per column
System of Linear Equations (3D)
x
 2 y  3z
 6
2x  5 y  2z  4
6x  3 y 
z
 2
• Row Picture[conventional view]:
Three planes meet at a single point
0 
0 
 
 2 
• Row Picture[conventional view]:
Two planes meet at a single line
A line and a plane meet at a single point
Intersection of Planes
System of Linear Equations (3D)
x
 2 y  3z
 6
2x  5 y  2z  4
6x  3 y 
z
 2
• Column Picture: linear combination of the
first three vectors produces the fourth
vector
0 
0 
1
 2   3  6 
 








 2 
x  2  y  5   z  2   4 
6
 3 1 2
Coefficient Matrix and
Matrix-Vector Product
x
 2 y  3z
 6
2x  5 y  2z  4
6x  3 y 
z
 2
1
 2   3  6 
x 2  y  5   z 2  4
6
 3 1 2
1 2 3  x  6
 2 5 2  y    4

   
6  3 1  z  2
A 3 by 3 matrix is a square table of 9 numbers,
three per row and three per column
Matrix Vector Product (by row)
• If A is a 3 by 3 matrix and x is a 3 by 1
vector, then in the row picture
 (row 1)  x 


Ax  (row 2)  x 
(row 2)  x 
Matrix Vector Product (by column)
• If A is a 3 by 3 matrix and x is a 3 by 1
vector, then in the row picture
Ax  x1 (column 1)  x2 (column 2)  x3 (column 3)
 x1 
where x   x2 
 x3 
More about 3D Geometry
• Points and distance, Balls and Spheres
– 0 dimension in 3 dimensions
• Lines
– 1 dimension in 3 dimensions
• Plane
– 2 dimensions in 3 dimensions
Line in 3D
• 2D
– By linear equation
– A point and a vector
– Two points
• Affine combination
• 3D
– A point and a vector
– Two points
• Affine combination
Line in 3D
• By a point and a vector: passing p along vector v
p  tv : t
x 
px
 tvx
y 
py
 tvy

pz
 tvz
z
Line and Affine Combination in 3D
• The line passing two points or the affine combination of
two points is given by
Line or Affine Combinatio n of two points
 u x   v x  
   
line  u y , v y   affine
   
 u  v  
 z   z 
 u x   v x  
   
 u y , v y   
 u  v  
 z   z 


u x   v x 






u
v
(1  t )  y   t  y  : t 


u
v




z
z
   


Plane in 3D
• Line in 2D
– By linear equation
– Affine combination of two points
• “Every” two points determine a line
• 3D
– By linear equation
– Affine combination of three points
• “Every” three points determine a plane
Linear Equation and its Normal
P  ( x, y, z ) : x  2 y  3 z  6
for any two points on P :  x1 , y1 , z1  and  x2 , y2 , z 2  we have,
x1  2 y1  3 z1  6
x2  2 y 2  3 z 2  6
implying
x1  x2   2 y1  y2   3z1  z2   0
so
 x1  x2  1 
 y  y   2
2
 1
 
 z1  z 2  3
Normal of a Plane
Plane and Affine Combination in 3D
plane  p1 , p2 , p3  
affine  p1 , p2 , p3  
 p1  p2  (1     ) p3 
u
p2
v
p1
u  tp1  (1  t ) p2
v  su  (1  s) p3  stp1  s(1  t ) p2  (1  s) p3
  st ,   s(1  t )
  s
p3
High Dimensional Geometric Extension
• Points and distance, Balls and Spheres
– 0 dimension in n dimensions
• Lines
– 1 dimension in n dimensions
• Plane
– 2 dimensions in n dimensions
• k-flat
– k-dimensions in n dimensions
• Hyper-plane
– (n-1)-dimensions in n dimensions
Affine Combination in n-D
affine  p1 , p2 ,, pk 
 p   p    1  
1 1
2
2
k 1
j 1
 
 j pk
Hyper-Planes in d-D
• Line in 2D
– By linear equation
– Affine combination of two points
• 3D
– By linear equation
– Affine combination of three points
• n-D
– By linear equation
– Affine combination of n-1 points
Linear Equation and its Normal


P  ( x1 , x2 , , xn ) : k 1 ak xk  b
n
Any two points on P : x   x1 , x2 , , xn  and y   y1 , y2 , , yn  ,


n
k 1
n
k 1
a k xk  b
ak y k  b
implying

n
k 1
a k ( xk  y k )  0
so
( x  y)  a
where
a  a1 , a2 , , an 
Matrix
(Uniform Representation for Any Dimension)
• An m by n matrix is a rectangular table of
mn numbers
 a1,1
a
2 ,1

A
 

am ,1
a1, 2
a2 , 2

am , 2
a1,n 
... a2,n 
...  

... am ,n 
...
Sometime we write A(i, j )  ai , j
Download