Linear Algebra Chapter 1 Linear Equations and Vectors 大葉大學 資訊工程系 黃鈴玲 1.1 Matrices and Systems of Linear Equations Definition • An equation (方程式) in the variables (變數)

Download Report

Transcript Linear Algebra Chapter 1 Linear Equations and Vectors 大葉大學 資訊工程系 黃鈴玲 1.1 Matrices and Systems of Linear Equations Definition • An equation (方程式) in the variables (變數)

Linear Algebra
Chapter 1
Linear Equations and Vectors
大葉大學 資訊工程系
黃鈴玲
1.1 Matrices and Systems of
Linear Equations
Definition
• An equation (方程式) in the variables (變數) x and y that
can be written in the form ax+by=c, where a, b, and c are
real constants (實數常數) (a and b not both zero), is called
a linear equation (線性方程式).
• The graph of this equation is a straight line in the x-y plane.
• A pair of values of x and y that satisfy the equation is called
a solution (解).
system of linear equations (線性聯立方程式)
Ch1_2
Solutions for system of linear equations
Figure 1.1
Unique solution (唯一解)
x+y= 5
2x - y = 4
Lines intersect at (3, 2)
Unique solution:
x = 3, y = 2.
Figure 1.2
No solution (無解)
–2x + y = 3
–4x + 2y = 2
Lines are parallel.
No point of intersection.
No solutions.
Figure 1.3
Many solution (無限多解)
4x – 2y = 6
6x – 3y = 9
Both equations have the
same graph. Any point on
the graph is a solution.
Many solutions.
Ch1_3
Definition
A linear equation in n variables x1, x2, x3, …, xn has the
form
a1 x1 + a2 x2 + a3 x3 + … + an xn = b
where the coefficients (係數) a1, a2, a3, …, an and b are
constants.
常見數系的英文名稱:
natural number (自然數), integer (整數), rational number (有理數),
real number (實數), complex number (複數)
positive (正), negative (負)
Ch1_4
A linear equation in three variables corresponds to
a plane in three-dimensional (三維) space.
※ Systems of three linear equations in three variables:
Unique solution
Ch1_5
No solutions
Many solutions
Ch1_6
How to solve a system of linear equations?
Gauss-Jordan elimination. (高斯-喬登消去法)
1.2節會介紹
Ch1_7
Definition
• A matrix (矩陣) is a rectangular array of numbers.
• The numbers in the array are called the elements (元素) of
the matrix.
Matrices
 2 3 - 4
A

7
5
1


 7 1
B   0 5
- 8 3
6
3 5
C  0 - 2 5 
8 9 12
注意矩陣左右兩邊是中括號不是直線,直線表示的是行列式。
Ch1_8
Row (列) and Column (行)
2
3 - 4
7
row1
5 - 1
row 2
 2 3 - 4
A

7
5
1


 2
7
 
3
5
 
column1
column 2
 - 4
 - 1
 
column3
Submatrix (子矩陣)
1 7 4 
A  2 3 0 
5 1 - 2
matrixA
 1 7
P  2 3
5 1
7
Q  3
1
4
1
R

5
2


submatrices of A
Ch1_9
Size and Type
 1 0
- 2 4

3
5
Size : 2  3
 2 5 7
- 9 0 1 


 - 3 5 8 
3  3 mat rix
a square mat rix
4
-3 8
5
1 4 mat rix
a row mat rix
8 
 3
 
2
3  1 mat rix
a column mat rix
Location
2 3 - 4
A

7 5 - 1
a13  -4, a21  7
aij表示在row i, column j 的元素值
也寫成 location (1,3) = -4
Identity Matrices (單位矩陣)
diagonal (對角線) 上都是1,其餘都是0,I 的下標表示size
I 2  1 0
0 1
1 0 0
I 3  0 1 0
0 0 1
Ch1_10
Relations between system of linear equations
and matrices
matrix of coefficient and augmented matrix
x1  x2  x3  2
2 x1  3x2  x3  3
x1 - x2 - 2 x3  -6
1
1 1
2 3

1


 1 - 1 - 2
matrixof coefficient
係數矩陣
1
2
1 1
2

3
1
3


 1 - 1 - 2 - 6
augment edmat rix
擴大矩陣
隨堂作業:5(f)
Ch1_11
Elementary Row Operations of Matrices
給定聯立方程式後,
不會改變解的一些轉換
Elementary Transformation
1. Interchange two equations.
2. Multiply both sides of an
equation by a nonzero
constant.
3. Add a multiple of one
equation to another equation.
將左邊的轉換對應到矩陣上
Elementary Row
Operation (基本列運算)
1. Interchange two rows of a
matrix.
(兩列交換)
2. Multiply the elements of a
row by a nonzero constant.
(某列的元素同乘一非零常數)
3.
Add a multiple of the
elements of one row to the
corresponding elements of
another row.
(將一個列的倍數加進另一列裡)
Ch1_12
Example 1
Solving the following system of linear equation.
x1  x2  x3  2
2 x1  3 x2  x3  3
x1 - x2 - 2 x3  -6
 符號表示row equivalent
