Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

School of Mathematics and Statistics

Math1131-Algebra

Lec04: Linear Combinations and Planes


Jim Pettigrew
j.pettigrew@unsw.edu.au

Slides based on those written by


Laure Helme-Guizon and Jonathan Kress

2024 Term 1
Learning outcomes for this lecture
At the the end of this lecture,

you should know the difference between Cartesian equations and parametric
equations;
you should be able to go back and forth between parametric equations of a line and
Cartesian equations of this line in R2 and in R3 ;
you should know what a linear combination is;
you should know what the span of a set of vectors is, and what it means for a vector
to be in the span of some vectors;
you should be able to write a parametric vector equation of a plane given a point on
the plane and two non-parallel vectors which are parallel to the plane;
conversely, you should be able to recognise when a parametric vector equation
describes a plane and from the equation, you should be able to find a point on the
plane and two non-parallel vectors which are parallel to the plane;
you should be able to go back and forth between a parametric equation of a plane
in R3 . and a Cartesian equation of this plane.

You can use this list as a check list to get ready for our next class: After studying the lecture
notes, come back to this list, and for each item, check that you have indeed mastered it.
Then tick the corresponding box ... or go back to the notes.

1 / 16
Parametric to Cartesian equations of a line in R3
Example 1. Find Cartesian equations for the line ℓ given parametrically as
     
x
  
1 
1
     
y  =  2  + λ  3  λ ∈ R
     
z −5 −1

2 / 16
Cartesian to parametric vector form of a line
Example 2. Find the a parametric vector equation for each of the following lines.
x−3 y+1
a) ℓ1 : = = z − 8 in R3 .
5 2

x−3 y+1
b) ℓ2 : = , z = 8 in R3 .
5 2

3 / 16
Cartesian to parametric vector form of a line
Example 2, continued.
Find the a parametric vector equation for each of the following lines.
c) ℓ3 : y = 3x + 2 in R2 .

d) ℓ4 : x = 8 in R2 .

e) ℓ5 : y = 2x + 1, z = 2 in R3 .

4 / 16
Linear combinations

Linear combinations of two vectors


We say that a vector −
→v is a linear combination of two vectors −
→v1 and −→
v2

→ −
→ −
→ −

if v is a sum of scalar multiples of v1 and v2 , i.e. if v can be written


v = λ1 −

v1 + λ2 −

v2 ,

where λ1 and λ2 are scalars.


− v2
λ 2

− +
λ1 −
→ v 1
v1 λ 1



v1 λ2 −

v2
b −

v2

5 / 16
I have seen this before...

6 / 16
Linear combinations
With −

v1 and −

v2 we can make many different linear combinations.

b
P


− v2
λ 2
b
P
+


λ1 −

v1 λ 1
v1



P v1 λ2 −

b
v2
b −

v2
O

b
P

7 / 16
Span of two vectors
Span of two vectors
The set of all linear combinations of −

v1 and −

v2 is called the span of −

v1 and −

v2 .

span(−

v1 , −

v2 ) = −→
v :−

v = λ1 −

v1 + λ2 −

{ }
v2 , λ1 , λ2 ∈ R .

Example 3.      

−3 
0 0
a) Is −

u =  → 
− 
  → 
− 


 2  in the span of u1 = 1 and u2 = −1?
     
6 2 0

8 / 16
Span of two vectors
Span of two vectors
The set of all linear combinations of −

v1 and −

v2 is called the span of −

v1 and −

v2 .

span(−

v1 , −

v2 ) = −→
v :−

v = λ1 −

v1 + λ2 −

{ }
v2 , λ1 , λ2 ∈ R .

Example 3, continued.
    
0
 
1 5
b) Is −

w =  → 
− 
  → 
− 


0 in the span of w1 = 2 and w2 =  2 ?
     
0 1 −4

9 / 16
Span
Example 3, continued.
     

−3 1
  
5
c) −
→ 
Is v =  2 −
→  
in the span of v1 =  −
→ 
2 and v2 =  2
?
     
6 1 −4

10 / 16
Planes and lines through the origin

The span of two non-zero non-parallel vectors is a plane through the origin.
We say that span(−

v1 , −

v2 ) is the plane spanned by −

v1 and −

v2 .

In MATH1231, we will define the span of any number of vectors.

Example 4 (Important!) Geometrically, what is the span of one non-zero vector


{ }
span(−

v1 ) = −→
x :−

x = λ1 −

v1 , λ1 ∈ R ?



v1
b
O

11 / 16
Planes
Planes in Rn
A plane in Rn is the set of points or vectors −

x given by


x =−

a + λ1 −

v1 + λ2 −

v2 , λ1 , λ2 ∈ R,

where −
→a ∈ Rn gives a point on the plane and − →
v1 , −
→v2 ∈ Rn are a pair of
non-zero, non-parallel vectors that are directions in the plane.

b
P



v2
A b


v1

→ −

x
a
b

