Chapter 3: Analytic Geometry (Math For Machine Learning)
Chapter 3: Analytic Geometry (Math For Machine Learning)
Analytic Geometry
0
Equivalent to 2 slots. Lecturers can use extra materials for other slots in the chater
FPT University Chapter 3. Analytic Geometry 1 / 25
Chapter 3. Analytic Geometry
1 3.1 Norm
2 3.2 Inner Products
3 3.3 Lengths and Distances
4 3.4 Angles and Orthogonality
5 3.5 Orthonormal Basis
6 3.6 Orthogonal Complement
7 3.8 Orthogonal Projections
FPT University Chapter 3. Analytic Geometry 2 / 25
3.1 Norm
k·k : V → R
k·k : V → R
which assigns each vector x its length kxk ∈ R, such that for all k ∈ R and
x,y ∈ V the following hold:
k·k : V → R
which assigns each vector x its length kxk ∈ R, such that for all k ∈ R and
x,y ∈ V the following hold:
Absolute homogeneous: kkxk = |k| kxk
k·k : V → R
which assigns each vector x its length kxk ∈ R, such that for all k ∈ R and
x,y ∈ V the following hold:
Absolute homogeneous: kkxk = |k| kxk
Triangle inequality : kx + yk ≤ kxk + kyk
k·k : V → R
which assigns each vector x its length kxk ∈ R, such that for all k ∈ R and
x,y ∈ V the following hold:
Absolute homogeneous: kkxk = |k| kxk
Triangle inequality : kx + yk ≤ kxk + kyk
→
−
Positive definite: kxk ≥ 0 and kxk = 0 if and only if x = 0 .
k·k : V → R
which assigns each vector x its length kxk ∈ R, such that for all k ∈ R and
x,y ∈ V the following hold:
Absolute homogeneous: kkxk = |k| kxk
Triangle inequality : kx + yk ≤ kxk + kyk
→
−
Positive definite: kxk ≥ 0 and kxk = 0 if and only if x = 0 .
n
P
For p = 1: The Manhattan norm l1 : kxk1 = |xi |.
i=1
Pn
For p = 1: The Manhattan norm l1 : kxk1 = |xi |.
i=1
s
n
xi2 .
P
For p = 2: The Euclidean norm l2 : kxk2 =
i=1
Pn
For p = 1: The Manhattan norm l1 : kxk1 = |xi |.
i=1
s
n
xi2 .
P
For p = 2: The Euclidean norm l2 : kxk2 =
i=1
Example
The l∞ -norm or maximum norm in Rn is the limit of lp -norm when
p → ∞:
Pn
For p = 1: The Manhattan norm l1 : kxk1 = |xi |.
i=1
s
n
xi2 .
P
For p = 2: The Euclidean norm l2 : kxk2 =
i=1
Example
The l∞ -norm or maximum norm in Rn is the limit of lp -norm when
p → ∞:
Pn
For p = 1: The Manhattan norm l1 : kxk1 = |xi |.
i=1
s
n
xi2 .
P
For p = 2: The Euclidean norm l2 : kxk2 =
i=1
Example
The l∞ -norm or maximum norm in Rn is the limit of lp -norm when
p → ∞:
kf k = max |f (x)|.
a≤x≤b
kf k = max |f (x)|.
a≤x≤b
kAxk2
kAk2 = max−
→
= max kAxk2 .
Rn 3x6= 0 kxk2 Rn 3x,kxk2 =1
kAxk2
kAk2 = max−
→
= max kAxk2 .
Rn 3x6= 0 kxk2 Rn 3x,kxk2 =1
Definition
The dot product or scalar product on Rn is given by
n
X
xT y = xi yi .
i=1
Definition
Let V be a vector space. A bilinear mapping or bilinear form B on V is a
function B : V × V → R that is linear in each argument separately:
Definition
The dot product or scalar product on Rn is given by
n
X
xT y = xi yi .
i=1
Definition
Let V be a vector space. A bilinear mapping or bilinear form B on V is a
function B : V × V → R that is linear in each argument separately:
B(kx + hy, z) = kB(x, z) + hB(y, z)
Definition
The dot product or scalar product on Rn is given by
n
X
xT y = xi yi .
i=1
Definition
Let V be a vector space. A bilinear mapping or bilinear form B on V is a
function B : V × V → R that is linear in each argument separately:
B(kx + hy, z) = kB(x, z) + hB(y, z)
B(x, ky + hz) = kB(x, y) + hB(x, z)
Definition
The dot product or scalar product on Rn is given by
n
X
xT y = xi yi .
i=1
Definition
Let V be a vector space. A bilinear mapping or bilinear form B on V is a
function B : V × V → R that is linear in each argument separately:
B(kx + hy, z) = kB(x, z) + hB(y, z)
B(x, ky + hz) = kB(x, y) + hB(x, z)
for any x, y, z ∈ V and any k, h ∈ R.
Definition
The dot product or scalar product on Rn is given by
n
X
xT y = xi yi .
i=1
Definition
Let V be a vector space. A bilinear mapping or bilinear form B on V is a
function B : V × V → R that is linear in each argument separately:
B(kx + hy, z) = kB(x, z) + hB(y, z)
B(x, ky + hz) = kB(x, y) + hB(x, z)
for any x, y, z ∈ V and any k, h ∈ R.
Example
Show that the mapping B : R2 × R2 → R defined by
is a bilinear mapping on R2 .
Example
Show that the mapping B : R2 × R2 → R defined by
is a bilinear mapping on R2 .
Example
Show that B : C [a, b] × C [a, b] → R defined by
Z b
B(f , g ) = f (x)g (x)dx
a
Example
Show that the mapping B : R2 × R2 → R defined by
is a bilinear mapping on R2 .
Example
Show that B : C [a, b] × C [a, b] → R defined by
Z b
B(f , g ) = f (x)g (x)dx
a
Example
The dot product on Rn is both symmetric and positive definite.
Example
The dot product on Rn is both symmetric and positive definite.
Example
The bilinear mapping B : R2 × R2 → R defined by:
B(x, y) = x1 y1 − 2x2 y2
Example
The dot product on Rn is both symmetric and positive definite.
Example
The bilinear mapping B : R2 × R2 → R defined by:
B(x, y) = x1 y1 − 2x2 y2
Example
The dot product on Rn is both symmetric and positive definite.
Example
The bilinear mapping B : R2 × R2 → R defined by:
B(x, y) = x1 y1 − 2x2 y2
hx, yi = x1 y1 − x1 y2 + x2 y1 + x2 y2 .
Example
If A, B are matrices in Rm×n . Define
hA, Bi = tr(AB T ),
hx, yi = x1 y1 − x1 y2 + x2 y1 + x2 y2 .
Example
If A, B are matrices in Rm×n . Define
hA, Bi = tr(AB T ),
where tr is the trace operator (see Chapter 4).Show that h·, ·i is an inner
product in Rm×n .
hx, yi = x1 y1 − x1 y2 + x2 y1 + x2 y2 .
Example
If A, B are matrices in Rm×n . Define
hA, Bi = tr(AB T ),
where tr is the trace operator (see Chapter 4).Show that h·, ·i is an inner
product in Rm×n .
positive semidefinite if
positive semidefinite if
Example
Consider the matrices
2 1 1 2
A= ,B =
1 3 2 3
positive semidefinite if
Example
Consider the matrices
2 1 1 2
A= ,B =
1 3 2 3
positive semidefinite if
Example
Consider the matrices
2 1 1 2
A= ,B =
1 3 2 3
Hence
n X
X n
hx, yi = xi hbi , bj iyj = x̂T Aŷ,
i=1 j=1
Hence
n X
X n
hx, yi = xi hbi , bj iyj = x̂T Aŷ,
i=1 j=1
where A = Aij = hbi , bj i and x̂, ŷ are the coordinates of x and y w.r.t
the basis B.
Hence
n X
X n
hx, yi = xi hbi , bj iyj = x̂T Aŷ,
i=1 j=1
where A = Aij = hbi , bj i and x̂, ŷ are the coordinates of x and y w.r.t
the basis B.
We can see A is symmetric, positive definite.
Hence
n X
X n
hx, yi = xi hbi , bj iyj = x̂T Aŷ,
i=1 j=1
where A = Aij = hbi , bj i and x̂, ŷ are the coordinates of x and y w.r.t
the basis B.
We can see A is symmetric, positive definite.
Definition
Consider an inner product space (V , h·, ·i). Then
p
The norm induced by the inner product kxk := hx, xi
Definition
Consider an inner product space (V , h·, ·i). Then
p
The norm induced by the inner product kxk := hx, xi
p
d(x, y) := kx − yk = hx − y, x − yi is called the distance between x
and y in V .
Definition
Consider an inner product space (V , h·, ·i). Then
p
The norm induced by the inner product kxk := hx, xi
p
d(x, y) := kx − yk = hx − y, x − yi is called the distance between x
and y in V .
Theorem
For an inner product vector space (V , h·, ·i) the induced norm k·k satisfies
the Cauchy-Schwarz inequality:
Definition
Consider an inner product space (V , h·, ·i). Then
p
The norm induced by the inner product kxk := hx, xi
p
d(x, y) := kx − yk = hx − y, x − yi is called the distance between x
and y in V .
Theorem
For an inner product vector space (V , h·, ·i) the induced norm k·k satisfies
the Cauchy-Schwarz inequality:
Definition
Consider an inner product space (V , h·, ·i). Then
p
The norm induced by the inner product kxk := hx, xi
p
d(x, y) := kx − yk = hx − y, x − yi is called the distance between x
and y in V .
Theorem
For an inner product vector space (V , h·, ·i) the induced norm k·k satisfies
the Cauchy-Schwarz inequality:
hx, yi = x1 y1 − x1 y2 − x2 y1 + 3x2 y2 .
T T
Find the distance between two vectors u = 1 1 and v = −1 2 .
hx, yi = x1 y1 − x1 y2 − x2 y1 + 3x2 y2 .
T T
Find the distance between two vectors u = 1 1 and v = −1 2 .
Definition
The angle between the vectors x and y is the number ω ∈ [0, π] defined by
hx, yi
cos ω =
kxk kyk
Definition
The angle between the vectors x and y is the number ω ∈ [0, π] defined by
hx, yi
cos ω =
kxk kyk
Definition
Two vectors x and y are orthogonal if and only if hx, yi = 0, and we write
x ⊥ y.
Definition
The angle between the vectors x and y is the number ω ∈ [0, π] defined by
hx, yi
cos ω =
kxk kyk
Definition
Two vectors x and y are orthogonal if and only if hx, yi = 0, and we write
x ⊥ y. Additionally, if kxk = kyk = 1, i.e., the vectors are unit vectors,
then x and y are orthonormal.
Definition
The angle between the vectors x and y is the number ω ∈ [0, π] defined by
hx, yi
cos ω =
kxk kyk
Definition
Two vectors x and y are orthogonal if and only if hx, yi = 0, and we write
x ⊥ y. Additionally, if kxk = kyk = 1, i.e., the vectors are unit vectors,
then x and y are orthonormal.
AAT = AT A = In
AAT = AT A = In
Example
" #
√1 − √12
Show that A = 2 is orthogonal.
√1 √1
2 2
AAT = AT A = In
Example
" #
√1 − √12
Show that A = 2 is orthogonal.
√1 √1
2 2
Theorem
If A ∈ Rn×n is orthogonal then
AAT = AT A = In
Example
" #
√1 − √12
Show that A = 2 is orthogonal.
√1 √1
2 2
Theorem
If A ∈ Rn×n is orthogonal then
A−1 = AT .
AAT = AT A = In
Example
" #
√1 − √12
Show that A = 2 is orthogonal.
√1 √1
2 2
Theorem
If A ∈ Rn×n is orthogonal then
A−1 = AT .
A preserve the length of any vector x ∈ Rn .
AAT = AT A = In
Example
" #
√1 − √12
Show that A = 2 is orthogonal.
√1 √1
2 2
Theorem
If A ∈ Rn×n is orthogonal then
A−1 = AT .
A preserve the length of any vector x ∈ Rn .
A preserve the angle between two vectors x and y in Rn .
AAT = AT A = In
Example
" #
√1 − √12
Show that A = 2 is orthogonal.
√1 √1
2 2
Theorem
If A ∈ Rn×n is orthogonal then
A−1 = AT .
A preserve the length of any vector x ∈ Rn .
A preserve the angle between two vectors x and y in Rn .
AAT = AT A = In
Example
" #
√1 − √12
Show that A = 2 is orthogonal.
√1 √1
2 2
Theorem
If A ∈ Rn×n is orthogonal then
A−1 = AT .
A preserve the length of any vector x ∈ Rn .
A preserve the angle between two vectors x and y in Rn .
Definition
B is called an orthonormal basis (ONB) if
(
1 if i = j,
hbi , bj i = δij =
0 otherwise
Definition
B is called an orthonormal basis (ONB) if
(
1 if i = j,
hbi , bj i = δij =
0 otherwise
Example
The canonical basis for an Euclidean vector space Rn is an orthonormal
basis.
Definition
B is called an orthonormal basis (ONB) if
(
1 if i = j,
hbi , bj i = δij =
0 otherwise
Example
The canonical basis for an Euclidean vector space Rn is an orthonormal
basis.
Definition
B is called an orthonormal basis (ONB) if
(
1 if i = j,
hbi , bj i = δij =
0 otherwise
Example
The canonical basis for an Euclidean vector space Rn is an orthonormal
basis.
Theorem
Let {b1 , · · · , bn } be an orthonormal basis of an inner product space V . If
x is any vector in V , then
Theorem
Let {b1 , · · · , bn } be an orthonormal basis of an inner product space V . If
x is any vector in V , then
Theorem
Let {b1 , · · · , bn } be an orthonormal basis of an inner product space V . If
x is any vector in V , then
b1 = v1
hv2 , b1 i
b2 = v2 − b1
kb1 k2
···
hvk , b1 i hvk , b2 i hvk , bk−1 i
bk = vk − 2
b1 − 2
b2 − · · · − bk−1
kb1 k kb2 k kbk−1 k2
b1 = v1
hv2 , b1 i
b2 = v2 − b1
kb1 k2
···
hvk , b1 i hvk , b2 i hvk , bk−1 i
bk = vk − 2
b1 − 2
b2 − · · · − bk−1
kb1 k kb2 k kbk−1 k2
b1 = v1
hv2 , b1 i
b2 = v2 − b1
kb1 k2
···
hvk , b1 i hvk , b2 i hvk , bk−1 i
bk = vk − 2
b1 − 2
b2 − · · · − bk−1
kb1 k kb2 k kbk−1 k2
b1 = v1
hv2 , b1 i
b2 = v2 − b1
kb1 k2
···
hvk , b1 i hvk , b2 i hvk , bk−1 i
bk = vk − 2
b1 − 2
b2 − · · · − bk−1
kb1 k kb2 k kbk−1 k2
b1 = v1
hv2 , b1 i
b2 = v2 − b1
kb1 k2
···
hvk , b1 i hvk , b2 i hvk , bk−1 i
bk = vk − 2
b1 − 2
b2 − · · · − bk−1
kb1 k kb2 k kbk−1 k2
b1 = v1
hv2 , b1 i
b2 = v2 − b1
kb1 k2
···
hvk , b1 i hvk , b2 i hvk , bk−1 i
bk = vk − 2
b1 − 2
b2 − · · · − bk−1
kb1 k kb2 k kbk−1 k2
Theorem
Let U be a finite dimensional subspace of an inner product space V .
Theorem
Let U be a finite dimensional subspace of an inner product space V .
→
−
(i) U ∩ U ⊥ = { 0 }.
Theorem
Let U be a finite dimensional subspace of an inner product space V .
→
−
(i) U ∩ U ⊥ = { 0 }.
(ii) U ⊥ is a subspace of V and V = U ⊕ U ⊥ (each vector v in V can be
uniquely written as the sum of two vectors u ∈ U and w ∈ U ⊥ ).
Theorem
Let U be a finite dimensional subspace of an inner product space V .
→
−
(i) U ∩ U ⊥ = { 0 }.
(ii) U ⊥ is a subspace of V and V = U ⊕ U ⊥ (each vector v in V can be
uniquely written as the sum of two vectors u ∈ U and w ∈ U ⊥ ).
(iii) dim(U ⊥ ) = dim(V ) − dim(U ⊥ ).
Theorem
Let U be a finite dimensional subspace of an inner product space V .
→
−
(i) U ∩ U ⊥ = { 0 }.
(ii) U ⊥ is a subspace of V and V = U ⊕ U ⊥ (each vector v in V can be
uniquely written as the sum of two vectors u ∈ U and w ∈ U ⊥ ).
(iii) dim(U ⊥ ) = dim(V ) − dim(U ⊥ ).
(iv) (U ⊥ )⊥ = U.
Theorem
Let U be a finite dimensional subspace of an inner product space V .
→
−
(i) U ∩ U ⊥ = { 0 }.
(ii) U ⊥ is a subspace of V and V = U ⊕ U ⊥ (each vector v in V can be
uniquely written as the sum of two vectors u ∈ U and w ∈ U ⊥ ).
(iii) dim(U ⊥ ) = dim(V ) − dim(U ⊥ ).
(iv) (U ⊥ )⊥ = U.
Theorem
Let U be a finite dimensional subspace of an inner product space V .
→
−
(i) U ∩ U ⊥ = { 0 }.
(ii) U ⊥ is a subspace of V and V = U ⊕ U ⊥ (each vector v in V can be
uniquely written as the sum of two vectors u ∈ U and w ∈ U ⊥ ).
(iii) dim(U ⊥ ) = dim(V ) − dim(U ⊥ ).
(iv) (U ⊥ )⊥ = U.
Definition
The projection P on U with ker(P) = U ⊥ is called the orthogonal
projection on U and is denoted by projU : V → U.
Definition
The projection P on U with ker(P) = U ⊥ is called the orthogonal
projection on U and is denoted by projU : V → U.
Definition
The projection P on U with ker(P) = U ⊥ is called the orthogonal
projection on U and is denoted by projU : V → U.
Definition
The projection P on U with ker(P) = U ⊥ is called the orthogonal
projection on U and is denoted by projU : V → U.
Definition
The projection P on U with ker(P) = U ⊥ is called the orthogonal
projection on U and is denoted by projU : V → U.
Definition
The projection P on U with ker(P) = U ⊥ is called the orthogonal
projection on U and is denoted by projU : V → U.