Solution
Equation Method
Initial system:
x1  x2  x3  2
Eq2+(–2)Eq1
2 x1  3x2  x3  3
Eq3+(–1)Eq1
x1 - x2 - 2 x3  -6
x1  x2  x3  2
Analogous Matrix Method
Augmented matrix:
1
2
1 1
1
3
2 3
 1 - 1 - 2 - 6

x2 - x3  -1 R2+(–2)R1
- 2 x2 - 3x3  -8 R3+(–1)R1
1
1 2
1
1 - 1 - 1
0
0 - 2 - 3 - 8
Ch1_13
Eq1+(–1)Eq2
Eq3+(2)Eq2
x1  x2  x3  2
x2 - x3  -1
- 2 x2 - 3x3  -8
(–1/5)Eq3
Eq1+(–2)Eq3
Eq2+Eq3
x1  2 x3  3
x2 - x3  -1
- 5 x3  -10

R1+(–1)R2
R3+(2)R2
2
3
1 0
0 1 - 1 - 1
0 0 - 5 - 10
x1  2 x3  3
x2 - x3  -1
x3  2

(–1/5)R3
2
3
1 0
0 1 - 1 - 1
1
2
0 0
The solution is
x1  -1, x2  1, x3  2.
隨堂作業:7(d)
1
1
2
1
1 - 1 - 1
0
0 - 2 - 3 - 8
x1  -1
x2  1
x3  2

R1+(–2)R3
R2+R3
1
0


0
0
0
1
0
0
1
The solution is
x1  -1, x2  1, x3  2.
- 1
1

2

Ch1_14
基本列運算符號說明:

R1+(–3)R2
表示將R1(第一列) 加上 (-3) R2,
所以是R1這列會改變,R2不變
For example:
4 12
 1 -2
5 18
(1)  2 - 1
3 - 3 - 8
- 1
4 12
 1 -2
5 18
(2)  2 - 1
3 - 3 - 8
- 1

R1+2R2
 5 - 4 14 48
 2 -1

5
18


- 1
3 - 3 - 8

R2+2R1
4 12
 1 -2
 4 - 5 13 42


- 1
3 - 3 - 8
Ch1_15
基本列運算符號說明:
避免將要修改的列乘以某個倍數,這樣容易出錯









 2R1+R2 


 
 2R1












R1+R2 
不好!



較好!
基本列運算的步驟: (盡量使矩陣一步步變成以下形式)





1
… 

0

0
1 0

 … 0 1


0 0


 …


1 0 0
0 1 0

0 0 1




Ch1_16
Example 2
Solving the following system of linear equation.
x1 - 2 x2  4 x3  12
2 x1 - x2  5 x3  18
- x1  3 x2 - 3 x3  -8
Solution (請先自行練習)

4 12
4 12
 1 -2
1 - 2
R2  (-2)R1
5 18
3 - 3 - 6
 2 -1
0
R3  R1
3 - 3 - 8
1
1
4
- 1
0

1
 R2
3
 1 - 2 4 12
1 - 1 - 2
0
1 1
4
0
8
1 0 2

0 1 - 1 - 2 R1  (-2)R3
1

 R2  R3
 R3
0 0
1
3
2


R1  (2)R2
R3  (-1)R2
8
1 0 2
0 1 - 1 - 2
6
0 0 2
1 0 0
0 1 0

0 0 1
2
1
3
 x1  2

solut ion  x2  1.
x  3
 3
Ch1_17
Example 3
4 x1  8 x2 - 12 x3  44
Solve the system
3 x1  6 x2 - 8 x3  32
- 2 x1 - x2
 -7
Solution (請先自行練習)
 4 8 - 12 44

 3 6 - 8 32

  1 R1
 
- 2 - 1
0 - 7   4 
 1 2 - 3 11
 1 2 - 3 11

 3 6 - 8 32 R2  (-3)R1 

0
0
1
1




R3

2
R1
- 2 - 1

0 - 7
0 3 - 6 15

 1 2 - 3 11


R2  R3 0 3 - 6 15  1 
 R2
0 0

1 - 1  3 


 1 0 0 2
R1  (-1)R3 
.
0
1
0
3

R2  2R3 
0 0 1 - 1
 1 2 - 3 11

0 1 - 2

5

 R1  (-2)R2
0 0
1 - 1
1 1
1 0
0 1 - 2

5