Example 5. To be done on the next slide.


Find the a parametric vector form of the plane Π passing through the three points
A(1, −2, 1), B(2, 1, 1) and C(0, 3, 1).

12 / 16
Parametric equation of a plane from three points

Example 5.
Find the a parametric vector form of the plane Π passing through the three points
A(1, −2, 1), B(2, 1, 1) and C(0, 3, 1).

13 / 16
Parametric equation of a plane from 1 point and 2 lines

Example 6. Find the a parametric vector form of the plane Π passing through the
point (2, −1, 2) and parallel to the lines
x − 2 y − 1 2z − 3
ℓ1 : = =
3 −3 8
   
and −2 2
  
ℓ2 : −
→ 
x = 3  
+ λ 1 , λ ∈ R.
   
1 1

14 / 16
Cartesian equation of a plane
Example 7. For the plane Π given by
       
x
 1
1
  
0 
4
       
x2  = 2 + λ1 −1 + λ2 −2 , λ1 , λ2 ∈ R,
       
x3 3 4 0

eliminate the parameters λ1 and λ2 to find an equation relating x1 , x2 and x3 .

15 / 16
Cartesian equation of a plane in R3
What does a Cartesian equation of a plane in R3 look like?
A Cartesian equation of a plane in R3 is an equation of the form

ax1 + bx2 + cx3 = d

for some a, b, c, d ∈ R with at least one of a, b and c non-zero.

Example 8. Find the a vector equation for the plane Π in R3 , Π : x1 + 2x2 − x3 = 3.

Don’t forget to read Chapter 1 of the Algebra Notes! (It is the big yellow book
that was in the course pack, the one that contains the Algebra tutorial
questions.)

16 / 16
School of Mathematics and Statistics
Math1131-Algebra

Lec05: Scalar (dot) Product


Jim Pettigrew
j.pettigrew@unsw.edu.au

Slides based on those written by


Laure Helme-Guizon and Jonathan Kress

2024 Term 1
Learning outcomes for this lecture

At the the end of this lecture on the dot product = scalar product,

you should know how to calculate the scalar (dot) product of two vectors given
their components; you should know the scalar product of two vectors is NOT a
vector, it is a scalar! Hence the name scalar product
you should be able to calculate the length of a vector and know how it is related to
the scalar product (the square of the length is equal to the dot product of the vector
with itself )
you should know the formula that gives the dot product of two vectors in terms of
their lengths and the cosine of the angle between them and know how to use it
to calculate the angle between two vectors
you should be able to perform calculations involving the dot product (The rules
are what you expect for a product –commutative, distributive– hence the name)
you should know what the triangle inequality says and what it means geometrically

You can use this list as a check list to get ready for our next class: After studying the lecture
notes, come back to this list, and for each item, check that you have indeed mastered it.
Then tick the corresponding box ... or go back to the notes.

1 / 15
Length in n dimensions
The length of a vector −

a ∈ Rn with
 
a  1
 
 2


a = .. = a1 −
a 




e1 + a2 −

e2 + · · · + an −

en
 
.



an
is defined to be √
|−

a | = a21 + a22 + · · · + a2n .
If |−

a | = 1 we say that −

a is a unit vector and we sometimes write â instead of −

a.

Properties of the length/magnitude/norm of a vector


• |−

a | is a real number.
• |−

a | ⩾ 0.


• |−

a | = 0 ⇐⇒ −

a = 0 (“ ⇐⇒ " is read “if and only if ")
• |λ−

a | = |λ||−

a | for λ ∈ R.

2 / 15
Length in n dimensions
 

1
 

→  2 

Example 1. Find two vectors of length 5 parallel to w =  .

 3 
 
−6

3 / 15
Scalar/dot product of two vectors

Scalar (dot) product of two vectors




The dot product or scalar product of two vectors −

a , b ∈ Rn with
   
 a1   b1 
 

→  a2 
  → 
−  

 b2 
a = 
 ..  and b =  
 .. 
 .   . 
   
an bn


is −
→ n

a · b = a1 b1 + a2 b2 + · · · + an bn = ak bk .
k=1

Example 2. Calculate the following scalar products:


       
1 3 1 −2
a)   ·   = 1 × 3 + 2 × 4 = 11. c)   ·   = . . .
2 4 2 1

       
1 1 3  1
b)   ·   = . . . 

2 2 d) 

0  
 · 1 = . . .
  
−4 1

4 / 15
Cosine rule for triangles
We will need it to establish a second formula for the scalar product, see next slide.

Cosine rule : Generalisation of Pythagoras’ theorem to ALL triangles



→ −

For any triangle, |− →
c |2 = |−
→a |2 + | b |2 − 2|−

a || b | cos θ


where θ ∈ [0, π] is the smallest angle between − →
a and b .

Consider a triangle in Rn with sides −



a,

a | sin θ

→ −
→ −
→ −

b and c = a − b . −

a


Let θ be the smallest angle between −→


