chapter 1 linear equations and vectors 大葉大學 資訊工程系 黃鈴玲 linear algebra
TRANSCRIPT
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 ( 解 ).
1.1 Matrices and Systems of Linear Equations
system of linear equations ( 線性聯立方程式 )
Ch1_2
Figure 1.2No solution ( 無解 )–2x + y = 3–4x + 2y = 2 Lines are parallel.No point of intersection. No solutions.
Solutions for system of linear equations
Figure 1.1Unique solution ( 唯一解 ) x + y = 5 2x y = 4 Lines intersect at (3, 2)Unique solution: x = 3, y = 2.
Figure 1.3Many solution ( 無限多解 )4x – 2y = 66x – 3y = 9 Both equations have the same graph. Any point on the graph is a solution. Many solutions. Ch1_3
Ch1_4
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_5
A linear equation in three variables corresponds to a plane in three-dimensional ( 三維 ) space.
Unique solution
※ Systems of three linear equations in three variables:
Ch1_8
Definition• A matrix ( 矩陣 ) is a rectangular array of numbers. • The numbers in the array are called the elements ( 元素 ) of
the matrix.
Matrices
1298
520
653
C
38
50
17
B 157
432A
注意矩陣左右兩邊是中括號不是直線,直線表示的是行列式。
Ch1_9
Submatrix (子矩陣 )
A matrix
215
032
471
A
Row ( 列 ) and Column ( 行 )
3column 2column 1column 2 row 1 row
1
4
5
3
7
2 157 432
157
432
A
A of ssubmatrice
25
41
1
3
7
15
32
71
RQP
Ch1_10
Identity Matrices (單位矩陣 ) diagonal ( 對角線 ) 上都是 1 ,其餘都是 0 , I 的下標表示 size
100010001
1001
32 II
Location
7 ,4 157
4322113
aaAaij 表示在 row i, column j 的元素值也寫成 location (1,3) = 4
Size and Type
matrixcolumn a matrix row a matrix square a
matrix 13 matrix 41 matrix 33 32 :Size
2
3
8
5834
853
109
752
542
301
Ch1_11
matrix of coefficient and augmented matrix
62
3 32
2
321
321
321
xxx
xxx
xxx
Relations between system of linear equations and matrices
係數矩陣 擴大矩陣
隨堂作業: 5(f)
tcoefficien ofmatrix
211
132
111
matrix augmented
6211
3132
2111
Ch1_12
給定聯立方程式後,不會改變解的一些轉換
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. ( 將一個列的倍數加進另一列裡 )
Elementary Row Operations of Matrices
Ch1_13
Example 1Solving the following system of linear equation.
623322
321
321
321
xxxxxxxxx
621131322111
623322
321
321
321
xxxxxxxxx
SolutionEquation MethodInitial system:
Analogous Matrix MethodAugmented matrix:
1
2
32
321
xx
xxx
Eq2+(–2)Eq1
Eq3+(–1)Eq1
832011102111
R2+(–2)R1R3+(–1)R1
符號表示 row equivalent
832 32 xx
Ch1_14
1051
32
3
32
31
xxxxx
0150011103201
21
32
3
32
31
xxxxx
210011103201
21
1
3
2
1
xxx
2100
1010
1001
Eq1+(–1)Eq2
Eq3+(2)Eq2
(–1/5)Eq3
Eq1+(–2)Eq3
Eq2+Eq3
The solution is .2 ,1 ,1 321 xxx The solution is
.2 ,1 ,1 321 xxx
8321
2
32
32
321
xxxxxxx
832011102111
R1+(–1)R2 R3+(2)R2
(–1/5)R3
R1+(–2)R3 R2+R3
隨堂作業: 7(d)
Ch1_15
基本列運算符號說明:
R1+(–3)R2 表示將 R1( 第一列 ) 加上 (3) R2 ,
所以是 R1 這列會改變, R2 不變
For example:
83311851212421
(1) R1+2R2
83311851212421
(2) R2+2R1
8331
18512
481445
8331
421354
12421
Ch1_16
基本列運算符號說明:避免將要修改的列乘以某個倍數,這樣容易出錯
不好! 2R1+R2
2R1
R1+R2
較好!
基本列運算的步驟: ( 盡量使矩陣一步步變成以下形式 )
…
0
0
1…
00
10
01
100
010
001
…
Ch1_17
Example 2Solving the following system of linear equation.
83318521242
321
321
321
xxxxxxxxx
Solution (請先自行練習 )
83311851212421
41106330
12421
R23
1
41102110
12421
620021108201
3100
2110
8201
R1R3
2)R1(R2
R2)1(R3
(2)R2R1
R32
1
3100
1010
2001
R3R2
2)R3(R1
.
3
1
2
solution
3
2
1
x
x
x
Ch1_18
Example 3Solve the system
7 2
328 63
441284
21
321
321
xx
xxx
xxx
7012
32863
441284
7012
32863
11321
15630
1100
11321
1100
5210
11321
1100
5210
1101
.
1100
3010
2001
.1 ,3 ,2 issolution The 321 xxx
R23
1
R12R3
3)R1(R2
R3R2
1100
15630
11321
R14
1
2)R2(R1
2R3R2
1)R3(R1
Solution (請先自行練習 )
隨堂作業: 10(d)(f)
Ch1_19
Summary
7012
32863
441284
]:[ BA
A BUse row operations to [A: B] :
.
1100
3010
2001
7012
32863
441284]:[]:[ XIBA ni.e.,
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.
7 2
328 63
441284
21
321
321
xx
xxx
xxx
Ch1_20
Example 4 Many SystemsSolving the following three systems of linear equation, all of which have the same matrix of coefficients.
3321
2321
1321
42
for 42
3
bxxx
bxxx
bxxx
in turn 433
,210
,11118
3
2
1
bbb
Solution
42114213111412308311
.
2
1
2
,
1
3
0
,
2
1
1
3
2
1
3
2
1
3
2
1
x
x
x
x
x
x
x
x
x
123110315210308311
212100
315210
013101
212100
131010
201001
R2+(–2)R1 R3+R1
1)R2(R3
R2R1
R32R2
R3)1(R1
隨堂作業: 13(b)The solutions to the three systems are
Ch1_22
1.2 Gauss-Jordan EliminationDefinitionA 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_23
Examples for reduced echelon form
10000
04300
03021
9100
3010
7001
3100
0000
4021
000
210
801
() ()() ()
利用一連串的 elementary row operations ,可讓任何矩陣變成 reduced echelon form
The reduced echelon form of a matrix is unique.
隨堂作業: 2(b)(d)(h)
Ch1_24
Gauss-Jordan Elimination
System of linear equations augmented matrix reduced echelon form solution
Ch1_25
41200
22200
43111
4)R1(R3
610001110052011
R2)2(R3R2R1
Example 1Use the method of Gauss-Jordan elimination to find reduced echelon form of the following matrix.
1211244129333
22200
Solution
1211244
22200
129333
R2R1
pivot ( 樞軸,未來的 leading 1)
12112442220043111
R13
1
pivot
6100050100
170011
R3R22)R3(R1
The matrix is the reduced echelon form of the given matrix.
41200
11100
43111
R221
Ch1_26
Example 2Solve, if possible, the system of equations
7537429333
321
321
321
xxxxxxxxx
Solution (請先自行練習 )
715374123111
715374129333
R131
242012103111
3)R1(R3
2)R1(R2
000012104301
R2R3
R2R11243
1243
32
31
32
31
xxxx
xxxx
The general solution ( 通解 ) to the system is
.parameter) a (callednumber real is where,
12
43
3
2
1
rrx
rx
rx
隨堂作業: 5(c)
Ch1_27
Example 3This example illustrates that the general solution can involve a numberof parameters. Solve the system of equations
642
107242
432
4321
4321
4321
xxxx
xxxx
xxxx
Solution
21000
21000
43121
64121
107242
43121
R1R3 2)R1(R1
00000
21000
20121
R2R3
3)R2(R1
., somefor ,
2
22
2
22
4
3
2
1
4
321 Rsr
x
sx
rx
srx
x
xxx
變數個數 >方程式個數 many sol.
Ch1_28
Example 4This example illustrates a system that has no solution. Let us try to solve the system
382
13
35
321
32
321
xxx
xx
xxx
Solution(自行練習 )
1000
1310
4201
2R)1(3R
2R)1(1R
The system has no solution.
0310
1310
3511
3821
1310
3511
1R)1(3R
0x1+0x2+0x3=1
隨堂作業: 5(d)
Ch1_29
Homogeneous System of linear Equations
Definition A system of linear equations is said to be homogeneous ( 齊次 ) if all the constant terms ( 等號右邊的常數項 ) are zeros.
Example:
0632
052
321
321
xxx
xxx
Observe that is a solution. 0 ,0 ,0 321 xxx
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_30
Homogeneous System of linear Equations
Theorem 1.2
A system of homogeneous linear equations that has more variables than equations has many solutions.
Note. 除 trivial solution 外,可能還有其他解。
隨堂作業: 8(e)
0410
0301
0632
0521
0632
052
321
321
xxx
xxx
The system has other nontrivial solutions.
rxrxrx 321 ,4 ,3
Example:
1.3 The Vector Space Rn
Figure 1.5
Rectangular Coordinate System (直角座標系 )
• the origin ( 原點 ) : (0, 0)
• the position vector :• the initial point of : O
• the terminal point of : A(5, 3)
• ordered pair ( 序對 ): (a, b)
OA
There are two ways of interpreting (5,3)- it defines the location of a point in a plane- it defines the position vector OA
OA
OA
Ch1_32
Definition Let 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 , u2 is the second component and so on.
) ..., , ,( 21 nuuu
) ..., , ,( 21 nuuu
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
Definition Let 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.
) ..., , ,( and ) ..., , ,( 2121 nn vvvuuu vu
Definition Let be elements of Rn and let c be a scalar. Addition and scalar multiplication are performed as follows
Addition:
Scalar multiplication :
) ..., , ,( and ) ..., , ,( 2121 nn vvvuuu vu
) ..., ,() ..., ,(
1
11
n
nn
cucucvuvu
uvu
Ch1_36
Addition and Scalar Multiplication
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)( 純量乘法封閉性 )
Example 2Let u = ( –1, 4, 3, 7) and v = ( –2, –3, 1, 0) be vector in R4.
Find u + v and 3u.
Solution
21) 9, 12, ,3(7) 3, 4, ,1(33
7) 4, 1, ,3(0) 1, ,3 ,2(7) 3, 4, ,1(
u
vu
Example 3
Figure 1.8
Consider the vector (4, 1) and (2, 3), we get
(4, 1) + (2, 3) = (6, 4).
Ch1_37
Figure 1.9
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.
Ch1_38
Example 4
Figure 1.10
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.
Ch1_39
Figure 1.11
c > 1 0 < c < 1 –1 < c < 0 c < –1
In general, the direction of cu will be the same as the direction of uif 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.
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)
u
u
Ch1_41
Theorem 1.3Let 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
Solution
)31 7, 20,(
)2276 ,0310 4,12(4
2) 0, (4,27) 3, ,12()6 10, ,4(
2) 0, (4,9) 1, ,4(3)3 5, ,2(2
w3v2u
隨堂作業: 7(e)
Let u = (2, 5, –3), v = ( –4, 1, 9), w = (4, 0, 2). Determine the linear combination 2u – 3v + w.
Example 5
We call au +bv + cw a linear combination ( 線性組合 ) of the vectors u, v, and w.
Ch1_43
Column Vectors
nnnn vu
vu
v
v
u
u
1111
We defined addition and scalar multiplication of column vectors in Rn in a componentwise manner:
and
nn cu
cu
u
uc
11
向量加法可視為矩陣運算
Row vector:
Column vector:
) ..., , ,( 21 nuuuu
nu
u
1
向量的另一種表示法
Ch1_44
Subspaces of Rn
Ch1_45
Definition A subset S of Rn is a subspace if it is closed under addition and under scalar multiplication.
We now introduce subsets of the vector space Rn that have all thealgebraic properties of Rn. These subsets are called subspaces.
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_46
Example 6Consider the subset W of R2 of vectors of the form (a, 2a). Show that W is a subspace of R2.
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)) Wand ku = k(a, 2a) = (ka, 2ka) WThus 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
隨堂作業: 10(d)
Ch1_47
Example 7Consider the homogeneous system of linear equations. It can be shown that there are manysolutions x1=2r, x2=5r, x3=r.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.Proof
Let u = (2r, 5r, r), v = (2s, 5s, s) W, and k R. u + v = (2(r+s), 5(r+s), r+s) Wand ku = (2kr, 5kr, kr) WThus 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
02
05
03
321
32
321
xxx
xx
xxx
隨堂作業: 13
1.4 Basis and Dimension
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.
Ch1_49
向量空間的某些子集合 (subset) 本身也是向量空間,稱為子空間(subspace)Basis: a set of vectors which are used to describe a vector space.
Standard Basis of Rn
A set of vectors that satisfies the two preceding properties is called a basis.
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.
Ch1_50
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 定義 )
隨堂作業:1
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.
Ch1_51
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.
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.
Example 1
Ch1_52
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_53
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.
Example 1 (continue)
有加法乘法封閉性
隨堂作業: 4(a)
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.
Example 2
Ch1_54
Sol.
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.
(subspace)
(basis)
u = (a, 2a, 3a) = a(1, 2, 3)
{(1, 2, 3)} is a basis for V.
dim(V) = 1.隨堂作業:4(c)
Consider the following system of homogeneous linear equations.
Example 3
Ch1_55
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.
(1) (3r 2s, 4r, r, s) = r(3, 4, 1, 0) + s(2, 0, 0, 1)
{(3, 4, 1, 0), (2, 0, 0, 1) } is a basis for W.
dim(W) = 2. 隨堂作業:11
0422
023
02
4321
431
4321
xxxx
xxx
xxxx
(2) If p(3, 4, 1, 0) + q(2, 0, 0, 1) = (0, 0, 0, 0), then p=0, q=0.
Sol.
Ch1_56
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, 2ab) 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.
1.5 Dot Product, Norm, Angle, and Distance
Definition Let be two vectors in Rn. The dot product ( 內積 ) of u and v is denoted u‧v and is defined by .
The dot product assigns a real number to each pair of vectors.
) ..., , ,( and ) ..., , ,( 2121 nn vvvuuu vu
nnvuvu 11vu
Example
Find the dot product of u = (1, –2, 4) and v = (3, 0, 2)
Solution
11803)24()02()31( vuCh1_58
In this section we develop a geometry for the vector space Rn.
The dot product is a tool that is used to build the geometry of Rn.
Properties of the Dot ProductLet 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
Proof1.
uv
vuvu
numbers real ofproperty ecommutativ by the
get We). ..., , ,( and ) ..., , ,(Let
11
11
2121
nn
nn
nn
uvuvvuvu
vvvuuu
2.
. ifonly and if 0 Thus.0 , ,0 ifonly and if ,0
.0 thus,0
122
1
221
22111
0uuu
uu
uu
nn
n
nnn
uuuu
uu
uuuuuu
隨堂作業: 2(b)
Ch1_59
Norm (length) of a Vector in Rn
Definition The norm (length or magnitude) of a vector u = (u1, …, un) in Rn is denoted ||u|| and defined by
Note: The norm of a vector can also be written in terms of the dot product
221 nuu u
uuu Ch1_60
Figure 1.17
Definition A unit vector is a vector whose norm is 1. If v is a nonzero vector, then the vector
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.
vv
u1
Find the norm of the vectors u = (1, 3, 5) of R3 and v = (3, 0, 1, 4) of R4.
Solution352591)5()3()1( 222 u
2616109)4()1()0()3( 2222 v
Example
Ch1_61
Example 1
Solution
Find the norm of the vector (2, –1, 3). Normalize this vector.
The norm of (2, –1, 3) is
The normalized vector is
The vector may also be written
This vector is a unit vector in the direction of (2, –1, 3).
.143)1(23) ,1 ,2( 222 .14
)3 ,1 ,2(141
.143
,141
,142
隨堂作業: 6(b), 10(d)Ch1_62
Angle between Vectors (R2)
Figure 1.18
The law of cosines gives
We get that
Ch1_63
Let u=(a, b) and v=(c, d). Find the angle between u and v.
0
Definition Let u and v be two nonzero vectors in Rn. The cosine of the angle between these vectors is
0 cosvuvu
Example 2Determine the angle between the vectors u = (1, 0, 0) and v = (1, 0, 1) in R3.
Solution 11) 0, (1,0) 0, 1,( vu
2101 1001 222222 vu
Thus the angle between u and v is /4 (or 45).,2
1cos
vuvu
隨堂作業: 13(c)
Angle between Vectors (R n)
Ch1_64
Definition Two nonzero vectors are orthogonal ( 正交 ) if the angle between
them is a right angle ( 直角 ).
Two nonzero vectors u and v are orthogonal if and only if u‧v = 0.
Theorem 1.4
Proof
0 0cos orthogonal are , vuvu
Ch1_65
ExampleThe 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.
可寫成 uv
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.
Ch1_66
We call a set of unit pairwise orthogonal vectors an orthonormalset.
The standard basis for Rn, {(1, 0, …, 0), (0, 1, 0, …, 0), …, (0, …, 0, 1)} is an orthonormal set.
隨堂作業: 16(d)
Ch1_67
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, vW. Since uw and vw, we have uw=0 and vw=0. (u+v)w = uw + vw = 0 u+v w u+v W
If c is a scalar, c(uw) = cuw = 0 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, a3b) | a, b R}
Since (a, b, a3b) = 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_68
Figure 1.19
Example 3 (continue)W is the plane in R3 defined by(1, 0, 1) and (0, 1, 3).
隨堂作業: 20
Distance between Points
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
Note: We can also write this distance as follows.
2211 )()() ,( nn yxyxd yx
yxyx ) ,(d
Example 4
Determine the distance between the points x = (1,–2 , 3, 0) and y = (4, 0, –3, 5) in R4.
Solution
74)50()33()02()41(),( 2222 yxd
x
yxy
Ch1_69
The distance between x=(x1, x2) and y =(y1, y2) is2
222
11 )()( yxyx
Generalize this expression to Rn.
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
) ..., , ,( and ) ..., , ,( 2121 nn yyyxxx yxLet
2211 )()() ,( nn yxyxd yx
) ,()()( 2211 xydxyxy nn
Ch1_70
Theorem 1.5The Cauchy-Schwartz Inequality. If u and v are vectors in Rn then
Here denoted the absolute value ( 絕對值 ) of the number uv.
vuvu vu
Ch1_71
Theorem 1.6Let 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.
Ch1_72Figure 1.21