0 0
1 - 1
The solution is x1  2, x2  3, x3  -1.
隨堂作業:10(d)(f)
Ch1_18
Summary
8 - 12 44
 4
[ A : B ]   3 6 - 8 32
- 2 - 1
0 - 7 
4 x1  8 x2 - 12 x3  44
3 x1  6 x2 - 8 x3  32
- 2 x1 - x2
 -7
A
Use row operations to [A: B] :
 4 8 - 12 44
 3 6 - 8 32   


- 2 - 1
0 - 7
1
0

0
0
0
1
0
0
1
2
3.
- 1
B
i.e., [ A : B]    [ I n : X ]
Def. [In : X] is called the reduced echelon form (簡化梯式)
of [A : B].
Note. 1. If A is the matrix of coefficients of a system of n equations
in n variables that has a unique solution,
then A is row equivalent to In (A  In).
2. If A  In, then the system has unique solution.
Ch1_19
Example 4 Many Systems
Solving the following three systems of linear equation, all of
which have the same matrix of coefficients.
x1 - x2  3x3  b1
 b1   8 0  3
2 x1 - x2  4 x3  b2 for b2    11,  1,  3 in turn
b  - 11 2 - 4
- x1  2 x2 - 4 x3  b3
 3 
    
Solution

3
8 0
3
3
8 0
3
 1 -1
 1 -1
4
11 1
3 R2+(–2)R1 0
1 - 2 - 5 1 - 3
 2 -1
R3+R1
1 - 1 - 3 2 - 1
- 1 2 - 4 - 11 2 - 4
0
1 0
1
3 1 0
  1 0 0 1 0 - 2



0 1 - 2 - 5 1 - 3 R1 ( -1) R3 
R1 R2
0 1 0 -1 3
1




R3  ( -1)R2
0 0
 R2  2 R3 
1
2
1
2
2 1
2


0 0 1
 x1  1  x1  0  x1  -2
The solutions to



x

1
,
x

3
,
 2
 x2  1 .
the three systems are  2
x  2 x  1 x  2
 3
 3
 3
隨堂作業:13(b)
Ch1_20
Homework
Exercise 1.1:
1, 2, 4, 5, 6, 7, 10, 13
Ch1_21
1.2 Gauss-Jordan Elimination
Definition
A matrix is in reduced echelon form (簡化梯式) if
1. Any rows consisting entirely of zeros are grouped at the
bottom of the matrix. (全為零的列都放在矩陣的下層)
2. The first nonzero element of each other row is 1. This
element is called a leading 1.
(每列第一個非零元素是1,稱做leading 1)
3. The leading 1 of each row after the first is positioned to
the right of the leading 1 of the previous row.
(每列的leading 1出現在前一列leading 1的右邊,也就
是所有的leading 1會呈現由左上到右下的排列)
4. All other elements in a column that contains a leading 1
are zero. (包含leading 1的行裡所有其他元素都是0)
Ch1_22
Examples for reduced echelon form
1 0 8
0 1 2 


0 0 0
()
1 2 0 4
0 0 0 0 


0 0 1 3
()
1 0 0 7
0 1 0 3 


0 0 1 9
()
1 2 0 3 0
0 0 3 4 0 


0 0 0 0 1
()
利用一連串的 elementary row operations,可讓
任何矩陣變成 reduced echelon form
The reduced echelon form of a matrix is unique.
隨堂作業:2(b)(d)(h)
Ch1_23
Gauss-Jordan Elimination
System of linear equations
 augmented matrix
 reduced echelon form
 solution
Ch1_24
Example 1
Use the method of Gauss-Jordan elimination to find reduced
echelon form of the following matrix.
2 - 2 2
0 0
9 12
3 3 - 3
4 4 - 2 11 12
pivot (樞軸,未來的 leading 1)
Solution
3
3 -3
9 12   1 1 - 1
3 4




2 - 2 2
0
2 -2
2  1 R1 0 0
0
 
R1 R2 
4 4 - 2 11 12
 3 
4
4
2
11
12



1


0
R3  (-4)R1 
0

1
0
0
-1
2
2
3
-2
-1
1 1
4





1
2  R2 0 0
  2 

- 4
0 0
-1
3
1 -1
2
-1
4

1

- 4
pivot


5
 1 1 0 0 17
1 1 0 2
R1  R2 0 0 1 - 1
1 R1  (-2)R3 0 0 1 0 - 5
R3  (-2)R2 0 0 0
1 - 6 R2  R3 0 0 0 1 - 6
The matrix is the reduced echelon form of the given matrix.
Ch1_25
Example 2
Solve, if possible, the system of equations
3 x1 - 3 x2  3 x3  9
2 x1 - x2  4 x3  7
3 x1 - 5 x2 - x3  7
Solution (請先自行練習)
1
3
 3 - 3 3 9   1 - 1 1 3   1 - 1