c

|−
a


and b .
Apply Pythagoras’ Theorem to the θ
shaded triangle. −
→ −
b |→
a | cos θ

( ) ( )

→ 2
|−
→ |−

a | cos θ − | b | + |− → 2
c |2 = a | sin θ

→ −

= |−

a |2 cos2 θ + | b |2 − 2|−
→a || b | cos θ + |−

a |2 sin2 θ

→ −

= |−

a |2 + | b |2 − 2|−→
a || b | cos θ

5 / 15
A new formula for the scalar product in terms of the
angle between the two vectors

From the cosine rule for triangles (rearranged),



→ −
→ −

2|−

a || b | cos θ = |−

a |2 + | b |2 − |−

a − b |2


→ →2 (
− )
= | a | + | b | − (a1 − b1 ) + · · · + (an − bn )
2 2 2


→ →2 ( 2
− )
= | a | + | b | − (a1 + b1 − 2a1 b1 ) + · · · + (an + bn − 2an bn )
2 2 2 2


→ →2 (−
− → −
→2 −
→ →)

= |a| +| b | − |a| +| b | −2a · b
2 2

So

→ −
→ −

a · b = |−

a || b | cos θ
and −



− −

→ a

b
a · b
cos θ = −→ −
→.



| a || b |

a
θ


b

6 / 15
Scalar/dot product and angle between two vectors
The previous slide proves that:

Scalar product and angle between two vectors




The dot product or scalar product of two vectors −

a , b ∈ Rn is

→ −
→ −

a · b = |−

a || b | cos θ.


where θ is the smallest angle between −

a and b , with θ in the interval [0, π].

This formula is fundamental and should be committed to memory.


It can be used to calculate the angle between two vectors in Rn .
( ) ( )


Example 3. Find the angle θ between −
→ 2 1
a = and b = , with θ ∈ [0, π].
0 1

7 / 15
Scalar/dot product and angle between two vectors
By rearranging the previous result, we get:

Angle between two vectors in Rn



→ −

If −

a and b are two non-zero vectors in Rn , then the angle between −

a and b is given by:

→ −

a · b
cos θ = − −
→ where θ ∈ [0, π].
|→
a || b |

   
2 1
   
  −
→ 1

Example 4. Find the angle θ between −
→ 0
a =


 and b =  .
 3  0
−1 2

8 / 15
Algebraic properties of the scalar/dot product

The scalar/dot product behaves as expected for a product:



→ →
For all vectors −

a, b,− c ∈ Rn and λ ∈ R,

→ √→ −
□ a ·−→a = |−

a |2 , so |−→
a|= − a ·→ a [Very useful!]

→ −

□ a · b ∈R i.e, it is a scalar, NOT a vector!

→ −
→ − → →
□ a · b = b ·− a (commutative law)

→ −
→ −
→ →
□ a · (λ b ) = λ( b · −
a) (associative law of scalar multiplication)

→ −
→ → −
→ → −
□ a ·( b +− c)=− →
a · b +−
a ·→c (distributive law)

Exercise 5. For added fun, prove these laws.

9 / 15
Algebraic properties of the scalar/dot product

Exercise 6. Using the given laws, prove the following familiar looking formulas.

a) Expanding parentheses

→ → − → −
→ − → → − → − →
(−

a + b ) · (−
c + d)=−

a ·−

c +−

a · d + b ·−
c + b · d

b) Difference of squares

→ −
→ → − →
|−

a |2 − | b |2 = (−

a − b ) · (−
a + b)

c) Perfect squares

→ −
→ − →
|−

a + b |2 = |−

a |2 + 2−

a · b + | b |2

→ −
→ − →
|−

a − b |2 = |−

a |2 − 2−

a · b + | b |2

10 / 15
Algebraic properties of the scalar/dot product

Exercise 7. In what sense does the dot product fail to be a product?


In other words, what property does the product of real numbers have that the dot
product does not have?

11 / 15
Proofs in geometry using the scalar product

Two non-zero vectors make a right angle if and only if their scalar product is zero.

Exercise 8.
a) Prove the above fact.

12 / 15
Proofs in geometry using the scalar product

b) (Thales Theorem). Show that the angle inside a semicircle is a right angle.

13 / 15
Triangle inequality

Triangle Inequality

→ −
→ −

For all vectors −

a and b in Rn , |−

a + b | ⩽ |−

a|+| b |

Exercise 9. Draw a diagram to illustrate the Triangle Inequality


(See the Algebra Notes or later in this lecture for a proof.)

14 / 15
Cauchy-Schwarz inequality

Cauchy-Schwarz inequality

→ −
→ −

For any vectors −

a and b in Rn , |−

a · b | ⩽ |−

a || b |

Exercise 10.
a) Prove Cauchy-Schwarz inequality.
b) Hence or otherwise, prove the Triangle Inequality.
(The solution is in the Algebra Notes.)

15 / 15

You might also like