730 likes | 746 Views
Linear Algebra. Chapter 1 Linear Equations and Vectors. 大葉大學 資訊工程系 黃鈴玲. 1.1 Matrices and Systems of Linear Equations. Definition
E N D
Linear Algebra Chapter 1Linear 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 (線性聯立方程式)
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. Figure 1.2 No solution (無解) –2x + y = 3 –4x + 2y = 2 Lines are parallel.No point of intersection. No solutions. 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.
Definition A linear equation in n variables x1, x2, x3, …, xn has the form a1 x1 + a2 x2 + a3 x3 + … + anxn = b where the coefficients (係數) a1, a2, a3, …, an and b are constants. 常見數系的英文名稱: natural number (自然數), integer (整數), rational number (有理數), real number (實數), complex number (複數) positive (正), negative (負)
A linear equation in three variables corresponds to a plane in three-dimensional (三維) space. • Unique solution ※ Systems of three linear equations in three variables:
No solutions • Many solutions
How to solve a system of linear equations? Gauss-Jordan elimination. (高斯-喬登消去法) 1.2節會介紹
Definition A matrix(矩陣)is a rectangular array of numbers. The numbers in the array are called the elements(元素)of the matrix. • Matrices 注意矩陣左右兩邊是中括號不是直線,直線表示的是行列式。
Row (列) and Column (行) • Submatrix (子矩陣)
Size and Type • Location aij表示在row i, column j的元素值 也寫成 location (1,3) = -4 • Identity Matrices (單位矩陣) • diagonal (對角線) 上都是1,其餘都是0,I的下標表示size
Relations between system of linear equations and matrices • matrix of coefficient and augmented matrix 係數矩陣 擴大矩陣 隨堂作業:5(f)
給定聯立方程式後, 不會改變解的一些轉換 Elementary Transformation Interchange two equations. Multiply both sides of an equation by a nonzero constant. Add a multiple of one equation to another equation. 將左邊的轉換對應到矩陣上 Elementary Row Operation (基本列運算) Interchange two rows of a matrix.(兩列交換) Multiply the elements of a row by a nonzero constant.(某列的元素同乘一非零常數) Add a multiple of the elements of one row to the corresponding elements of another row.(將一個列的倍數加進另一列裡) Elementary Row Operations of Matrices
符號表示row equivalent Solution Analogous Matrix Method Augmented matrix: Equation Method Initial system: Eq2+(–2)Eq1 R2+(–2)R1 Eq3+(–1)Eq1 R3+(–1)R1 Example 1 Solving the following system of linear equation.
Eq1+(–1)Eq2 R1+(–1)R2 Eq3+(2)Eq2 R3+(2)R2 (–1/5)R3 (–1/5)Eq3 Eq1+(–2)Eq3 R1+(–2)R3 The solution is The solution is Eq2+Eq3 R2+R3 隨堂作業:7(d)
R1+(–3)R2 (1) (2) R1+2R2 R2+2R1 基本列運算符號說明: 表示將R1(第一列) 加上 (-3) R2, 所以是R1這列會改變,R2不變 For example:
2R1+R2 2R1 R1+R2 基本列運算符號說明: 避免將要修改的列乘以某個倍數,這樣容易出錯 不好! 較好! 基本列運算的步驟: (盡量使矩陣一步步變成以下形式) … … …
Example 2 Solving the following system of linear equation. Solution (請先自行練習)
Example 3 Solve the system Solution (請先自行練習) 隨堂作業:10(d)(f)
A B i.e., Summary Use row operations to [A: B] : 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 toIn (AIn). 2. If AIn, then the system has unique solution.
R2+(–2)R1 R3+R1 Example 4 Many Systems Solving the following three systems of linear equation, all of which have the same matrix of coefficients. Solution The solutions to the three systems are 隨堂作業:13(b)
Homework • Exercise 1.1:1, 2, 4, 5, 6, 7, 10, 13
1.2 Gauss-Jordan Elimination • Definition • A matrix is in reduced echelon form (簡化梯式) if • Any rows consisting entirely of zeros are grouped at the bottom of the matrix. (全為零的列都放在矩陣的下層) • The first nonzero element of each other row is 1. This element is called a leading 1. (每列第一個非零元素是1,稱做leading 1) • 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會呈現由左上到右下的排列) • All other elements in a column that contains a leading 1 are zero. (包含leading 1的行裡所有其他元素都是0)
Examples for reduced echelon form () () () () • 利用一連串的 elementary row operations,可讓任何矩陣變成 reduced echelon form • The reduced echelon form of a matrix is unique. 隨堂作業:2(b)(d)(h)
Gauss-Jordan Elimination • System of linear equations augmented matrix reduced echelon form solution
pivot (樞軸,未來的 leading 1) pivot Example 1 Use the method of Gauss-Jordan elimination to find reduced echelon form of the following matrix. Solution The matrix is the reduced echelon form of the given matrix.
Example 2 Solve, if possible, the system of equations Solution (請先自行練習) The general solution (通解) to the system is 隨堂作業:5(c)
Example 3 This example illustrates that the general solution can involve a number of parameters. Solve the system of equations 變數個數 >方程式個數many sol. Solution
0x1+0x2+0x3=1 Example 4 This example illustrates a system that has no solution. Let us try to solve the system Solution(自行練習) The system has no solution. 隨堂作業:5(d)
Example: 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. Observe that is a solution. Homogeneous System of linear Equations Definition Asystem of linear equations is said to be homogeneous(齊次) if all the constant terms(等號右邊的常數項) are zeros.
Example: The system has other nontrivial solutions. Theorem 1.2 A system of homogeneous linear equations that has more variables than equations has many solutions. Homogeneous System of linear Equations Note. 除 trivial solution 外,可能還有其他解。 隨堂作業:8(e)
Homework • Exercise 1.2:2, 5, 8, 14
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 • the origin (原點):(0, 0) • the position vector: • the initial point of : O • the terminal point of : A(5, 3) • ordered pair (序對): (a, b) Figure 1.5
Example 1 Sketch the position vectors . Figure 1.6
R2 → R3 Figure 1.7
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. 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.
Definition Let be elements of Rn and let c be a scalar. Addition and scalar multiplication are performed as follows Addition: Scalar multiplication : Addition and Scalar Multiplication 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. Note. (1) u, v Rn u+v Rn (Rnis closed under addition)(加法封閉性) (2) u Rn,c R cu Rn (Rnis closed under scalar multiplication)(純量乘法封閉性)
Solution Example 3 Consider the vector (4, 1) and (2, 3), we get (4, 1) + (2, 3) = (6, 4). Figure 1.8 Example 2 Let u = ( –1, 4, 3, 7) and v = ( –2, –3, 1, 0) be vector in R4. Find u + v and 3u.
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
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
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 uif c > 0, and the opposite direction to u if c < 0. The length of cu is |c| times the length of u.
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 u 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 Special Vectors The vector (0, 0, …, 0), having n zero components, is called the zero vector of Rn and is denoted 0.
Figure 1.12 Commutativity of vector addition u + v = v + u Theorem 1.3 • Let u, v, and w be vectors in Rn and let c and d be scalars. • u + v = v + u • u + (v + w) = (u + v) + w • u + 0 = 0 + u = u • u + (–u) = 0 • c(u + v) = cu + cv • (c + d)u = cu + du • c(du) = (cd)u • 1u = u
Solution 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. 隨堂作業:7(e)
Row vector: Column vector: 向量的另一種表示法 We defined addition and scalar multiplication of column vectors in Rn in a componentwise manner: and 向量加法可視為矩陣運算 Column Vectors
Subspaces of Rn We now introduce subsets of the vector space Rn that have all thealgebraic 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, vS u+v S (Sis closed under addition)(加法封閉性) (2) uS,c R cu S (Sis closed under scalar multiplication) (純量乘法封閉性)
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 kR. 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
Example 7 Consider 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 R3as (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 kR. 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
Homework • Exercise 1.3:7, 9, 10, 12, 13
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: • 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) • 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.
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