1
2
1
2 - 1 4 7 1 R1 2 - 1 4 7 R2( -2)R1 0
 3 - 5 - 1 7 3  3 - 5 - 1 7 R3( -3)R1 0 - 2 - 4 - 2
  1 0 3 4
x1  3x3  4 x1  -3x3  4


R1 R2 0
1 2 1
x2  2 x3  1 x2  -2 x3  1
R3 R2 0
0
0
0



The general solution (通解) to the system is
x1  -3r  4
隨堂作業:5(c)
x2  -2r  1
x3  r
, where r is real number (calleda parameter).
Ch1_26
Example 3
This example illustrates that the general solution can involve a number
of parameters. Solve the system of equations
x1  2 x2 - x3  3 x4  4
變數個數 >
方程式個數
 many sol.
2 x1  4 x2 - 2 x3  7 x4  10
- x1 - 2 x2  x3 - 4 x4  -6
Solution
 1

 2

-1

2
-1
3
4
-2
7
-2
1 -4
1


R1  (-3)R20

R3  R2 0


4
1



10 R1(-2)R10
 R3R1 
0
- 6

2
-1
3
0
0
1
0
0
-1
2 -1 0 - 2
0
0 1
0
0 0

2

0
x1  2 x2 - x3  -2
x4  2
 x1

 x2

 x3

 x4
4

2

- 2
 -2r  s - 2
r
, for some r , s  R.
s
2
Ch1_27
Example 4
This example illustrates a system that has no solution. Let us try
to solve the system x1  x2  5 x3  3
x2  3x3  -1
x1  2 x2  8 x3  3
Solution(自行練習)
1 1 5 3 
1 1 5 3 
0 1 3 - 1  0 1 3 - 1


 R 3 ( -1) R1 
0 1 3 0 
1 2 8 3 
1 0 2 4 


R1 ( -1) R 2 0
1
3
1


R 3 ( -1) R 2
0 0 0 1 

0x1+0x2+0x3=1
The system has no solution.
隨堂作業:5(d)
Ch1_28
Homogeneous System of linear Equations
Definition
A system of linear equations is said to be homogeneous (齊次)
if all the constant terms (等號右邊的常數項) are zeros.
Example:  x  2 x - 5x  0
1
2
3

- 2 x1 - 3x2  6 x3  0
Observe that x1  0, x2  0, x3  0 is a solution.
Theorem 1.1
A system of homogeneous linear equations in n variables always
has the solution x1 = 0, x2 = 0. …, xn = 0. This solution is called
the trivial solution.
Ch1_29
Homogeneous System of linear Equations
Note. 除 trivial solution 外,可能還有其他解。
Example:  x1  2 x2 - 5 x3  0

- 2 x1 - 3x2  6 x3  0
The system has other nontrivial solutions.
2 - 5 0
1
1 0 3 0
- 2 - 3 6 0    0 1 - 4 0




 x1  -3r, x2  4r, x3  r
Theorem 1.2
A system of homogeneous linear equations that has more
variables than equations has many solutions.
隨堂作業:8(e)
Ch1_30
Homework
Exercise 1.2:
2, 5, 8, 14
Ch1_31
1.3 The Vector Space Rn
Rectangular Coordinate System (直角座標系)
There are two ways of interpreting (5,3)
- it defines the location of a point
in a plane

- it defines the position vector OA
•
•
•
•
•
the origin (原點):(0, 0)

the position vector:OA

the initial point of OA : O

the terminal point of OA : A(5, 3)
ordered pair (序對): (a, b)
Figure 1.5
Ch1_32
Example 1



