0% found this document useful (0 votes)
11 views15 pages

Lecture 1 Full

Uploaded by

sze yin wong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views15 pages

Lecture 1 Full

Uploaded by

sze yin wong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Lecture 1 Vector, matrix & determinant

1.1 Definition of vectors

An n-dimensional row vector is an array of n real numbers, such as

⃗ = 󳆖 x1 x2 ⋯ xn 󳆛 .
x (1.1)

For example, (1 2 0 − 1) is a 4-dimensional row vector. To avoid confusion, we often denote


(1 2 0 −1) by (1, 2, 0, −1), by using comma to separate each component of a vector. Similarly,

⎛ x1 ⎞
⎜ ⎟
⃗=⎜ ⎟
x2
⎜ ⋮ ⎟
x (1.2)
⎝ xn ⎠

is called an n-dimensional column vector. For abbreviation, we often denote the column
vector (1.2) by (x1 , x2 , . . . , xn )T , where the superscript T indicates that it is transposed to a
column vector. A “column vector” is often abbreviated as “vector”.
Equality of two vectors: Two vectors a ⃗ = (a1 , a2 , . . . , an )T and ⃗b = (b1 , b2 , . . . , bn )T are
said to be equal if each component of them equals, i.e. a1 = b1 , a2 = b2 , . . . , an = bn .
Geometric representation of vectors: The most important examples of vectors are,
of course, two-dimensional vectors and three-dimensional vectors. Any two-dimensional vec-
tor a⃗ = (a1 , a2 )T corresponds to a unique directed arrow in the plane, as shown in Fig-
󳆻
ure 1.1. From Pythagorean theorem we know that the length of the vector a ⃗ in Fig-
ure 1.1 is 󳈌⃗a󳈌 = a1 + a2 . Similarly, any three-dimensional vector a
2 2 ⃗ = (a1 , a2 , a3 )T cor-
responds to a unique directed arrow in the three-dimensional space, as shown in Figure
󳆻 Pythagorean theorem we know that the length of the vector a
1.2. From ⃗ in Figure 1.2
is 󳈌⃗
a󳈌 = a1 + a2 + a3 . Unfortunately, as human beings we cannot visually imagine higher-
2 2 2

dimensional vectors. But we can rationally understand it as an extension of the three-


dimensional vectors to higher-dimensional spaces.
Length and direction: Analogously, we define the length and direction of an n-
dimensional vector a ⃗ = (a1 , ⋯, an )T by
󳆼
󳈌⃗
a󳈌 ∶= a21 + ⋅ ⋅ ⋅ + a2n ˆ⃗ ∶= 󳆚 a1 , . . . , an 󳆞 ,
󳈌⃗
a󳈌 󳈌⃗
a󳈌
and a (1.3)

ˆ⃗ is a vector of unit length such that its components


respectively. In particular, the direction a
are proportional to the corresponding components of a ⃗. It is easy to see that two vectors are
equal if and only if both their lengths and directions are equal.

1
2

x2 axis

a2 ⃗ = (a1 , a2 )T
a

x1 axis
a1

Figure 1.1: Illustration of a 2-dimensional vector on the plane

x3 axis

x2 axis

a3
a2 ⃗ = (a1 , a2 , a3 )T
a

(a1 , a2 , 0)

a1
x1 axis

Figure 1.2: Illustration of a 3-dimensional vector in the space

Operations on vectors: There are three types of operations on vectors:


(1) vector addition: (a1 , . . . , an )T ± (b1 , . . . , bn )T = (a1 ± b1 , . . . , an ± bn )T .
(2) scalar multiplication: t(a1 , . . . , an )T = (ta1 , . . . , tan )T for arbitrary real number t.
⃗ = (a1 , . . . , an )T and ⃗b = (b1 , . . . , bn )T , we define their inner product
(3) inner product: for a
as

⃗ ⋅ ⃗b ∶= a1 b1 + ⋯ + an bn .
a (1.4)

These operations obey the following rules:


⃗ + ⃗b = ⃗b + a
(1󰐞 ) a ⃗ (commutative law of addition)
󰐞
(2 ) a ⃗
⃗ + (b + c⃗) = (⃗ a + ⃗b) + c⃗ (associative law of addition)
󰐞
(3 ) t(⃗a + ⃗b) = t⃗ a + t⃗b
(4 ) (ts)⃗
󰐞
a = t(s⃗ a) and (t + s)⃗ a = t⃗
a + s⃗
a
⃗ + 0⃗ = a
(5󰐞 ) a ⃗ and a ⃗−a ⃗ = 0⃗
⃗ ⋅ ⃗b = ⃗b ⋅ a
(6󰐞 ) a ⃗
󰐞
(7 ) a⃗ ⋅ (⃗b + c⃗) = a⃗ ⋅ ⃗b + a
⃗ ⋅ c⃗
󰐞
(8 ) t(⃗a ⋅ ⃗b) = (t⃗ a) ⋅ ⃗b = a⃗ ⋅ (t⃗b)
(9 ) 󳈌t⃗
󰐞
a󳈌 = 󳈌t󳈌󳈌⃗ a󳈌
3

