Linear Algebra: Section 4: Vectors Section 5: Lines and Planes
Linear Algebra: Section 4: Vectors Section 5: Lines and Planes
q Section 4: Vectors
q Section 5: Lines and Planes
Vectors
q The length
of the arrow representing a
norm of A :
A A A = Ax2 + Ay2
in 2D
in 3D
q The
= arctan
Ay
Ax
Unit vectors
q Unit vectors along x-, y- and z- axes are
labeled i , j and k , respectively.
components:
A = Ax i + Ay j + Az k
A + B = (Ax + Bx )i + (Ay + By ) j + (Az + Bz ) k
Vector operations
y
q Vectors
can also be added geometrically:
of A to the head of B .
A
O
q Commutative law for vector addition: A + B = B
+A
( A + B) + C = A + ( B + C )
scalar: C = cA
q Multiplying vector by a
as A if c>0 (c<0).
q Vector subtraction D = A B can be done geometrically
and B ; or algebraically: Dx = Ax Bx , Dy = Ay By
(by adding A
A B = Ax Bx + Ay By + Az Bz
q The above two equations give us expression for the angle between vectors
and B :
cos =
Ax Bx + Ay By + Az Bz
=
AB
Ax Bx + Ay By + Az Bz
Ax2 + Ay2 + Az2 Bx2 + By2 + Bz2
q Commutative
law for scalar product of vectors:
A B = B A
( B + C ) A = B A + C A
A A = A 2
C =AB
magnitude of C is determined
C = A B sin
as:
The direction
of
is determined using
q Note that: A B = B A
q Vector product of any two parallel vectors is
equal to
zero.
Thus
A
A =0 .
vectors:
A (B + C ) = A B + A C
j k = i
k i = j
j i = k
k j = i
i k = j
i j = k
A B = (Ay Bz Az By )i + (Az Bx Ax Bz ) j + (Ax By Ay Bx ) k =
j
i
k
= Ax Ay Az
Bx By Bz
point
r = xi + yj + zk
(x,y,z)
r"
head of r . That is
(x,y,z)
d = r r # = (x x#)i + (y y#) j + (z z#) k
length
of vector d :
d = (x x#) 2 + (y y#) 2 + (z z#) 2
8
Line in 2D
q Lets say, we know that a line goes
through a point (x0 , y0 ) and has a slope m.
Then equation for this line is:
(x, y) .
(x0 , y0)
.
x - x0
y y0
=m
x x0
m = tan
y - y0
Line in 2D
y
vector A = ai + bj .
First, note that the vector along the line that
connects (x0 , y0 ) to (x, y ) is
r r0 = (x x 0 )i + (y y 0 ) j
Given that
and r r0 are parallel vectors
we
can write:
x x 0 y y 0
=
a
b
or equivalently
(x, y) .
r r0
y - y0
(x0 , y0)
.
x - x0
y y0 b
=
x x0 a
or equivalently
{xy == yx ++ aa tt
0
10
Line in 3D
q If we know that a line goes through point (x0, y0, z0 ) and is parallel to a
where
a 0, b 0, c 0
q If we know that a line goes through point (x0, y0, z0 ) and is parallel to
x x0 y y0
=
, z = z0
a
b
where
a 0, b 0, c = 0
or equivalently
!# x = x0 + ax t
" y = y0 + ay t
#$ z = z0 + az t
of a particle.
11
Plane
q Lets say, we know that a plane goes
through a point (x0 , y0 , z0)and is
perpendicular to a vector N = ai + bj + ck .
A vector that connects point (x0 , y0 , z0)
with any other point
(x , y, z) on the
plane is:
r r0 = (x x 0 )i + (y y 0 ) j + (z z0 ) k
r r0
.(x, y, z)
(x0, y0, z0 )
So we can write:
( r r0 ) N = 0
a(x
x 0 ) + b(y y 0 ) + c(z z0 ) = 0
or equivalently
ax + by + cz = d where d = ax 0 + by 0 + cz0
"
$
$
#
$
$%
Plane equations
12