Sketch the position vectors OA  (4, 1), OB  (-5, - 2) and OC  (-3, 4) .
Figure 1.6
Ch1_33
R2 → R3
Figure 1.7
Ch1_34
Definition
Let (u1 , u 2 , ..., u n ) be a sequence of n real numbers. The set of all
such sequences is called n-space and is denoted Rn.
u1 is the first component (分量) of (u1 , u 2 , ..., u n ), u2 is the
second component and so on.
Example
R4 is the sets of sequences of four real numbers. For example,
(1, 2, 3, 4) and (-1, 3, 5.2, 0) are in R4.
R5 is the set of sequences of five real numbers. For example,
(-1, 2, 0, 3, 9) is in this set.
Ch1_35
Addition and Scalar Multiplication
Definition
Let u  (u1 , u2 , ..., un ) and v  (v1 , v2 , ..., vn ) be two elements of Rn.
We say that u and v are equal if u1 = v1, …, un = vn. Thus two element
of Rn are equal if their corresponding components are equal.
Definition
Let u  (u1 , u2 , ..., un ) and v  (v1 , v2 , ..., vn ) be elements of Rn and let c
be a scalar. Addition and scalar multiplication are performed as follows
Addition:
u  v  (u1  v1 , ..., un  vn )
Scalar multiplication : cu  (cu1 , ..., cu n )
Note.
(1) u, v Rn  u+v  Rn (Rn is closed under addition)(加法封閉性)
(2) u Rn, c R  cu  Rn (Rn is closed under scalar
multiplication)(純量乘法封閉性)
Ch1_36
Example 2
Let u = ( –1, 4, 3, 7) and v = ( –2, –3, 1, 0) be vector in R4.
Find u + v and 3u.
Solution
u  v  (-1, 4, 3, 7)  (-2, - 3, 1, 0)  (-3, 1, 4, 7)
3u  3(-1, 4, 3, 7)  (-3, 12, 9, 21)
Example 3
Consider the vector (4, 1) and (2, 3),
we get
(4, 1) + (2, 3) = (6, 4).
Figure 1.8
Ch1_37
In general, if u and v are vectors in the same vector space, then
u + v is the diagonal (對角線) of the parallelogram (平行四邊
形) defined by u and v.
Figure 1.9
Ch1_38
Example 4
Consider the scalar multiple of the vector (3, 2) by 2, we get
2(3, 2) = (6, 4)
Observe in Figure 4.6 that (6, 4) is a vector in the same direction
as (3, 2), and 2 times it in length.
Figure 1.10
Ch1_39
c>1
0<c<1
–1 < c < 0
c < –1
Figure 1.11
In general, the direction of cu will be the same as the direction of u
if c > 0, and the opposite direction to u if c < 0.
The length of cu is |c| times the length of u.
Ch1_40
Special Vectors
The vector (0, 0, …, 0), having n zero components, is called the
zero vector of Rn and is denoted 0.
Negative Vector
The vector (–1)u is written –u and is called the negative of u. It
is a vector having the same magnitude (量) as u, but lies in the
opposite direction to u.
u
-u
Subtraction
Subtraction is performed on elements of Rn by subtracting
corresponding components. For example, in R3,
(5, 3, -6) – (2, 1, 3) = (3, 2, -9)
Ch1_41
Theorem 1.3
Let u, v, and w be vectors in Rn and let c and d be scalars.
(a) u + v = v + u
(b) u + (v + w) = (u + v) + w
(c) u + 0 = 0 + u = u
(d) u + (–u) = 0
(e) c(u + v) = cu + cv
(f) (c + d)u = cu + du
(g) c(du) = (cd)u
(h) 1u = u
Figure 1.12
Commutativity of vector
addition u + v = v + u
Ch1_42
Linear Combinations of Vectors
We call au +bv + cw a linear combination (線性組合) of the
vectors u, v, and w.
Example 5
Let u = (2, 5, –3), v = ( –4, 1, 9), w = (4, 0, 2). Determine the linear
combination 2u – 3v + w.
Solution
2u - 3v  w  2(2, 5, - 3) - 3(-4, 1, 9)  (4, 0, 2)
 (4, 10, - 6) - (-12, 3, 27)  (4, 0, 2)
 (4  12  4, 10 - 3  0, - 6 - 27  2)
 (20, 7, - 31)
隨堂作業:7(e)
Ch1_43
Column Vectors
Row vector: u  (u1 , u2 , ..., un )
Column vector:
 u1 

 
u n 
向量的另一種表示法
We defined addition and scalar multiplication of column vectors
in Rn in a componentwise manner:
 u1   v1   u1  v1 
       
un  vn  un  vn 
    

and
 u1   cu1 
c      
un  cu n 
   