Overall, the sum or difference of two vectors is a vector, the multiplication of a vector by
a scalar is again a vector, while the inner product of two vectors is a real number. With the
inner product defined in (1.4), the length of a vector can be expressed in terms of the inner
product:

󳈌⃗
a󳈌 = a⃗⋅a
⃗. (1.5)
Example 1.1
vector addition: (1, 2, 3)T + (1, 0, −1)T = (2, 2, 2)T ,
scalar multiplication: 2(1, 2, 3)T = (2, 4, 6)T ,
inner product: (1, 2, 3)T ⋅ (1, 0, −1)T = 1 + 0 − 3 = −2.
Figure 1.3 shows a visualization of vector additions, which shows that the vector addition
obeys the parallelogram law.

⃗ − ⃗b

a
⃗ + ⃗b
a
a ⃗b

⃗ − ⃗b
a

a
⃗b

−⃗b

Figure 1.3: Visualization of vector additions

Figure 1.4 shows a visualization of scalar multiplication of a vector, which shows that
(1) if t > 0 then t⃗b is a vector in the same direction of ⃗b with length t󳈌⃗b󳈌;
(2) if t < 0 then t⃗b is a vector in the negative direction of ⃗b with length 󳈌t󳈌󳈌⃗b󳈌.

⃗b 2⃗
3b
1⃗
3b
− 23 ⃗b

Figure 1.4: Visualization of scalar multiplication of a vector

1.2 Inner product & angle between two vectors

Orthogonality: Let a ⃗ and ⃗b be n-dimensional vectors. We say that a ⃗ is orthogonal (or



perpendicular) to b, denoted by a⃗ ⊥ ⃗b, if a
⃗ ⋅ ⃗b = 0.
Projection of a vector: The projection of a ⃗ onto ⃗b is defined as the following vector:
⃗ ⋅ ⃗b ⃗
⃗=
a
P⃗b a
󳈌⃗b󳈌2
b, (1.6)
4

which is the unique vector in the direction of ±⃗b such that a ⃗ is orthogonal to ⃗b (see
⃗ − P⃗b a
Figure 1.5):

⃗ ⋅ ⃗b ⃗ ⃗ ⃗ ⋅ ⃗b ⃗ 2
(⃗ ⃗) ⋅ ⃗b = 󳆚⃗
a − P⃗b a a− ⃗ ⋅ ⃗b −
b󳆞 ⋅ b = a 󳈌b󳈌 = 0.
a a
󳈌⃗b󳈌2 󳈌⃗b󳈌2
(1.7)

⃗b

⃗b

a
θ

P⃗b a

a
θ

P⃗b a

⃗ onto ⃗b
Figure 1.5: Ilustration of the projection of a

⃗ and
The angle between two vectors: The angle between two n-dimensional vectors a
⃗b is defined as

⃗󳈌
󳈌P⃗b a
θ = ± arccos 󳆚 󳆞,
󳈌⃗
a󳈌
(1.8)

where “+” is chosen if P⃗b a⃗ is in the same direction as ⃗b (i.e. P⃗b a ⃗ ⋅ ⃗b = a


⃗ ⋅ ⃗b ≥ 0), while “−”
⃗ is in the negative direction as ⃗b (i.e. P⃗b a
is chosen if P⃗b a ⃗ ⋅ ⃗b = a
⃗ ⋅ ⃗b < 0). See Figure 1.5.
Equivalently, we have

󳈏 󳈌a⃗⃗b󳈌⋅b2 ⃗b󳈏

⃗󳈌
󳈌P⃗b a ⃗ ⋅ ⃗b
cos θ = ± =± =
a
󳈌⃗
a󳈌 󳈌⃗a󳈌 a󳈌󳈌⃗b󳈌
. (1.9)
󳈌⃗

⃗ ⊥ ⃗b if and only if their angle is π󳆋2.


We see that a

1.3 Matrix

A matrix is a rectangular array of numbers, such as

⎛ a11 a12 ⋯ a1n ⎞


⎜ a21 a22 ⋯ a2n ⎟
⎜ ⎟
A=⎜ ⎟
⎜ ⋮ ⋮ ⋮ ⋮ ⎟
(1.10)
⎜ ⎟
⎝ am1 am2 ⋯ amn ⎠

