TMA4115 Matematikk 3
Andrew Stacey
Norges Teknisk-Naturvitenskapelige Universitet
Trondheim
Spring 2010
Lecture 15: Euclidean Space, Sweet
Euclidean Space
Andrew Stacey
Norges Teknisk-Naturvitenskapelige Universitet
Trondheim
3rd March 2010
Key Points
I
I
“Vector spaces” are the right “homes”
for the inputs and outputs of matrices
“Vector spaces” are spaces that
“look like Rn ”
Recap
I
Special Processes
Matrices
Static versus Dynamic
Matrices
Special Processes
Static versus Dynamic
Matrices
Special Processes
1 2
3 4
4 6
" #
x 1 + 2x 2
x1
7→ 3x 1 + 4x 2
x2
4x 1 + 6x 2
Static versus Dynamic
Matrices
Special Processes
1 2
3 4
4 6
" #
x 1 + 2x 2
x1
7→ 3x 1 + 4x 2
x2
4x 1 + 6x 2
Data
Function
Representation
Actuality
Static
Dynamic
Implementation
apply matrix A (x)
{
for (i=1; i<=m; i++) {
y.i = 0;
for (j=1; j<=n; j++) {
y.i += A.i.j*x.j;
}
}
}
return y;
}
Implementation
vector apply matrix A (vector x)
{
vector y;
for (i=1; i<=m; i++) {
y.i = 0;
for (j=1; j<=n; j++) {
y.i += A.i.j*x.j;
}
}
}
return y;
}
Implementation
m-vector apply matrix A (n-vector x)
{
m-vector y;
for (i=1; i<=m; i++) {
y.i = 0;
for (j=1; j<=n; j++) {
y.i += A.i.j*x.j;
}
}
}
return y;
}
Implementation of “Do Nothing”
Implementation of “Do Nothing”
do nothing(x)
{
return x;
}
Implementation of “Do Nothing”
do nothing(x)
{
return x;
}
With extremely strict typing:
type do nothing(type x)
{
return x;
}
Implementation of “Do Nothing”
do nothing(x)
{
return x;
}
With extremely strict typing:
type do nothing(type x)
{
return x;
}
I
For each type, a different process.
Implementation of “Do Nothing”
do nothing(x)
{
return x;
}
With extremely strict typing:
type do nothing(type x)
{
return x;
}
I
I
For each type, a different process.
For each n, a different identity matrix.
Implementation of “Say Sausages”
say sausages(x)
{
return ‘‘sausages’’;
}
Implementation of “Say Sausages”
say sausages(x)
{
return ‘‘sausages’’;
}
With extremely strict typing:
food say sausages(type x)
{
return ‘‘sausages’’;
}
Implementation of “Say Sausages”
say sausages(x)
{
return ‘‘sausages’’;
}
With extremely strict typing:
food say sausages(type x)
{
return ‘‘sausages’’;
}
I
For each type, a different process.
Mathematical Data Typing
Rough Definition
A
set
or
mathematical data type
is a collection of elements that can be precisely defined
i.e. the question:
“is x in X ?” (x ∈ X ?)
always returns TRUE or FALSE
Mathematical Data Typing
Rough Definition
A
set
or
mathematical data type
is a collection of elements that can be precisely defined
i.e. the question:
“is x in X ?” (x ∈ X ?)
always returns TRUE or FALSE
A process always has a set of
valid inputs
and
possible outputs
Typing Wrapper
boolean can I do function (function f, element x)
{
if (f.valid inputs = x.containing set)
{
return TRUE;
}
else
{
return FALSE;
}
}
Typing Wrapper
boolean can I do function (function f, element x)
{
if (f.valid inputs = x.containing set)
{
return TRUE;
}
else
{
return FALSE;
}
}
Caution
Always declare your variables!
A Home for Vectors
Question
1. What is the right set of “valid inputs” for a matrix?
2. What is the right set of “possible outputs” for a
matrix?
A Home for Vectors
Question
1. What is the right set of “valid inputs” for a matrix?
2. What is the right set of “possible outputs” for a
matrix?
Answer
1. All vectors of the right length
2. All vectors of the right length
A Home for Vectors
Question
1. What is the right set of “valid inputs” for a matrix?
2. What is the right set of “possible outputs” for a
matrix?
Answer
1. All vectors of the right length
2. All vectors of the right length
Note: possible outputs not actual outputs.
Vectors
Question
What is a vector?
Vectors
Question
What is a vector?
Answer
An ordered list of n real numbers.
Vectors
Question
What is a vector?
Answer
An ordered list of n real numbers.
Example
(1, 2, 3, 4), (π, e, πe , eπ )
Vectors
Question
What is a vector?
Answer
An ordered list of n real numbers.
Example
(1, 2, 3, 4), (π, e, πe , eπ )
Exact notation not important so long as order is clear.
1, 2 ,
" #
1
,
2
2
1
Vectors
Question
What is a vector?
Answer
An ordered list of n real numbers.
Example
(1, 2, 3, 4), (π, e, πe , eπ )
Exact notation not important so long as order is clear.
1, 2 ,
" #
1
,
2
2
1
Euclidean Space
Definition
n–dimensional (Euclidean) space
is the set of all vectors (of real numbers) of length n
Notation: Rn
Euclidean Space
Definition
n–dimensional (Euclidean) space
is the set of all vectors (of real numbers) of length n
Notation: Rn
I
EP: n–dimensional space
Euclidean Space
Definition
n–dimensional (Euclidean) space
is the set of all vectors (of real numbers) of length n
Notation: Rn
I
EP: n–dimensional space (bit vague)
Euclidean Space
Definition
n–dimensional (Euclidean) space
is the set of all vectors (of real numbers) of length n
Notation: Rn
I
I
EP: n–dimensional space (bit vague)
Euclidean can imply distance as well
Euclidean Space
Definition
n–dimensional (Euclidean) space
is the set of all vectors (of real numbers) of length n
Notation: Rn
I
I
I
EP: n–dimensional space (bit vague)
Euclidean can imply distance as well
“x ∈ Rn ” means “let x be an ordered list of n real
numbers”
Euclidean Space
Definition
n–dimensional (Euclidean) space
is the set of all vectors (of real numbers) of length n
Notation: Rn
I
I
I
I
EP: n–dimensional space (bit vague)
Euclidean can imply distance as well
“x ∈ Rn ” means “let x be an ordered list of n real
numbers”
“x ∈ Rn ?” means “is x an ordered list of n real
numbers?”
. . . The Company That He Keeps
Idea
Use vectors to study matrices.
. . . The Company That He Keeps
Idea
Use vectors to study matrices.
. . . The Company That He Keeps
Idea
Use vectors to study matrices.
0
0
5
3
5
4
1
2
3
4
1
2
. . . The Company That He Keeps
Idea
Use vectors to study matrices.
0
0
5
3
5
4
2
3
1
4
1
n 7→ n2
mod 6
2
Structure Reveals Structure
Idea
Use structure of Rn to study matrices.
Structure Reveals Structure
Idea
Use structure of Rn to study matrices.
What structure is on R ?
Structure Reveals Structure
Idea
Use structure of Rn to study matrices.
What structure is on R ?
1. Addition: x + y
Structure Reveals Structure
Idea
Use structure of Rn to study matrices.
What structure is on R ?
1. Addition: x + y
2. Subtraction: x − y
Structure Reveals Structure
Idea
Use structure of Rn to study matrices.
What structure is on R ?
1. Addition: x + y
2. Subtraction: x − y
3. Multiplication: x · y
Structure Reveals Structure
Idea
Use structure of Rn to study matrices.
What structure is on R ?
1. Addition: x + y
2. Subtraction: x − y
3. Multiplication: x · y
4. Additive Inverse: −x
Structure Reveals Structure
Idea
Use structure of Rn to study matrices.
What structure is on R ?
1. Addition: x + y
2. Subtraction: x − y
3. Multiplication: x · y
4. Additive Inverse: −x
5. Multiplicative Inverse: x −1
Structure Reveals Structure
Idea
Use structure of Rn to study matrices.
What structure is on R ?
1. Addition: x + y
2. Subtraction: x − y
3. Multiplication: x · y
4. Additive Inverse: −x
5. Multiplicative Inverse: x −1
6. Special Elements: 0, 1
Structure Reveals Structure
Idea
Use structure of Rn to study matrices.
What structure is on R ?
1. Addition: x + y
2. Subtraction: x − y
3. Multiplication: x · y
4. Additive Inverse: −x
5. Multiplicative Inverse: x −1
6. Special Elements: 0, 1
7. Length: |x|
Structure Reveals Structure
Idea
Use structure of Rn to study matrices.
What structure is on R ?
1. Addition: x + y
2. Subtraction: x − y
3. Multiplication: x · y
4. Additive Inverse: −x
5. Multiplicative Inverse: x −1
6. Special Elements: 0, 1
7. Length: |x|
8. Scaling: λx
Structure Reveals Structure
Idea
Use structure of Rn to study matrices.
What structure is on R ?
1. Addition: x + y
2. Subtraction: x − y
3. Multiplication: x · y
4. Additive Inverse: −x
5. Multiplicative Inverse: x −1
6. Special Elements: 0, 1
7. Length: |x|
8. Scaling: λx
9. Comparision: x ≥ y
Structure Reveals Structure
Idea
Use structure of Rn to study matrices.
What structure is on R ?
1. Addition: x + y
2. Subtraction: x − y
3. Multiplication: x · y
4. Additive Inverse: −x
5. Multiplicative Inverse: x −1
6. Special Elements: 0, 1
7. Length: |x|
8. Scaling: λx
9. Comparision: x ≥ y
10. More?
Structure Reveals Structure
Useful Structure
Useful structure: interacts nicely with matrices.
Structure Reveals Structure
Useful Structure
Useful structure: interacts nicely with matrices.
A 1 × 1–matrix is just . . .
Structure Reveals Structure
Useful Structure
Useful structure: interacts nicely with matrices.
h i
A 1 × 1–matrix is just . . . a number! a is x 7→ ax
Structure Reveals Structure
Useful Structure
Useful structure: interacts nicely with matrices.
h i
A 1 × 1–matrix is just . . . a number! a is x 7→ ax
1.
2.
3.
4.
5.
6.
7.
8.
9.
Addition: x + y
Subtraction: x − y
Multiplication: x · y
Additive Inverse: −x
Multiplicative Inverse: x −1
Special Elements: 0, 1
Length: |x|
Scaling: λx
Comparision: x ≥ y
Structure Reveals Structure
Useful Structure
Useful structure: interacts nicely with matrices.
h i
A 1 × 1–matrix is just . . . a number! a is x 7→ ax
1.
2.
3.
4.
5.
6.
7.
8.
9.
Addition: x + y
Subtraction: x − y
Multiplication: x · y
Additive Inverse: −x
Multiplicative Inverse: x −1
Special Elements: 0, 1
Length: |x|
Scaling: λx
Comparision: x ≥ y
ax + ay = a(x + y)
Structure Reveals Structure
Useful Structure
Useful structure: interacts nicely with matrices.
h i
A 1 × 1–matrix is just . . . a number! a is x 7→ ax
1.
2.
3.
4.
5.
6.
7.
8.
9.
Addition: x + y
Subtraction: x − y
Multiplication: x · y
Additive Inverse: −x
Multiplicative Inverse: x −1
Special Elements: 0, 1
Length: |x|
Scaling: λx
Comparision: x ≥ y
ax + ay = a(x + y)
ax − ay = a(x − y)
Structure Reveals Structure
Useful Structure
Useful structure: interacts nicely with matrices.
h i
A 1 × 1–matrix is just . . . a number! a is x 7→ ax
1.
2.
3.
4.
5.
6.
7.
8.
9.
Addition: x + y
Subtraction: x − y
Multiplication: x · y
Additive Inverse: −x
Multiplicative Inverse: x −1
Special Elements: 0, 1
Length: |x|
Scaling: λx
Comparision: x ≥ y
ax + ay = a(x + y)
ax − ay = a(x − y)
ax · ay = a 2 (x · y)
Structure Reveals Structure
Useful Structure
Useful structure: interacts nicely with matrices.
h i
A 1 × 1–matrix is just . . . a number! a is x 7→ ax
1.
2.
3.
4.
5.
6.
7.
8.
9.
Addition: x + y
Subtraction: x − y
Multiplication: x · y
Additive Inverse: −x
Multiplicative Inverse: x −1
Special Elements: 0, 1
Length: |x|
Scaling: λx
Comparision: x ≥ y
ax + ay = a(x + y)
ax − ay = a(x − y)
ax · ay = a 2 (x · y)
−ax = a(−x)
Structure Reveals Structure
Useful Structure
Useful structure: interacts nicely with matrices.
h i
A 1 × 1–matrix is just . . . a number! a is x 7→ ax
1.
2.
3.
4.
5.
6.
7.
8.
9.
Addition: x + y
Subtraction: x − y
Multiplication: x · y
Additive Inverse: −x
Multiplicative Inverse: x −1
Special Elements: 0, 1
Length: |x|
Scaling: λx
Comparision: x ≥ y
ax + ay = a(x + y)
ax − ay = a(x − y)
ax · ay = a 2 (x · y)
−ax = a(−x)
(ax)−1 = a −1 x −1
Structure Reveals Structure
Useful Structure
Useful structure: interacts nicely with matrices.
h i
A 1 × 1–matrix is just . . . a number! a is x 7→ ax
1.
2.
3.
4.
5.
6.
7.
8.
9.
Addition: x + y
Subtraction: x − y
Multiplication: x · y
Additive Inverse: −x
Multiplicative Inverse: x −1
Special Elements: 0, 1
Length: |x|
Scaling: λx
Comparision: x ≥ y
ax + ay = a(x + y)
ax − ay = a(x − y)
ax · ay = a 2 (x · y)
−ax = a(−x)
(ax)−1 = a −1 x −1
a0 = 0, a1 = a
Structure Reveals Structure
Useful Structure
Useful structure: interacts nicely with matrices.
h i
A 1 × 1–matrix is just . . . a number! a is x 7→ ax
1.
2.
3.
4.
5.
6.
7.
8.
9.
Addition: x + y
Subtraction: x − y
Multiplication: x · y
Additive Inverse: −x
Multiplicative Inverse: x −1
Special Elements: 0, 1
Length: |x|
Scaling: λx
Comparision: x ≥ y
ax + ay = a(x + y)
ax − ay = a(x − y)
ax · ay = a 2 (x · y)
−ax = a(−x)
(ax)−1 = a −1 x −1
a0 = 0, a1 = a
|ax| = |a||x|
Structure Reveals Structure
Useful Structure
Useful structure: interacts nicely with matrices.
h i
A 1 × 1–matrix is just . . . a number! a is x 7→ ax
1.
2.
3.
4.
5.
6.
7.
8.
9.
Addition: x + y
Subtraction: x − y
Multiplication: x · y
Additive Inverse: −x
Multiplicative Inverse: x −1
Special Elements: 0, 1
Length: |x|
Scaling: λx
Comparision: x ≥ y
ax + ay = a(x + y)
ax − ay = a(x − y)
ax · ay = a 2 (x · y)
−ax = a(−x)
(ax)−1 = a −1 x −1
a0 = 0, a1 = a
|ax| = |a||x|
λ(ax) = a(λx)
Structure Reveals Structure
Useful Structure
Useful structure: interacts nicely with matrices.
h i
A 1 × 1–matrix is just . . . a number! a is x 7→ ax
1.
2.
3.
4.
5.
6.
7.
8.
9.
Addition: x + y
Subtraction: x − y
Multiplication: x · y
Additive Inverse: −x
Multiplicative Inverse: x −1
Special Elements: 0, 1
Length: |x|
Scaling: λx
Comparision: x ≥ y
ax + ay = a(x + y)
ax − ay = a(x − y)
ax · ay = a 2 (x · y)
−ax = a(−x)
(ax)−1 = a −1 x −1
a0 = 0, a1 = a
|ax| = |a||x|
λ(ax) = a(λx)
ax ≥ ay or ax ≤ ay)
Structure Reveals Structure
Useful Structure
Useful structure: interacts nicely with matrices.
h i
A 1 × 1–matrix is just . . . a number! a is x 7→ ax
1.
2.
3.
4.
5.
6.
7.
8.
9.
Addition: x + y
Subtraction: x − y
Multiplication: x · y
Additive Inverse: −x
Multiplicative Inverse: x −1
Special Elements: 0, (1)
Length: |x|
Scaling: λx
Comparision: x ≥ y
ax + ay = a(x + y)
ax − ay = a(x − y)
ax · ay = a 2 (x · y)
−ax = a(−x)
(ax)−1 = a −1 x −1
a0 = 0, a1 = a
|ax| = |a||x|
λ(ax) = a(λx)
ax ≥ ay or ax ≤ ay)
More Generally
Define addition, scaling, zero componentwise on vectors:
1 4 5
2 + 5 = 7
3
6
9
1 3
3 2 = 6
3
9
0
0 = 0
0
More Generally
Define addition, scaling, zero componentwise on vectors:
1 4 5
2 + 5 = 7
3
6
9
1 3
3 2 = 6
3
9
0
0 = 0
0
Note: fix size, then do operations.
Useful Structure
Addition, Subtraction, 0, Scaling
commute
with applying matrices
For x, y ∈ Rn , λ ∈ R
A (x + y) = A x + A y
A (λx) = λA x
A0 = 0
Useful Structure
Operations
I Addition: x + y
I Scaling: λx
I Zero Vector: 0
Useful Structure
Operations
I Addition: x + y
I Scaling: λx
I Zero Vector: 0
Identities
Useful Structure
Operations
I Addition: x + y
I Scaling: λx
I Zero Vector: 0
Identities
Associative
u + (v + w) = (u + v) + w
Commutative
u+v=v+u
Identity
v+0=v
Inverses
v + (−v) = 0
Distributivity
λ(u + v) = λu + λv
Compatibility (multiplication)
λ(µv) = (λµ)v
Compatibility (addition)
(λ + µ)v = λv + µv
Compatibility (unit)
1v = v
Aide–Mémoire
Addition, Scaling, Zero behave just like in R .
Some Special Vectors
Introducing. . .
0
..
.
0
ej = 1
0
.
..
0
jth
Some Special Vectors
Introducing. . .
0
..
.
0
ej = 1
0
.
..
0
The elementary vectors.
jth
Special Property One
Lemma
Every vector is a unique sum of scales of elementary
vectors.
Special Property One
Lemma
Every vector is a unique sum of scales of elementary
vectors.
Proof.
0
0
x 1
1
0
1
x
0
2
x = .. = x 1 .. + x 2 .. + · · · + x n ..
.
.
.
.
1
0
0
xn
= x 1 e1 + x 2 e2 + · · · + x n en
Examples
1 1
0
0
2 0
1
= + 2 + 3 0
1
3
0
0
1
0
0
0
π
e
0
1
0
0
= π + e + 0 + 2
0
0
0
1
0
0
1
2
0
0
Special Property Two
Lemma
A matrix is completely determined by what it does to the
elementary vectors.
Special Property Two
Lemma
A matrix is completely determined by what it does to the
elementary vectors.
Proof.
A x = A (x 1 e1 + x 2 e2 + · · · + x n en )
= x 1 A e1 + x 2 A e2 + · · · + x n A en
Example
"
#" # "
# " #
" #!
1 2 x
1 2
1
0
=
x
+y
3 4 y
3 4
0
1
"
#" #
"
#" #
1 2 1
1 2 0
=x
+y
3 4 0
3 4 1
" #
" #
2
1
+y
=x
4
3
Summary
I
I
I
Vectors add and scale like numbers
Decompose arbitrary vectors using
elementary vectors
Understand matrices by applying to
elementary vectors
© Copyright 2026 Paperzz