向量加法可視為矩陣運算
Ch1_44
Subspaces of Rn
We now introduce subsets of the vector space Rn that have all the
algebraic properties of Rn. These subsets are called subspaces.
Definition
A subset S of Rn is a subspace if it is closed under addition and
under scalar multiplication.
Recall:
(1) u, v S  u+v  S (S is closed under addition)(加法封閉性)
(2) u S, c R  cu  S (S is closed under scalar multiplication)
(純量乘法封閉性)
Ch1_45
Example 6
Consider the subset W of R2 of vectors of the form (a, 2a).
Show that W is a subspace of R2.
隨堂作業:10(d)
Proof
Let u = (a, 2a), v = (b, 2b)  W, and k R.
u + v = (a, 2a) + (b, 2b) = (a+ b, 2a + 2b)
= (a + b, 2(a + b))  W
and
ku = k(a, 2a) = (ka, 2ka)  W
Thus u + v  W and ku  W.
W is closed under addition and
scalar multiplication.
W is a subspace of R2.
Observe: W is the set of vectors that
can be written a(1,2).
Figure 1.13
Ch1_46
Example 7
Consider the homogeneous system of linear
x1 - x2  3 x3  0
equations. It can be shown that there are many
x2 - 5 x3  0
solutions x1=2r, x2=5r, x3=r.
2 x1 - x2  x3  0
We can write these solutions as vectors in R3
as (2r, 5r, r).
Show that the set of solutions W is a subspace of R3.
隨堂作業:13
Proof
Let u = (2r, 5r, r), v = (2s, 5s, s) W, and k R.
u + v = (2(r+s), 5(r+s), r+s)  W
and ku = (2kr, 5kr, kr)  W
Thus u + v  W and ku  W.
W is a subspace of R3.
Observe: W is the set of vectors that
can be written r(2,5,1).
Figure 1.14
Ch1_47
Homework
Exercise 1.3:
7, 9, 10, 12, 13
Ch1_48
1.4 Basis and Dimension
向量空間的某些子集合(subset)本身也是向量空間,稱為子空間(subspace)
Basis: a set of vectors which are used to describe a vector space.
Standard Basis of Rn
Consider the vectors (1, 0, 0), (0, 1, 0), (0, 0, 1) in R3.
These vectors have two very important properties:
(i)They are said to span R3. That is, we can write an arbitrary vector (x, y, z)
as a linear combination (線性組合) of the three vectors:
For any (x,y,z) R3  (x,y,z) = x(1, 0, 0) + y(0, 1, 0) + z(0, 0, 1)
(ii)They are said to be linearly independent (線性獨立).
If p(1, 0, 0) + q(0, 1, 0) +r(0, 0, 1) = (0, 0, 0)
 p = 0, q = 0, r = 0 is the unique solution.
A set of vectors that satisfies the two preceding properties is called a basis.
Ch1_49
There are many bases for R3 – sets that span R3 and are linearly independent.
For example, the set {(1, 2, 0), (0, 1, -1), (1, 1, 2)} is a basis for R3.
The set {(1, 0, 0), (0, 1, 0), (0, 0, 1)} is the most important basis for R3. It is
called the standard basis of R3.
R2 : two-dimensional space (二維空間)
R3 : three-dimensional space
觀察: dimension數等於basis中的向量個數 (故成為dimension定義)
The set {(1, 0, …, 0), (0, 1, …, 0), …, (0, …, 1)} of n vectors is
the standard basis for Rn. The dimension (維度) of Rn is n.
隨堂作業:1
Ch1_50
Span, Linear Independence, and Basis
The vectors v1, v2, and v3 are said to span a space if every vector
v in the space can be expressed as a linear combination of them,
v = av1 + bv2 + cv3.
The vectors v1, v2, and v3 are said to be linearly independent if
the identity pv1 + qv2 + rvm = 0 is only true for p = 0, q = 0, r = 0.
A basis for a space is a set that spans the space and is linearly
independent. The number of vectors in a basis is called the
dimension of the space.
Ch1_51
Example 1
Consider the subset W of R3 consisting of vectors of the form
(a, b, a+b). The vector (2, 5, 7)W, whereas (2, 5, 9)W.
Show that W is a subspace of R3.
Proof.
Let u=(a, b, a+b) and v=(c, d, c+d) be vectors in W and k be a scalar.
(1) u+v = (a, b, a+b) + (c, d, c+d) = (a+c, b+d, (a+c)+(b+d))
u+v W
(2) ku = k(a, b, a+b) = (ka, kb, ka+kb)
ku W
W is closed under addition and scalar multiplication.
W is a subspace of R3.
Ch1_52
Example 1 (continue)
Separate the variables in the above arbitrary vector u.
u = (a, b, a+b) = (a, 0, a) + (0, b, b) = a(1, 0, 1) + b(0, 1, 1)
The vectors (1, 0, 1) and (0, 1, 1) thus span W.
Furthermore, p(1, 0, 1) + q(0, 1, 1) = (0, 0, 0) leads to p=0 and q=0.
The two vectors (1, 0, 1) and (0, 1, 1) are thus linearly independent.
The set {(1, 0, 1), (0, 1, 1)} is therefore a basis for W.
The dimension of W, dim(W)= 2.
有加法乘法封閉性
隨堂作業:4(a)
Ch1_53
Example 2
Consider the subset V of R3 of vectors of the form (a, 2a, 3a).
Show that V is a subspace of R3 and find a basis.
Sol.
(subspace)
Let u=(a, 2a, 3a) and v=(b, 2b, 3b) be vectors in V and k be a scalar.
(1) u+v = (a+b, 2(a+b), 3(a+b))
u+v V
(2) ku = k(a, 2a, 3a) = (ka, 2ka, 3ka)
ku V
V is closed under addition and scalar multiplication.
V is a subspace of R3.
(basis)
u = (a, 2a, 3a) = a(1, 2, 3)
 {(1, 2, 3)} is a basis for V.
 dim(V) = 1.