The dimensions of the matrix (1.10) are “m × n” (read “m by n”), and the matrix is often
abbreviated as A = (aij )m×n . In particular, the row vector

󳆗 ai1 ai2 ⋯ ain 󳆜 (1.11)


5

is called the ith row of matrix A, and the vector

⎛ a1j ⎞
⎜ a2j ⎟
⎜ ⎟
⎜ ⎟
⎜ ⋮ ⎟
(1.12)
⎜ ⎟
⎝ amj ⎠

is called the j th column of matrix A.


If m = n in (1.10), then A is called a square matrix.
If m = 1 in (1.10), then A is called a row vector.
If n = 1 in (1.10), then A is called a column vector.
If aij = 0 for i > j, then A is called an upper triangular matrix.

1 −1 −9 10
Example 1.2
2 × 4 matrix: 󳆚 󳆞
2 1 −2 2

⎛ 1 −1 −9 ⎞
3 × 3 square matrix: ⎜ 2 1 −2 ⎟
⎜ ⎟
⎝ 3 3 5 ⎠

1 × 3 matrix (3D row vector): 󳆖 1 −1 −9 󳆛

⎛ 1 ⎞
3 × 1 matrix (3D column vector): ⎜ 2 ⎟
⎜ ⎟
⎝ 3 ⎠

Two matrices A = (aij )m1 ×n1 and B = (bij )m2 ×n2 are said to be equal if their dimensions
are equal and their elements are equal, i.e. m1 = m2 , n1 = n2 and aij = bij for 1 ≤ i ≤ m,
1 ≤ j ≤ n.

⎛ 1 −1 0 ⎞
Example 1.3
1 −1 0
󳆚 󳆞≠⎜
⎜ 2 1 2 ⎟

⎝ 3 3 5 ⎠
2 1 2

1 −1 0 1 −1 1
󳆚 󳆞≠󳆚 󳆞
2 1 2 2 1 3

1 −1 0 1 −1 0
󳆚 󳆞=󳆚 󳆞
2 1 2 2 1 2

Matrix sum: The sum and difference of two matrices of the same dimension can be
defined as

(aij )m×n + (bij )m×n = (aij + bij )m×n (aij )m×n − (bij )m×n = (aij − bij )m×n
6

Example 1.4 1 −1 0
󳆚 󳆞+󳆚 󳆞=󳆚 󳆞
0 1 1 1 0 1
2 1 2 1 0 0 3 1 2

1 −1 0 1 −2 −1
󳆚 󳆞−󳆚 󳆞=󳆚 󳆞
0 1 1
2 1 2 1 0 0 1 1 2

Scalar multiplication: The product of a real number λ and a matrix (aij )m×n can be
defined as
λ(aij )m×n = (λaij )m×n .
1 −1 0 2 −2 0
Example 1.5 For A = 󳆚 󳆞 we have 2A = 󳆚 󳆞.
2 1 2 4 2 4
Matrix multiplication: The product of an m × n matrix and an n × k matrix is defined
as an m × k matrix:

If A = (aij )m×n and B = (bij )n×k , then AB = 󳆖∑nl=1 ail blj 󳆛m×k .

The element at ith row and j th column of the product matrix AB is equal to the ith row of
A times (inner product) the j th column of B.
The product of matrix and vector can be defined similarly, by viewing the vector as a
matrix.
⎛ 1 −1 ⎞
1 −1 0
Example 1.6 For A = 󳆚 󳆞 and B = ⎜ ⎟
⎜ 2 1 ⎟, we have
⎝ 0 1 ⎠
2 1 2

1 × 1 + (−1) × 2 + 0 × 0 1 × (−1) + (−1) × 1 + 0 × 1 −1 −2


AB = 󳆚 󳆞=󳆚 󳆞.
2×1+1×2+2×0 2 × (−1) + 1 × 1 + 2 × 1 4 1

⎛ 4 6 ⎞
Example 1.7 For A = (1 3 0) and B = ⎜ ⎟
⎜ 7 −1 ⎟, we have AB = (25 3).
⎝ 3 −2 ⎠

⎛ 1 ⎞ ⎛ −1 ⎞
1 −1 0
Example 1.8 For A = 󳆚 󳆞 and v⃗ = ⎜ ⎟ ⃗ = ⎜ 1 ⎟, we have
⎜ 2 ⎟, w ⎜ ⎟
⎝ 0 ⎠ ⎝ 1 ⎠
2 1 2

1 × 1 + (−1) × 2 + 0 × 0 −1
v=󳆚 󳆞=󳆚 󳆞,
2×1+1×2+2×0
A⃗
4

