Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2 Basic Linear Algebra ( 基本線性代數 ) to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c)

Similar presentations


Presentation on theme: "Chapter 2 Basic Linear Algebra ( 基本線性代數 ) to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c)"— Presentation transcript:

1

2 Chapter 2 Basic Linear Algebra ( 基本線性代數 ) to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.

3 2 §2.1 §2.1 – Matrices ( 矩陣 ) & Vectors ( 向量 ) A matrix is any rectangular array of numbers If a matrix A has m rows and n columns it is referred to as an m x n matrix. If a matrix A has m rows and n columns it is referred to as an m x n matrix. m x n is the order of the matrix. It is typically written as m x n is the order ( 階 ) of the matrix. It is typically written as

4 3 The number in the ith row and jth column of A is called the ijth element of A and is written a. The number in the ith row and jth column of A is called the ijth element of A and is written a ij. Two matrices A = [a ij ] and B = [b ij ] are equal if and only if A and B are the same order and for all i and j, a ij = b ij. A = B if and only if x = 1, y = 2, w = 3, and z = 4

5 4 Any matrix with only one column is a column vector ( 行向量 ) or column matrix ( 行矩陣 ). The number of rows in a column vector is the dimension of the column vector. C= R m will denote the set all m-dimensional column vectors R m will denote the set all m-dimensional column vectors Any matrix with only one row (a 1 x n matrix) is a row vector row. The dimension of a row vector is the number of columns. R= Any matrix with only one row (a 1 x n matrix) is a row vector ( 列向量 ) or row matrix ( 列矩陣 ). The dimension of a row vector is the number of columns. R=

6 5 Any m-dimensional vector (either row or column) in which all the elements equal zero is called a zero vector ( 零向量 ) or zero matrix ( 零矩陣 ) (written 0). Any m-dimensional vector corresponds to a directed line segment in the m-dimensional plane. Any m-dimensional vector corresponds to a directed line segment in the m-dimensional plane.  For example, the two-dimensional vector u corresponds to the line segment joining the point (0,0) to the point (1,2)

7 6 Other Forms Diagonal matrix ( 對角線矩陣 ) Identity matrix ( 單位矩陣 ) Upper triangular matrix( 上三角矩陣 ) Lower triangular matrix ( 下三角矩陣 )

8 7 Example :

9 8 Transpose Matrix ( 轉置矩陣 ) P.15

10 9 Example :

11 10 轉置矩陣之性質  p.20 #4

12 11 Square Matrix of Order n ( 方陣之乘冪 )

13 12 Example : (AB) 2 ≠A 2 B 2 (AB = BA) ?

14 13 Symmetric Matrix ( 對稱矩陣 ) & Skew-symmetric Matrix ( 斜對稱矩陣 )

15 14 Example : is a symmetric matrix is a skew-symmetric matrix

16 15 對稱矩陣與斜對稱矩陣之性質

17 16 The directed line segments (vectors u, v, w) are shown. The directed line segments (vectors u, v, w) are shown. X1 X2 (1, 2) (1, -3) (-1, -2) (p.12-13)

18 17 矩陣之基本運算 (p.13) The scalar product ( 純量積 ) is the result of multiplying two vectors where one vector is a column vector and the other is a row vector.  For the scalar product to be defined, the dimensions of both vectors must be the same. The scalar product of u and v is written:

19 18 The Scalar Multiple of a Matrix The Scalar Multiple of a Matrix  Given any matrix A and any number c, the matrix cA is obtained from the matrix A by multiplying each element of A by c. Addition of Two Matrices Addition of Two Matrices  Let A = [a ij ] and B =[b ij ] be two matrixes with the same order. Then the matrix C = A + B is defined to be the m x n matrix whose ijth element is a ij + b ij.  Thus, to obtain the sum of two matrixes A and B, we add the corresponding elements of A and B. (p.14)

20 19 Definition : 矩陣相加

21 20 This rule for matrix addition may be used to add vectors of the same dimension. Vectors may be added using the parallelogram law or by using matrix addition. X1 X2 u v u+v 1 2 3 1 2 3 (1,2) (2,1) (3,3)

22 21 Line segments can be defined using scalar multiplication and the addition of matrices.  If u=(1,2) and v=(2,1), the line segment joining u and v (called uv) is the set of all points in the m- dimensional plane corresponding to the vectors cu +(1-c)v, where 0 ≤ c ≤ 1. X1 X2 u v 1 2 1 2 c=1 c=1/2 c=0

23 22 矩陣加法之性質

24 23 常數乘以矩陣之性質

25 24 Matrix Multiplication ( 矩陣相乘 ) (p.16)  Given to matrices A and B, the matrix product of A and B (written AB) is defined if and only if the number of columns in A = the number of rows in B. The matrix product C = AB of A and B is the m x n matrix C whose ijth element is determined as follows:  ijth element of C = scalar product of row i of A x column j of B

26 25 矩陣相乘

27 26

28 27 矩陣乘法之性質

29 28 Example 1: Matrix Multiplication Computer C = AB for Solution Because A is a 2x3 matrix and B is a 3x2 matrix, AB is defined, and C will be a 2x2 matrix.

30 29 Many computations that commonly occur in operations research can be concisely expressed by using matrix multiplication. Some important properties of matrix multiplications are:  Row i of AB = (row i of A)B  Column j of AB = A(column j of B)

31 30 Trace of a matrix 1 For any two matrices A and B. Trace(A + B) = Trace(A) + Trace(B) For any two matrices A and B for which the product AB and BA are defined. Trace(AB) = Trace(BA)  p.20 #7

32 31 Example : Find Trace(A) & Trace(B)

33 32 LU Decomposition (LU 分解法 )

34 33

35 34 例題:

36 35

37 36 Use the EXCEL MMULT function to multiply the matrices:  Enter matrix A into cells B1:D2 and matrix B into cells B4:C6.  Select the output range (B8:C9) into which the product will be computed.  In the upper left-hand corner (B8) of this selected output range type the formula: = MMULT(B1:D2,B4:C6).  Press Control-Shift-Enter (p.19)


Download ppt "Chapter 2 Basic Linear Algebra ( 基本線性代數 ) to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c)"

Similar presentations


Ads by Google