隨堂作業:4(c)
Ch1_54
Example 3
Consider the following system of homogeneous linear equations.
x1 - x2  x3  2 x4  0
x1
- 3x3  2 x4  0
2 x1 - x2 - 2 x3  4 x4  0
It can be shown that there are many solutions
x1 = 3r - 2s, x2 = 4r, x3 = r, x4 = s.
Write these solution as vectors in R4, (3r - 2s, 4r, r, s).
It can be shown that this set of vectors is a subspace W of R4.
Find a basis for W and give its dimension.
Sol.
(1) (3r - 2s, 4r, r, s) = r(3, 4, 1, 0) + s( -2, 0, 0, 1)
(2) If p(3, 4, 1, 0) + q( -2, 0, 0, 1) = (0, 0, 0, 0), then p=0, q=0.
 {(3, 4, 1, 0), ( -2, 0, 0, 1) } is a basis for W.
 dim(W) = 2.
隨堂作業:11
Ch1_55
Exercise 7
State with a brief explanation whether the following statements are
true or false.
(a) The set {(1, 0, 0), (0, 1, 0)} is the basis for a two-dimensional
subspace of R3.
(b) The set {(1, 0, 0)} is the basis for a one-dimensional subspace
of R3.
(c) The vector (a, 2a, b) is an arbitrary vector in the plane spanned
by the vectors (1, 2, 0) and (0, 0, 1).
(d) The vector (a, b, 2a-b) is an arbitrary vector in the plane
spanned by the vectors (1, 0, 2) and (0, 1, -1).
(e) The set {(1, 0, 0), (0, 1, 0), (1, 1, 0)} is a basis for a subspace
of R3.
(f) R2 is a subspace of R3.
Ch1_56
Homework
Exercise 1.4:
1, 4, 11, 12
Ch1_57
1.5 Dot Product, Norm, Angle, and
Distance
In this section we develop a geometry for the vector space Rn.
Definition
Let u  (u1 , u2 , ..., un ) and v  (v1 , v2 , ..., vn ) be two vectors in Rn.
The dot product (內積) of u and v is denoted u‧v and is defined
u  v  u1v1  
by
.  unvn
The dot product assigns a real number to each pair of vectors.
The dot product is a tool that is used to build the geometry of Rn.
Example
Find the dot product of u = (1, –2, 4) and v = (3, 0, 2)
Solution
u  v  (1 3)  (-2  0)  (4  2)  3  0  8  11
Ch1_58
Properties of the Dot Product
Let u, v, and w be vectors in Rn and let c be a scalar. Then
1. u‧v = v‧u
2. (u + v)‧w = u‧w + v‧w
3. cu‧v = c(u‧v) = u‧cv
4. u‧u  0, and u‧u = 0 if and only if u = 0
Proof
1. Let u  (u1 , u2 , ..., un ) and v  (v1 , v2 , ..., vn ). We get
u  v  u1v1    un vn
 v1u1    vnun by the commutative property of real numbers
 v u
2. u  u  u1u1    unun  u1 2    un 2
隨堂作業:2(b)
2
2
u1     un   0, thus u  u  0.
2
2
u1     un   0, if and only if u1  0, , un  0.
Thus u  u  0 if and only if u  0.
Ch1_59
Norm (length) of a Vector in Rn
Figure 1.17
Definition
The norm (length or magnitude) of a vector u = (u1, …, un) in
Rn is denoted ||u|| and defined by u  u1 2    un 2
Note:
The norm of a vector can also be written in terms of the dot
product u  u  u
Ch1_60
Example
Find the norm of the vectors u = (1, 3, 5) of R3 and v = (3, 0, 1, 4)
of R4.
Solution
u  (1) 2  (3) 2  (5) 2  1  9  25  35
v  (3) 2  (0) 2  (1) 2  (4) 2  9  0  1  16  26
Definition
A unit vector is a vector whose norm is 1. If v is a nonzero
1
vector, then the vector
u v
v
is a unit vector in the direction of v.
This procedure of constructing a unit vector in the same direction
as a given vector is called normalizing the vector.
Ch1_61
Example 1
Find the norm of the vector (2, –1, 3). Normalize this vector.
Solution
(2, - 1, 3)  22  (-1) 2  32  14. The norm of (2, –1, 3) is 14.
The normalized vector is
1
(2, - 1, 3)
14
2 -1 3 

The vector may also be written 
,
,
.
 14 14 14 