1 × (−1) + (−1) × 1 + 0 × 1 −2
⃗=󳆚 󳆞=󳆚 󳆞.
2 × (−1) + 1 × 1 + 2 × 1
Aw
1

v1 , . . . , v⃗k ) has column vectors v⃗1 , . . . , v⃗k , then


We see that if a matrix B = (⃗

v1 , . . . , v⃗k ) = (A⃗
AB = A(⃗ vk ).
v1 , . . . , A⃗ (1.13)
7

Identity matrix: Let In denote the following n × n matrix

⎛ 1 0 ⋯ 0 ⎞
⎜ 0 1 ⋯ 0 ⎟
⎜ ⎟.
⎜ ⋮ ⋮ ⋱ ⋮ ⎟
(1.14)
⎝ 0 0 0 1 ⎠

It is called identity matrix. This matrix satisfies

⃗=x
Ix ⃗ ⃗,
for all n-dimensional column vector x (1.15)

and

y⃗ I = y⃗ for all n-dimensional row vector y⃗. (1.16)

Example 1.9

⎛ 1 0 0 ⎞⎛ 1 ⎞ ⎛ 1 ⎞
⎜ 0 1 0 ⎟⎜ 2 ⎟ = ⎜ 2 ⎟, (1.17)
⎝ 0 0 1 ⎠⎝ 3 ⎠ ⎝ 3 ⎠

⎛ 1 0 0 ⎞
󳆖 1 2 3 󳆛⎜ 0 1 0 ⎟ = 󳆖 1 2 3 󳆛. (1.18)
⎝ 0 0 1 ⎠

Inverse matrix: For an n × n matrix A, if there exists a matrix B such that

AB = BA = I,

then A is said to be invertible (or non-singular), and B is called the inverse of A, denoted by
A−1 = B. Note that if A−1 = B then B −1 = A. In other words, (A−1 )−1 = A.

Example 1.10

󳆚 󳆞󳆚 󳆞=󳆚 󳆞
1 0 1 0 1 0
2 1 −2 1 0 1

󳆚 󳆞󳆚 󳆞=󳆚 󳆞
1 0 1 0 1 0
−2 1 2 1 0 1

−1
Hence both 󳆚 󳆞 and 󳆚 󳆞 are invertible matrices, and 󳆚 󳆞 =󳆚 󳆞.
1 0 1 0 1 0 1 0
2 1 −2 1 2 1 −2 1

Transpose matrix: For the m × n matrix

⎛ a11 a12 ⋯ a1n ⎞


⎜ a21 a22 ⋯ a2n ⎟
⎜ ⎟
A=⎜ ⎟
⎜ ⋮ ⋮ ⋮ ⋮ ⎟
⎜ ⎟
⎝ am1 am2 ⋯ amn ⎠
8

we define its transpose as the following n × m matrix:

⎛ a11 a21 ⋯ am1 ⎞


⎜ a12 a22 ⋯ am2 ⎟
⎜ ⎟
AT = ⎜ ⎟.
⎜ ⋮ ⋮ ⋮ ⋮ ⎟
(1.19)
⎜ ⎟
⎝ a1n a2n ⋯ amn ⎠

In other words, the rows of A are the columns of AT , and the columns of A are the rows of
AT . By this definition, we have

(AT )T = A. (1.20)

1 −1 0
Example 1.11 For A = 󳆚 󳆞, we have
2 1 2

⎛ 1 2 ⎞
1 −1 0
A =⎜
T ⎟
⎜ −1 1 ⎟ and (AT )T = 󳆚 󳆞.
⎝ 0 2 ⎠
2 1 2

⎛ 1 ⎞
The transpose of a column vector is a row vector: for v⃗ = ⎜ ⎟
⎜ −1 ⎟, we have v⃗ = (1, −1, 0).
T

⎝ 0 ⎠
⎛ 2 ⎞
The transpose of a row vector is a column vector: for w ⃗ =⎜
⃗ = (2, 1, 0) we have w T ⎟
⎜ 1 ⎟.
⎝ 0 ⎠

For abbreviation, we let Om×n denote the zero matrix of dimension m × n, i.e.

⎛ 0 0 ⋯ 0 ⎞
⎜ 0 0 ⋯ 0 ⎟
Om×n = ⎜ ⎟
⎜ ⋮ ⋮ ⋱ ⋮ ⎟
(1.21)
⎝ 0 0 0 0 ⎠

and we let In denote the following n × n matrix

⎛ 1 0 ⋯ 0 ⎞
⎜ 0 1 ⋯ 0 ⎟
⎜ ⎟
⎜ ⋮ ⋮ ⋱ ⋮ ⎟
(1.22)
⎝ 0 0 0 1 ⎠

If m and n are fixed, we often omit the subscripts of Om×n and In by writing them simply
as O and I.
In view of definitions of matrix sum, scalar multiplication and matrix multiplication, the
following rules hold:
(1󰐞 ) A + B = B + A (commutative law of addition)
(2󰐞 ) A + (B + C) = (A + B) + C (associative law of addition)
9

(3󰐞 ) (AB)C = A(BC) (associative law of matrix multiplication)


(4󰐞 ) (A + B)C = AC + BC and A(B + C) = AB + AC (distributive law)
(5󰐞 ) λ(A + B) = λA + λB and λ(AB) = (λA)B = A(λB)
(6󰐞 ) (λµ)A = λ(µA) and (λ + µ)A = λA + µA
(7󰐞 ) A + O = A and A − A = O
(8󰐞 ) AIn = A (for arbitrary m × n matrix A) and In B = B (for arbitrary n × k matrix B)

1.4 Determinant, area and volume

For a 1 × 1 matrix (t), we define its determinant as itself, i.e. det(t) = t.


The determinant of a 2 × 2 matrix is defined as

det 󳆚 󳆞 = a 1 b2 − a 2 b1 .
a 1 b1
(1.23)
a 2 b2

The determinant of a 3 × 3 matrix is defined as

⎛ a 1 b1 c 1 ⎞
det ⎜ a2 b2 c2 ⎟ = a1 det 󳆚 2 2 󳆞 − a2 det 󳆚 1 1 󳆞 + a3 det 󳆚 1 1 󳆞 .
b c b c b c
(1.24)
⎝ a 3 b3 c 3 ⎠ b 3 c 3 b 3 c 3 b2 c 2

Similarly, the determinant of a n × n matrix is defined in an induction way, as

⎛ a11 a12 ⋯ a1n ⎞ ⎛ a22 a23 ⋯ a2n ⎞


⎜ a a22 ⋯ a2n ⎟ ⎜ a a33 ⋯ a3n ⎟
det ⎜ 21 ⎟ = a11 det ⎜ 32 ⎟
⎜ ⋮ ⋮ ⋱ ⋮ ⎟ ⎜ ⋮ ⋱ ⋮ ⎟
⎝ an1 an2 ⋯ ann ⎠ ⎝ an2 a2n ⋯ ann ⎠

⎛ a12 a13 ⋯ a1n ⎞


⎜ a a33 ⋯ a3n ⎟
− a21 det ⎜ 32 ⎟
⎜ ⋮ ⋮ ⋱ ⋮ ⎟
⎝ an2 an3 ⋯ ann ⎠
(1.25)

+⋯
⎛ a12 a13 ⋯ a1n ⎞
⎜ a32 ⋯ a3n ⎟
+ (−1)n an1 det ⎜ ⎟.
a33
⎜ ⋮ ⋮ ⋱ ⋮ ⎟
⎝ an−1,2 an−1,3 ⋯ an−1,n ⎠

Example 1.12

det 󳆚 󳆞 = 1 × 1 − (−1) × 2 = 3,
1 2
−1 1
1 −1
det 󳆚 󳆞 = 1 × 1 − 2 × (−1) = 3,
2 1
⎛ 1 2 0 ⎞
det ⎜ 0 1 1 ⎟ = 1 × det 󳆚 󳆞 + 0 × det 󳆚 󳆞 + 2 × det 󳆚 󳆞 = 3,
1 1 2 0 2 0
⎝ 2 0 −1 ⎠ 0 −1 0 −1 1 1
10

⎛ 1 0 2 ⎞
det ⎜ 2 1 0 ⎟ = 1 × det 󳆚 󳆞 − 2 × det 󳆚 󳆞 = 3.
1 0 0 2
⎝ 0 1 −1 ⎠ 1 −1 1 −1

Example 1.13

⎛ 1 2 0 0 ⎞
⎜ ⎟ ⎛ 2 1 0 ⎞ ⎛ 2 0 0 ⎞
det ⎜ ⎟ = 1 × det ⎜ 0 3 0 ⎟ − 1 × det ⎜ 2 1 0 ⎟ = 24,
0 2 1 0
⎜ 0 0 3 0 ⎟ ⎝ 0 0 4 ⎠ ⎝ 0 3 0 ⎠
⎝ 1 0 0 4 ⎠

⎛ 1 0 0 1 ⎞
⎜ ⎟ ⎛ 2 0 0 ⎞ ⎛ 0 0 1 ⎞
det ⎜ ⎟ = 1 × det ⎜ 1 3 0 ⎟ − 2 × det ⎜ 1 3 0 ⎟ = 24.
2 2 0 0
⎜ 0 1 3 0 ⎟ ⎝ 0 0 4 ⎠ ⎝ 0 0 4 ⎠
⎝ 0 0 0 4 ⎠

The last two examples show that

det(A) = det(AT ). (1.26)

Determinant has many applications in mathematics. In the following, we will see that the
absolute value of the determinant (1.23) represents the area of the parallelogram spanned
by the two vectors a ⃗ = (a1 , a2 )T and ⃗b = (b1 , b2 )T , while the absolute value of the de-
terminant (1.24) represents the volume of the parallelepiped spanned by the three vectors
⃗ = (a1 , a2 , a3 )T , ⃗b = (b1 , b2 , b3 )T and c⃗ = (c1 , c2 , c3 )T .
a
Area of a parallelogram. Let a ⃗ = (a1 , a2 )T and ⃗b = (b1 , b2 )T be two vectors on the
two-dimensional plane, as shown in Figure 1.6. The area of the parallelogram 0acb is called
⃗ and ⃗b, denoted by area(⃗
the area spanned by the two vectors a a, ⃗b).

c⃗ c⃗

⃗b = (b1 , b2 )T ⃗ = (a1 , a2 )T
a ⃗
a ⃗b
h h

θ θ

0⃗ 0⃗

⃗ and ⃗b
Figure 1.6: Area spanned by the two vectors a

From Figure 1.6, it is easy to see that


󳆻
a, ⃗b) = 󳈌⃗b󳈌h = 󳈌⃗b󳈌󳈌⃗
area(⃗ a󳈌 sin θ = 󳈌⃗b󳈌󳈌⃗
a󳈌 1 − (cos θ)2
11
󳇀
󳇂
󳇁1 − (⃗ a ⋅ ⃗b)2
a󳈌󳇂
= 󳈌⃗b󳈌󳈌⃗
a󳈌2 󳈌⃗b󳈌2
󳈌⃗
󳆼
= 󳈌⃗ a󳈌2 󳈌⃗b󳈌2 − (⃗
a ⋅ ⃗b)2
󳆼
= (a21 + a22 )(b21 + b22 ) − (a1 b1 + a2 b2 )2
󳆼
= a21 b22 + a22 b21 − 2a1 b1 a2 b2
= 󳈌a1 b2 − a2 b1 󳈌

= 󳈐det 󳆚 󳆞󳈐 .
a 1 b1
(1.27)
a 2 b2

We see that the absolute value of the determinant det 󳆖aa12 bb12 󳆛 represents the area of the
parallelipiped spanned by a ⃗ and ⃗b. The sign of this determinant actually represents the
orientation of the two vectors: positivity of the determinant indicates that the angle from a ⃗
to ⃗b is counterclockwise (Figure 1.6 left). Conversely, negativity of the determinant indicates
that the angle from a ⃗ to ⃗b is clockwise (Figure 1.6 right).
Volume of a parallelepiped. Let a ⃗ = (a1 , a2 , a3 ), ⃗b = (b1 , b2 , b3 ) and c⃗ = (c1 , c2 , c3 )
be three vectors in the three-dimensional space, as shown in Figure 1.7. The volume of the
⃗, ⃗b and c⃗,
parallelepiped in the Figure is called the volume spanned by the three vectors a
denoted by volume(⃗ a, ⃗b, c⃗).

d⃗
⃗ ⃗

a a
Pd⃗a

h
c⃗ c⃗

⃗b ⃗b

⃗ , ⃗b and c⃗
Figure 1.7: Volume spanned by the three vectors a

Clearly, volume(⃗a, ⃗b, c⃗) = area(⃗b, c⃗) h, where h denotes the height of the volume (the red
line is perpendicular to the plane spanned by ⃗b and c⃗), and area(⃗b, c⃗) denotes the area of the
bottom plane spanned by ⃗b and c⃗, which is given by
area(⃗b, c⃗) = 󳈌⃗b󳈌󳈌⃗
c󳈌 sin θ
󳆻
= 󳈌⃗b󳈌󳈌⃗
c󳈌 1 − (cos θ)2
󳇀
󳇂 ⃗ 2
󳇁1 − (b ⋅ c⃗)
c󳈌󳇂
= 󳈌⃗b󳈌󳈌⃗
󳈌⃗b󳈌2 󳈌⃗
c󳈌2
󳆼
= 󳈌⃗b󳈌2 󳈌⃗ c󳈌2 − (⃗b ⋅ c⃗)2
12
󳆼
= (b21 + b22 + b23 )(c21 + c22 + c23 ) − (b1 c1 + b2 c2 + b3 c3 )2
󳆼
= b21 c22 + b22 c21 + b23 c21 + b21 c23 + b22 c23 + b23 c22 − 2b1 c1 b2 c2 − 2b3 c1 b1 c3 − 2b2 c3 b3 c2
󳆻
= (b2 c3 − b3 c2 )2 + (b3 c1 − b1 c3 )2 + (b1 c2 − b2 c1 )2

It is straightforward to check that the vector

d⃗ = (b2 c3 − b3 c2 , b3 c1 − b1 c3 , b1 c2 − b2 c1 )

is perpendicular to the ground plane spanned by ⃗b and c⃗, i.e.

d⃗ ⋅ ⃗b = (b2 c3 − b3 c2 )b1 + (b3 c1 − b1 c3 )b2 + (b1 c2 − b2 c1 )b3 = 0,


d⃗ ⋅ c⃗ = (b2 c3 − b3 c2 )c1 + (b3 c1 − b1 c3 )c2 + (b1 c2 − b2 c1 )c3 = 0.

Moreover, the length of d⃗ is 󳈌d󳈌


⃗ = area(⃗b, c⃗). The height h is simply the length of P ⃗a
d ⃗, the
⃗ Hence we have
⃗ onto d.
projection of a

⃗ ⋅ d⃗ ⃗ 󳈌⃗ ⃗
a ⋅ d󳈌
⃗󳈌 = 󳈐
h = 󳈌Pd⃗a d󳈐 =
a
⃗2 ⃗
.
󳈌d󳈌 󳈌d󳈌
and

⃗ 󳈌⃗
a, ⃗b, c⃗) = area(⃗b, c⃗) h = 󳈌d󳈌
a ⋅ d󳈌
= 󳈌⃗ ⃗
a ⋅ d󳈌

volume(⃗
󳈌d󳈌
= 󳈌a1 (b2 c3 − b3 c2 ) + a2 (b3 c1 − b1 c3 ) + a3 (b1 c2 − b2 c1 )󳈌

= 󳈐a1 det 󳆚 󳆞 − a2 det 󳆚 1 1 󳆞 + a3 det 󳆚 1 1 󳆞󳈐


b2 c 2 b c b c
b3 c 3 b3 c 3 b2 c 2
󳈋󳈋󳈋 󳈋
󳈋󳈋󳈋 ⎛ a1 b1 c1 ⎞󳈋󳈋󳈋󳈋
= 󳈋󳈋󳈋det ⎜ a2 b2 c2 ⎟󳈋󳈋󳈋󳈋 .
󳈋󳈋󳈋 ⎝ a3 b3 c3 ⎠󳈋󳈋󳈋󳈋
(1.28)
󳈋󳈋 󳈋
We see that the absolute value of the determinant is the volume of the parallelepiped spanned
by the three columns vectors.
Volume of n-dimensional parallelepipied. As human beings it is difficult to visualize
higher-dimensional parallelepipied. However, we can rationally understand (the absolute
value of) the determinant (1.25) as the n-dimensional volume of the parallelepipied spanned
by the n column vectors.

1.5 Outcome of this lecture

After the lecture, the students should be able to do the following:


(1) compute the sum of two vectors (matrices), and scalar multiplication of a vector (matrix);
(2) compute the length of a vector, inner product of two vectors, angle between two vectors;
(3) compute the product of two matrices, the product of a matrix and a vector;
(4) compute 2 × 2 determinant by definition, compute the area spanned by two 2D vectors;
(5) compute 3×3 determinant by definition, compute the volume spanned by three 3D vectors.
13

1.6 Exercises

(1) Which of the following expressions are meaningful? Which are meaningless? Explain.
a ⋅ ⃗b) ⋅ c⃗
(a) (⃗
(b) (⃗a ⋅ ⃗b)⃗c
a󳈌(⃗b ⋅ c⃗)
(c) 󳈌⃗
⃗ ⋅ (⃗b + c⃗)
(d) a
⃗ ⋅ ⃗b + c⃗
(e) a
a󳈌 ⋅ (⃗b + c⃗) (⋅ means the inner product between vectors)
(f) 󳈌⃗
(2) Compute a ⃗ ⋅ ⃗b, where
(a) a⃗ = (−2, 1), ⃗b = (1, 1).
⃗ = (2, 1), ⃗b = (−1, 2).
(b) a
⃗ = (2, 1, 3), ⃗b = (−1, 2, 1).
(c) a
(3) Let θ be the angle between the two vectors

⎛ 2 ⎞ ⎛ 1 ⎞
⃗=⎜ 1 ⎟
a and ⃗b = ⎜ 0 ⎟ .
⎝ −1 ⎠ ⎝ 1 ⎠

Compute cos(θ) and sin(θ).


Solution: 󳆿
cos(θ) = √ , sin(θ) =
1 11
.
12 12

(4) Let ⃗i = (1, 0, 0), ⃗j = (0, 1, 0) and k⃗ = (0, 0, 1). Let a


⃗ = ⃗j − k⃗ and ⃗b = ⃗i + 2⃗j.
(a) Compute a ⃗ ⋅ ⃗b.
a󳈌 and 󳈌⃗b󳈌.
(b) Compute 󳈌⃗
(c) Compute the angle between a⃗ and ⃗b.
⃗ onto ⃗b (cf. Figure 1.5).
(5) Compute the projection of a
Solution: 󳆖 12 , 0 , 12 󳆛 .
⃗ and ⃗b above.
(6) Compute the area of the parallelogram spanned by the two vectors a

Solution: The area of the parallelogram is 11.
(7) Compute the volume of of the parallelepiped spanned by the three vectors

⎛ 2 ⎞ ⎛ 1 ⎞ ⎛ 0 ⎞
⃗ = ⎜ 1 ⎟,
a ⃗b = ⎜ 0 ⎟ and c⃗ = ⎜ 0 ⎟
⎝ −1 ⎠ ⎝ 1 ⎠ ⎝ 1 ⎠

Solution: The volume is 1.


14

(8) For the three vectors

⎛ a1 ⎞ ⎛ b1 ⎞ ⎛ c1 ⎞
⃗ = ⎜ a2 ⎟
a ⃗b = ⎜ b2 ⎟ , c⃗ = ⎜ c2 ⎟
⎝ a3 ⎠ ⎝ b3 ⎠ ⎝ c3 ⎠

we define a vector

⎛ det 󳆚 b2 b3 ⎞
󳆞
⎜ c2 c3 ⎟
⎜ ⎟
⎜ ⎟
⎜ b1 b3 ⎟
d=⎜

⎜− det 󳆚 󳆞⎟
⎜ c1 c3 ⎟

⎜ ⎟
⎜ b1 b2 ⎟
⎜ ⎟
⎝ det 󳆚 󳆞
c1 c2 ⎠

(i) Compute the angle between d⃗ and ⃗b.


(ii) Compute the angle between d⃗ and c⃗.
(iii) What is the geometric meaning of the inner product a ⃗ ⋅ d⃗ ?
The vector d⃗ is often denoted as ⃗b × c⃗, called the cross product of ⃗b and c⃗.
Solution:
π
(i) 2
(ii) π2
(iii) Volume of the parallelepiped spanned by the three vectors a ⃗, ⃗b and c⃗.
(9) Let ⃗i = (1, 0, 0), ⃗j = (0, 1, 0) and k⃗ = (0, 0, 1). Let a
⃗ = ⃗j − k⃗ and ⃗b = ⃗i + 2⃗j.
(a) Compute ⃗i × ⃗i, ⃗j × k⃗ and k⃗ × k.⃗
(b) Compute ⃗i × ⃗j, ⃗i × k⃗ and ⃗j × k.

⃗ × ⃗b and ⃗b × a
(c) Compute a ⃗.
(10) Find the solution λ of the following equation:

⎛ λ−1 2 −1 ⎞
det ⎜ 1 λ−2 1 ⎟=0
⎝ 0 1 λ−3 ⎠

Solution: λ1 = 0, λ2 = 2, λ3 = 4.
(11) Show that (AB)T = B T AT .
Solution: Suppose that A = (aij )m×n and B = (bij )n×k . On one hand, by the definition
of matrix multiplication, the element at the ith row and j th column of the product
matrix AB is given by
n
(AB)ij = 󱮦 ail blj
l=1
15

which implies
n
(AB)Tij = 󱮦 ajl bli
l=1

On the other hand, by the definition of transpose matrix, we have

(AT )ij = aji and (B T )ij = bji

and so
n n n
(B T AT )ij = 󱮦(B T )il (AT )lj = 󱮦 bli ajl = 󱮦 ajl bli = (AB)Tij .
l=1 l=1 l=1

(12) Show that if A is an invertible matrix then AT is also invertible and (AT )−1 = (A−1 )T .
Solution: The last question implies that

AT (A−1 )T = (A−1 A)T = I T = I,


(A−1 )T AT = (AA−1 )T = I T = I.

Hence AT is invertible and (AT )−1 = (A−1 )T .

More exercise questions: See §4.1, §4.4 and §4.5 of the book “Mathematics for Engineers
II: Calculus and Linear Algebra”, written by Gerd Baumann.

You might also like