This vector is a unit vector in the direction of (2, –1, 3).
隨堂作業:6(b), 10(d)
Ch1_62
Angle between Vectors (R2)
Let u=(a, b) and v=(c, d). Find the angle q between u and v.
The law of cosines gives
We get that
Figure 1.18
0q
Ch1_63
Angle between Vectors (R n)
Definition
Let u and v be two nonzero vectors in Rn. The cosine of the
angle q between these vectors is
uv
cosq 
0 q 
u v
Example 2
Determine the angle between the vectors u = (1, 0, 0) and
v = (1, 0, 1) in R3.
Solution u  v  (1, 0, 0)  (1, 0, 1)  1
u  12  02  02  1
v  12  02  12  2
uv
1

, the angle between u and v is /4 (or 45).
Thus cosq 
u v
2
隨堂作業:13(c)
Ch1_64
Definition
Two nonzero vectors are orthogonal (正交) if the angle between
them is a right angle (直角).
Theorem 1.4
Two nonzero vectors u and v are orthogonal if and only if u‧v = 0.
可寫成uv
Proof
u, v are orthogonal  cosq  0  u  v  0
Example
The vectors (2, –3, 1) and (1, 2, 4) are orthogonal since
(2, –3, 1)‧(1, 2, 4) = (2  1) + (–3  0) + (1  4) = 2 – 6 + 4 = 0.
Ch1_65
Properties of Standard basis of Rn
(1, 0), (0,1) are orthogonal unit vectors in R2.
(1, 0, 0), (0, 1, 0), (0, 0, 1) are orthogonal unit
vectors in R3.
We call a set of unit pairwise orthogonal vectors an orthonormal
set.
The standard basis for Rn, {(1, 0, …, 0), (0, 1, 0, …, 0), …,
(0, …, 0, 1)} is an orthonormal set.
隨堂作業:16(d)
Ch1_66
Example 3
(a) Let w be a vector in Rn. Let W be the set of vectors that are
orthogonal to w. Show that W is a subspace of Rn.
(b) Find a basis for the subset W of vectors in R3 that are orthogonal to
w=(1, 3, 1). Give the dimension and a geometrical description of W.
Solution
(a) Let u, vW. Since uw and vw, we have uw=0 and vw=0.
(u+v)w = uw + vw = 0
 u+v w
If c is a scalar, c(uw) = cuw = 0
 u+v W
 cu w
 cu W
W is a subspace of Rn.
(b) Let (a, b, c)W and (a, b, c)w, then (a, b, c)(1, 3, 1)=0
 a+3b+c=0
 W is the set {(a, b, -a - 3b) | a, b R}
Since (a, b, -a - 3b) = a(1, 0, -1) + b(0, 1, -3). It is clear that
{(1, 0, -1), (0, 1, -3)} is a basis for W  dim(W)=2
Ch1_67
Example 3 (continue)
W is the plane in R3 defined by
(1, 0, -1) and (0, 1, -3).
Figure 1.19
隨堂作業:20
Ch1_68
Distance between Points
2
2
The distance between x=(x1, x2) and y =(y1, y2) is ( x1 - y1 )  ( x2 - y2 )
Generalize this expression to Rn.
Def. Let x=(x1, x2, …, xn) and y=(y1, y2, …, yn) be two points in Rn.
The distance between x and y is denoted d(x, y) and is defined by
d (x, y )  ( x1 - y1 ) 2    ( xn - yn ) 2
x
Note: We can also write this distance as follows.
x-y
y
d (x, y )  x - y
Example 4
Determine the distance between the points x = (1,–2 , 3, 0) and
y = (4, 0, –3, 5) in R4.
Solution
d (x, y )  (1 - 4) 2  (-2 - 0) 2  (3  3) 2  (0 - 5) 2  74
Ch1_69
Example 5
Prove that the distance in Rn has the following symmetric
property: d(x, y)=d(y, x) for any x, y  Rn.
Solution
Let x  ( x1, x2 , ..., xn ) and y  ( y1, y2 , ..., yn )
d (x, y )  ( x1 - y1 ) 2    ( xn - yn ) 2
 ( y1 - x1 ) 2    ( yn - xn ) 2  d (y, x)
Ch1_70
Theorem 1.5
The Cauchy-Schwartz Inequality.
If u and v are vectors in Rn then
uv  u v
Here u  v denoted the absolute value (絕對值) of the number uv.
Ch1_71
Theorem 1.6
Let u and v be vectors in Rn.
(a) Triangle Inequality (三角不等式):
||u + v||  ||u|| + ||v||.
(a) Pythagorean theorem (畢氏定理):
If u‧v = 0 then ||u + v||2 = ||u||2 + ||v||2.
Figure 1.21
Ch1_72
Homework
Exercise 1.5:
2, 6, 10, 13, 16, 20, 33
(1.6節跳過)
Ch1_73