lecture notes for math 1540xiangshengw/math1540/math1540.pdf2.the m 1 column vector bis also given....

59
6.1 Matrices Definition: A Matrix A is a rectangular array of the form A 11 A 12 ··· A 1n A 21 A 22 ··· A 2n . . . . . . . . . A m1 A m2 ··· A mn The size of A is m × n, where m is the number of rows and n is the number of columns. The entry A ij locates in the ith row and the j th column. Lecture Notes for Math 1540 First Previous Next Last 1

Upload: others

Post on 27-Apr-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.1 Matrices

• Definition: A Matrix A is a rectangular array of the formA11 A12 · · · A1n

A21 A22 · · · A2n... ... ...

Am1 Am2 · · · Amn

• The size of A is m× n, where m is the number of rows and n is the number of

columns.

• The entry Aij locates in the ith row and the jth column.

Lecture Notes for Math 1540 First Previous Next Last 1

Page 2: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.1 Matrices

• Equality of two matrices: A = B if and only if

1. A and B have the same size.2. The corresponding entries are equal: Aij = Bij.

• Transpose of a matrix:

1. If A has the size m× n, then AT has the size n×m.2. The ith row of AT is the ith column of A.3. (AT )T = A.

• Special matrices:

1. zero matrix.2. square matrix: diagonal matrix; upper/lower triangular matrix.

Lecture Notes for Math 1540 First Previous Next Last 2

Page 3: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.2 Matrix Addition and Scalar Multiplication

• Matrix addition: (A+B)ij = Aij +Bij.

1. commutative property: A+B = B +A.2. associative property: A+ (B + C) = (A+B) + C.3. identity property: A+ 0 = 0 +A = A.

• Scalar multiplication: (kA)ij = kAij.

• Some properties:

1. k(A+B) = kA+ kB.2. (k + l)A = kA+ lA.3. k(lA) = (kl)A.4. 0A = 0 and k0 = 0.5. (A+B)T = AT +BT and (kA)T = kAT .

Lecture Notes for Math 1540 First Previous Next Last 3

Page 4: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.3 Matrix Multiplication

• Definition. Let A be an m× n matrix, and B be an n× p matrix. Then

1. AB is an m× p matrix.

2. (AB)ik =n∑j=1

AijBjk = Ai1B1k +Ai2B2k + · · ·+AinBnk.

• The number of columns of A should be equal to the number of rows of B.

• (AB)ik is the product of ith row of A and kth column of B.

• Matrix addition and matrix multiplication.

1. A has size m× n and B has size m× n, then A+B has size m× n.2. A has size m× n and B has size n× p, then AB has size m× p.

Lecture Notes for Math 1540 First Previous Next Last 4

Page 5: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.3 Matrix Multiplication

• Properties:

1. associative: A(BC) = (AB)C.2. distributive: A(B + C) = AB +AC and (A+B)C = AC +BC.3. k(AB) = (kA)B = A(kB).4. (AB)T = BTAT .5. In general, AB 6= BA and (AB)T 6= ATBT . (Matrix multiplication is

non-commutative!)

• If A is a square matrix of order n, I is an identity matrix of order n and 0 is azero matrix of size n× n, then AI = IA = A and A0 = 0A = 0.

• Power of a square matrix: A2 = A×A, A3 = A×A×A, · · ·

Lecture Notes for Math 1540 First Previous Next Last 5

Page 6: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.3 Matrix Multiplication

• System of linear equationsA11X1 +A12X2 + · · ·+A1nXn = B1

A21X1 +A22X2 + · · ·+A2nXn = B2

...

Am1X1 +Am2X2 + · · ·+AmnXn = Bm

• Matrix equation AX = B

1. Coefficient matrix A of size m× n is known.2. The m× 1 column vector B is also given.3. The n× 1 column vector X is the variable to be solved.4. Solution C is a column vector of size n× 1 such that AC = B.

Lecture Notes for Math 1540 First Previous Next Last 6

Page 7: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.4 Solving Systems by Reducing Matrices

• Three elementary row operations:

1. Ri ↔ Rj: interchange rows Ri and Rj.2. kRi: multiply row Ri by a nonzero constant k.3. kRi +Rj: add k times row Ri to row Rj (but leave Ri unchanged).

• Reduced matrix:

1. All zero-rows are at the bottom of the matrix.2. The leading entry in each nonzero-row is 1, and all others entries in the

column of the leading entry is 0.3. The leading entry in each nonzero-row is to the right of the leading entry in

any row above it.

Lecture Notes for Math 1540 First Previous Next Last 7

Page 8: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.5 Solving Systems by Reducing Matrices (continued)

• Homogeneous system: AX = 0, or equivalently,A11X1 +A12X2 + · · ·+A1nXn = 0

A21X1 +A22X2 + · · ·+A2nXn = 0...

Am1X1 +Am2X2 + · · ·+AmnXn = 0

• X = 0 is always a trivial solution.

• To solve a homogeneous system, we only need to reduce the coefficient matrixA, instead of the augmented coefficient matrix [A | 0].

Lecture Notes for Math 1540 First Previous Next Last 8

Page 9: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.5 Solving Systems by Reducing Matrices (continued)

• Homogeneous system: AX = 0, or equivalently,A11X1 +A12X2 + · · ·+A1nXn = 0

A21X1 +A22X2 + · · ·+A2nXn = 0...

Am1X1 +Am2X2 + · · ·+AmnXn = 0

• The number of equations m is equal to the number of rows of A.

• The number of unknowns n is equal to the number of columns of A.

• If A is a reduced matrix with k nonzero-rows, then k ≤ m.

Lecture Notes for Math 1540 First Previous Next Last 9

Page 10: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.5 Solving Systems by Reducing Matrices (continued)

• Theorem. Let A be a reduced coefficient matrix of size m× n for ahomogeneous system AX = 0. (Note that X is an n× 1 column vector and 0is an m× 1 column vector.)

1. If A has exactly k nonzero-rows, then k ≤ n.2. If A has exactly k nonzero-rows and k < n, then the system has infinitely

many solutions.3. If A has exactly k nonzero-rows and k = n, then the system has a unique

solution X = 0 (the trivial solution).

• Corollary. If m < n, (the number of equations is less than the number ofunknowns), then k ≤ m < n, which by the above theorem implies that thehomogeneous system has infinitely many solutions.

Lecture Notes for Math 1540 First Previous Next Last 10

Page 11: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.6 Inverses

• A square matrix A of order n is invertible if there exists a square matrix C oforder n such that CA = AC = I, where I is the identity matrix of order n. Weuse A−1 to denote the inverse of A.

• A should be a square matrix.

• Recall that AI = IA = A for any square matrix A having the same order of I.

• The identity matrix I is invertible and I−1 = I.

• If A is invertible, then A−1 is unique and AA−1 = A−1A = I, namely,multiplication of A and A−1 is commutative. Recall that in general, matrixmultiplication is NOT commutative.

Lecture Notes for Math 1540 First Previous Next Last 11

Page 12: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.6 Inverses

• Find the inverse of

A =

[1 23 7

]• Let C be the inverse of A such that AC = I, where

C =

[x zy w

]

• It follows that [1 23 7

] [x zy w

]=

[x+ 2y z + 2w3x+ 7y 3z + 7w

]=

[1 00 1

]

Lecture Notes for Math 1540 First Previous Next Last 12

Page 13: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.6 Inverses

• We have two linear systems{x+ 2y = 1

3x+ 7y = 0and

{z + 2w = 0

3z + 7w = 1

• Reducing augmented coefficient matrix[1 23 7

10

]−3R1+R2−−−−−−→

[1 20 1

1−3

]−2R2+R1−−−−−−→

[1 00 1

7−3

]⇒

{x = 7

y = −3

[1 23 7

01

]−3R1+R2−−−−−−→

[1 20 1

01

]−2R2+R1−−−−−−→

[1 00 1

−21

]⇒

{z = −2

w = 1

Lecture Notes for Math 1540 First Previous Next Last 13

Page 14: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.6 Inverses

• Reducing augmented coefficient matrix[1 23 7

10

]−3R1+R2−−−−−−→

[1 20 1

1−3

]−2R2+R1−−−−−−→

[1 00 1

7−3

]⇒

{x = 7

y = −3

[1 23 7

01

]−3R1+R2−−−−−−→

[1 20 1

01

]−2R2+R1−−−−−−→

[1 00 1

−21

]⇒

{z = −2

w = 1

• Combining the above two reducing procedures[1 23 7

1 00 1

]−3R1+R2−−−−−−→

[1 20 1

1 0−3 1

]−2R2+R1−−−−−−→

[1 00 1

7 −2−3 1

]

Lecture Notes for Math 1540 First Previous Next Last 14

Page 15: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.6 Inverses

• Find the inverse of

A =

[1 23 7

]• Reducing the matrix [A | I] to [I | C][

1 23 7

1 00 1

]→ · · · →

[1 00 1

7 −2−3 1

]

• The inverse matrix

A−1 = C =

[7 −2−3 1

]

Lecture Notes for Math 1540 First Previous Next Last 15

Page 16: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.6 Inverses

• If A is square and [A | I] can be reduced to the form [I | C], then A isinvertible and A−1 = C.

• If A is square and [A | I] is reduced to [R | C] but R 6= I, then A is notinvertible.

• If A is not square then A is not invertible.

• If the square matrix A is invertible, then the matrix equation AX = B has aunique solution X = A−1B.

• If the coefficient matrix A is square but not invertible, then the homogeneousequation AX = 0 has infinitely many solutions.

Lecture Notes for Math 1540 First Previous Next Last 16

Page 17: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.6 Inverses

Matrix Algebra AlgebraA is a square matrix of order n a is a real numberI is the identity matrix of order n 1 is the real identity

AI = IA = A a · 1 = 1 · a = aI−1 = I 1−1 = 1

If A is invertible, then A−1 is unique If a is invertible, then a−1 is uniqueAA−1 = A−1A = I aa−1 = a−1a = 1

If A 6= 0, A may still not be invertible If a 6= 0, then a is invertibleIn general AB 6= BA ab = ba

Lecture Notes for Math 1540 First Previous Next Last 17

Page 18: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.7 Leontief’s Input-Output Analysis

• Input-output matrix

InputSector 1 Sector 2 External Demand

Output TotalsSector 1

[240 500 460

]1200

Sector 2 360 200 940 1500Other 600 800 -Totals 1200 1500

• Leontief matrix

A =

2401200

5001500

3601200

2001500

Lecture Notes for Math 1540 First Previous Next Last 18

Page 19: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.7 Leontief’s Input-Output Analysis

• Leontief matrix

A =

2401200

5001500

3601200

2001500

• To produce one unit of sector 1, it spends 240

1200 on sector 1, and 3601200 on sector

2.

• To produce one unit of sector 2, it spends 5001500 on sector 1, and 200

1500 on sector2.

Lecture Notes for Math 1540 First Previous Next Last 19

Page 20: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.7 Leontief’s Input-Output Analysis

• Leontief matrix

A =

2401200

5001500

3601200

2001500

• External Demand matrix

D =

[460940

]• Production matrix

X =

[12001500

]

Lecture Notes for Math 1540 First Previous Next Last 20

Page 21: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.7 Leontief’s Input-Output Analysis

• Production=Internal Demand+External Demand:

X = AX +D

1200

1500

=

2401200

5001500

3601200

2001500

1200

1500

+

460

940

• Solving production matrix X from external demand matrix D:

X = AX +D ⇒ X −AX = D ⇒ (I −A)X = D ⇒ X = (I −A)−1D

Lecture Notes for Math 1540 First Previous Next Last 21

Page 22: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.7 Leontief’s Input-Output Analysis

1. Determine the Leontief matrix A.

2. Find the external demand matrix D.

3. Solve the production matrix X by X = (I −A)−1D.

Lecture Notes for Math 1540 First Previous Next Last 22

Page 23: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.7 Leontief’s Input-Output Analysis

A very simple economy consists of two sectors: agriculture and milling. Toproduce one unit of agricultural products requires 1

3 of a unit of agriculturalproducts and 1

4 of a unit of milled products. To produce one unit of milledproducts requires 3

4 of a unit of agricultural products and no units of milledproducts. Determine the production levels needed to satisfy an external demandfor 300 units of agriculture and 500 units of milled products.

Lecture Notes for Math 1540 First Previous Next Last 23

Page 24: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.7 Leontief’s Input-Output Analysis

A very simple economy consists of two sectors: agriculture and milling. Toproduce one unit of agricultural products requires 1

3 of a unit of agriculturalproducts and 1

4 of a unit of milled products. To produce one unit of milledproducts requires 3

4 of a unit of agricultural products and no units of milledproducts. Determine the production levels needed to satisfy an external demandfor 300 units of agriculture and 500 units of milled products.

1. Leontief matrix

A =

13

34

14 0

2. External demand matrix

D =

[300500

]3. Production matrix X = (I −A)−1D

Lecture Notes for Math 1540 First Previous Next Last 24

Page 25: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.7 Leontief’s Input-Output Analysis

Find the inverse of I −A: 23 −3

4

−14 1

1 0

0 1

32R1−−→

1 −98

−14 1

32 0

0 1

14R1+R2−−−−−→

1 −98

0 2332

32 0

38 1

3223R2−−−→

1 −98

0 1

32 0

1223

3223

98R2+R1−−−−−→

1 0

0 1

4823

3623

1223

3223

Production matrix

X = (I −A)−1D =

4823

3623

1223

3223

300

500

=

3240023

1960023

Lecture Notes for Math 1540 First Previous Next Last 25

Page 26: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.7 Leontief’s Input-Output Analysis

Input-output matrix 40 120 40120 90 9040 90 −

Production matrix

X =

[40 + 120 + 40120 + 90 + 90

]=

[200300

]Leontief matrix

A =

40200

120300

120200

90300

=

15

25

35

310

Lecture Notes for Math 1540 First Previous Next Last 26

Page 27: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.7 Leontief’s Input-Output Analysis

Leontief matrix

A =

40200

120300

120200

90300

=

15

25

35

310

Question: determine the corresponding production matrix if the external demandmatrix changes to

D =

64

64

Lecture Notes for Math 1540 First Previous Next Last 27

Page 28: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

6.7 Leontief’s Input-Output Analysis

Find the inverse of I −A: 45 −2

5

−35

710

1 0

0 1

54R1−−→

1 −12

−35

710

54 0

0 1

35R1+R2−−−−−→

1 −12

0 25

54 0

34 1

52R2−−→

1 −12

0 1

54 0

158

52

12R2+R1−−−−−→

1 0

0 1

3516

54

158

52

Production matrix

X = (I −A)−1D =

3516

54

158

52

64

64

=

220

280

Lecture Notes for Math 1540 First Previous Next Last 28

Page 29: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

7.1 Linear Inequalities in Two Variables

• Linear inequality in variables x and y (either a or b is nonzero):ax+ by + c < 0 ax+ by + c ≤ 0 ax+ by + c > 0 ax+ by + c ≥ 0

• The nonvertical line y = mx+ b separates the plane into three distinct parts:

1. the line itself, y = mx+ b2. the region (open half-plane) above the line, y > mx+ b3. the region (open half-plane) below the line, y < mx+ b

• The vertical line x = a separates the plane into three distinct parts:

1. the line itself, x = a2. the region (open half-plane) to the left of the line, x < a3. the region (open half-plane) to the right of the line, x > a

Lecture Notes for Math 1540 First Previous Next Last 29

Page 30: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

7.2 Linear Programming

• If the feasible region is nonempty, closed and bounded, then the objectivefunction has a maximum (minimum) value which is achieved at a corner point.

• If the feasible region is empty, then the objective function has no maximum(minimum).

• Suppose the feasible region is nonempty, closed and unbounded.

1. If there exists an isovalue (isocost) line below the feasible region, then theobjective function has a minimum which is achieved at a corner point.Otherwise, the objective function has no minimum.

2. If there exists an isovalue (isoprofit) line above the feasible region, then theobjective function has a maximum which is achieved at a corner point.Otherwise, the objective function has no maximum.

Lecture Notes for Math 1540 First Previous Next Last 30

Page 31: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

7.3 Multiple Optimum Solutions

If (x1, y1) and (x2, y2) are two corner points at which an objective function isoptimum, then the objective function will also be optimum at all points (x, y),where

x = (1− t)x1 + tx2

y = (1− t)y1 + ty2

with 0 ≤ t ≤ 1. The above two expressions can be also written in terms of matrixform: [

xy

]= (1− t)

[x1y1

]+ t

[x2y2

]

Lecture Notes for Math 1540 First Previous Next Last 31

Page 32: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

7.4 The Simplex Method

Standard Linear Programming Problem:

Maximize the linear function Z = c1x1 + c2x2 + · · ·+ cnxn subject toa11x1 + a12x2 + · · ·+ a1nxn≤b1a21x1 + a22x2 + · · ·+ a2nxn≤b2...

am1x1 + am2x2 + · · ·+ amnxn≤bm

where x1, x2, · · · , xn and b1, b2, · · · , bm are nonnegative.

Lecture Notes for Math 1540 First Previous Next Last 32

Page 33: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

7.4 The Simplex Method

Add slack variables s1, s2, · · · , sm:a11x1 + a12x2 + · · ·+ a1nxn + s1 = b1

a21x1 + a22x2 + · · ·+ a2nxn + s2 = b2...

am1x1 + am2x2 + · · ·+ amnxn + sm = bm

where x1, x2, · · · , xn, s1, s2, · · · , sm, and b1, b2, · · · , bm are nonnegative.

From Z = c1x1 + c2x2 + · · ·+ cnxn we have

−c1x1 − c2x2 − · · · − cnxn + Z = 0

Lecture Notes for Math 1540 First Previous Next Last 33

Page 34: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

7.4 The Simplex Method

• Initial Simplex Table:

x1 x2 · · · xn s1 s2 · · · sm Zs1

a11 a12 · · · a1n 1 0 · · · 0 0a21 a22 · · · a2n 0 1 · · · 0 0

... ... ... ... ... . . . ... ...am1 am2 · · · amn 0 0 · · · 1 0−c1 −c2 · · · −cn 0 0 · · · 0 1

b1b2...bm0

s2...smZ

• Basic feasible solution (BFS):

1. Basic variables: s1 = b1, s2 = b2, · · · , sm = bm.2. Nonbasic variables: x1 = x2 = · · · = xn = 0.3. Objective function: Z = 0.

Lecture Notes for Math 1540 First Previous Next Last 34

Page 35: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

7.4 The Simplex Method

• Each basic feasible solution (BFS) corresponds to a corner point in feasibleregion.

• The simplex method provides an algorithm to search the BFS (corner point)where the objective function achieves its maximum.

• Two principles of simplex method:

1. Eliminate negative indicators (start from the most negative indicator first).2. Keep the last column nonnegative (normalize the row with smallest

quotient).

Lecture Notes for Math 1540 First Previous Next Last 35

Page 36: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

7.5 Degeneracy, Unbounded Solutions, and Multiple Solutions

• Degeneracy occurs when there are two rows have the smallest quotient, orwhen the smallest quotient is zero.

• If there exists no quotient, then the linear programming problem has anunbounded solution.

• If the indicators are all nonnegative and the number of zero indicators is largerthan the number of basic variables, then the linear programming problem hasmultiple solutions.

Lecture Notes for Math 1540 First Previous Next Last 36

Page 37: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

7.6 Artificial Variables & 7.7 Minimization

• We need to add an artificial variable t when the feasible region does notcontain the origin (i.e., 0 is not a solution to the constraints). The objectivefunction becomes W = Z −Mt = c1x1 + c2x2 + · · ·+ cnxn −Mt with Mbeing a large parameter.

1. The case ai1x1 + ai2x2 + · · ·+ ainxn ≥ bi with bi > 0. We add a slackvariable si ≥ 0 and an artificial variable t such thatai1x1 + ai2x2 + · · ·+ ainxn − si + t = bi.

2. The case ai1x1 + ai2x2 + · · ·+ ainxn = bi with bi > 0. Since x1 = 0,x2 = 0, · · · , xn = 0 is not a solution to this constraint, we need to add anartificial variable t such that ai1x1 + ai2x2 + · · ·+ ainxn + t = bi.

• Minimizing the objective function Z = c1x1 + c2x2 + · · ·+ cnxn is the same asmaximizing the objective function −Z = −c1x1 − c2x2 − · · · − cnxn.

Lecture Notes for Math 1540 First Previous Next Last 37

Page 38: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

7.8 The Dual

Maximize MinimizeZ = c1x1 + c2x2 + · · ·+ cnxn W = b1y2 + b2y2 + · · ·+ bmymsubject to subject toa11x1 + a12x2 + · · ·+ a1nxn≤b1a21x1 + a22x2 + · · ·+ a2nxn≤b2...

am1x1 + am2x2 + · · ·+ amnxn≤bm

a11y1 + a21y2 + · · ·+ am1ym≥c1a12y1 + a22y2 + · · ·+ am2ym≥c2...

a1ny1 + a2ny2 + · · ·+ amnym≥cnand andx1, x2, · · · , xn ≥ 0 y1, y2, · · · , ym ≥ 0

Lecture Notes for Math 1540 First Previous Next Last 38

Page 39: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

7.8 The Dual

Maximize Minimize

Z = [c1, c2, · · · , cn]

x1x2...xn

W = [b1, b2, · · · , bm]

y1y2...ym

subject to subject to

a11 a12 · · · a1na21 a22 · · · a2n

... ... ...am1 am2 · · · amn

x1x2...xn

≤b1b2...bm

a11 a21 · · · am1

a12 a22 · · · am2... ... ...a1n a2n · · · amn

y1y2...ym

≥c1c2...cn

x1x2...xn

≥ 0

y1y2...ym

≥ 0

Lecture Notes for Math 1540 First Previous Next Last 39

Page 40: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

7.8 The Dual

Maximize Z = CX Minimize W = BTYsubject to subject to

AX≤B and X ≥ 0 ATY≥CT and Y ≥ 0

where

C = [c1, c2, · · · , cn], X = [x1, x2, · · · , xn]T

Y = [y1, y2, · · · , ym]T , B = [b1, b2, · · · , bm]T

and

A =

a11 a12 · · · a1na21 a22 · · · a2n

... ... ...am1 am2 · · · amn

.Lecture Notes for Math 1540 First Previous Next Last 40

Page 41: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Differentials

• The derivative of a function f is the function denoted f ′ and defined by

f ′(x) = limz→x

f(z)− f(x)

z − x= limh→0

f(x+ h)− f(x)

h

provided that the limit exists.

• Let y = f(x). The differential of y is denoted dy and defined by

dy = f ′(x)dx.

• Chain rule. Let y = f(x) and x = g(t), then

dy

dt=dy

dx

dx

dt= f ′(x)g′(t).

Lecture Notes for Math 1540 First Previous Next Last 41

Page 42: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Integrals

• An antiderivative of a function f(x) is a function F (x) such that F ′(x) = f(x).

• The indefinite integral of f(x) with respect to x is defined by∫f(x)dx = F (x) + C,

where∫

is called the integral sign, f(x) is the integrand, x is the variable ofintegration, and C is the constant of integration.

• Any two antiderivatives of a function differ only by a constant.

Lecture Notes for Math 1540 First Previous Next Last 42

Page 43: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Differentiation and Integration Formulas

Differentiation Integration(1)′ = 0

∫0dx = C

(kx)′ = k∫kdx = kx+ C

(xa+1)′ = (a+ 1)xa, a 6= −1∫xadx = xa+1

a+1 + C, a 6= −1

(ln |x|)′ = 1x, x 6= 0

∫1xdx = ln |x|+ C, x 6= 0

(ex)′ = ex∫exdx = ex + C

(bx)′ = bx(ln b), b > 0∫bxdx = bx

ln b + C, b > 0(kf(x))′ = kf ′(x)

∫kf(x)dx = k

∫f(x)dx

(f(x) + g(x))′ = f ′(x) + g′(x)∫f(x) + g(x)dx =

∫f(x)dx+

∫g(x)dx

Any two antiderivatives of a function differ only by a constant.

Lecture Notes for Math 1540 First Previous Next Last 43

Page 44: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

The Definite Integrals

Let f(x) be continuous on [a, b], then∫ b

a

f(x)dx = limn→∞

n∑k=1

f(a+b− an

k).

The definite integral is the limit of an infinite sum.

Fundamental theorem: Let F (x) be an antiderivative of a continuous functionf(x) on [a, b], then ∫ b

a

f(x)dx = F (x)

∣∣∣∣ba

= F (b)− F (a).

The average of a continuous function f(x) over [a, b] is f̄ = 1b−a

∫ baf(x)dx.

Lecture Notes for Math 1540 First Previous Next Last 44

Page 45: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

The Definite Integrals

1.∫ ba

(f(x) + g(x))dx =∫ baf(x)dx+

∫ bag(x)dx.

2.∫ bakf(x)dx = k

∫ baf(x)dx.

3.∫ baf(x)dx+

∫ cbf(x)dx =

∫ caf(x)dx.

4.∫ baf(x)dx = −

∫ abf(x)dx.

5.∫ baF ′(x)dx = F (x)

∣∣∣∣ba

= F (b)− F (a).

Lecture Notes for Math 1540 First Previous Next Last 45

Page 46: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Areas between Curves

• The area of the region (vertical strip) bounded by the two curves y = f(x) andy = g(x) from x = a to x = b is

∫ b

a

|f(x)− g(x)|dx.

• The area of the region (horizontal strip) bounded by the two curves x = u(y)and x = v(y) from y = c to y = d is

∫ d

c

|u(y)− v(y)|dy.

Lecture Notes for Math 1540 First Previous Next Last 46

Page 47: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Consumers’ and Producers’ Surplus

• Demand function: p = f(q).

• Supply function: p = g(q).

• Equilibrium: p0 = f(q0) = g(q0).

• Consumers’ surplus: CS =∫ q00

(f(q)− p0)dq.

• Producers’ surplus: PS =∫ q00

(p0 − g(q))dq.

Lecture Notes for Math 1540 First Previous Next Last 47

Page 48: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Methods of Integration

• Change of variable (let u = u(x)):

∫f(x)dx =

∫g(u)

dx

dudu and

∫ b

a

f(x)dx =

∫ u(b)

u(a)

g(u)dx

dudu

where g(u) = g(u(x)) = f(x) and dxdu = (dudx)−1 = 1

u′(x).

• Integration by parts:

∫uv′dx = uv −

∫u′vdx and

∫ b

a

uv′dx = uv

∣∣∣∣ba

−∫ b

a

u′vdx.

Lecture Notes for Math 1540 First Previous Next Last 48

Page 49: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Integration of Rational Functions

Step 1: Long division.

Step 2: Factorize denominator.

Step 3: Partial fractions (four cases).

Case 1) distinct linear factors:Pn−1(x)

(x−x1)···(x−xn)= A1

x−x1+ · · ·+ An

x−xn.

Case 2) repeated linear factors:Pn−1(x)(x−a)n = A1

x−a + · · ·+ An(x−a)n.

Case 3) distinct irreducible quadratic factors:P2n−1(x)

(x2+a1x+b1)···(x2+anx+bn)= A1x+B1

x2+a1x+b1+ · · ·+ Anx+Bn

x2+anx+bn.

Case 4) repeated irreducible quadratic factors:P2n−1(x)

(x2+ax+b)n= A1x+B1

x2+ax+b+ · · ·+ Anx+Bn

(x2+ax+b)n.

Lecture Notes for Math 1540 First Previous Next Last 49

Page 50: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Partial Derivatives

• The partial derivative of z = f(x, y) with respect to x is defined by

∂z

∂x=∂f

∂x= ∂xf(x, y) = fx(x, y) = lim

h→0

f(x+ h, y)− f(x, y)

h

provided that the limit exists. We treat y as a constant.

• The partial derivative of z = f(x, y) with respect to y is defined by

∂z

∂y=∂f

∂y= ∂yf(x, y) = fy(x, y) = lim

h→0

f(x, y + h)− f(x, y)

h

provided that the limit exists. We treat x as a constant.

Lecture Notes for Math 1540 First Previous Next Last 50

Page 51: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Competitive and Complementary Products

• Demand functions: qA = f(pA, pB) and qB = g(pA, pB) are given.

• Competitive products (Apple and Blackberry): ∂qA∂pB

> 0 and ∂qB∂pA

> 0.

• Complementary products (cars and gasoline): ∂qA∂pB

< 0 and ∂qB∂pA

< 0.

• Remark: it is always true that ∂qA∂pA

< 0 and ∂qB∂pB

< 0.

Lecture Notes for Math 1540 First Previous Next Last 51

Page 52: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Higher-Order Partial Derivatives

• Let z = f(x, y).

• fxx = (fx)x = ∂xxf = ∂2f∂x2

= ∂∂x

(∂f∂x

).

• fyy = (fy)y = ∂yyf = ∂2f∂y2

= ∂∂y

(∂f∂y

).

• Mixed partial derivative: fxy = fyx = ∂2f∂x∂y = ∂2f

∂y∂x = ∂∂y

(∂f∂x

)= ∂

∂x

(∂f∂y

).

Lecture Notes for Math 1540 First Previous Next Last 52

Page 53: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Chain Rule and Implicit Partial Differentiation

• Let z = f(x, y) with x = x(r, s) and y = y(r, x). Then

∂z

∂r=

∂z

∂x

∂x

∂r+∂z

∂y

∂y

∂r

∂z

∂s=

∂z

∂x

∂x

∂s+∂z

∂y

∂y

∂s

• Let F (x, y, z) = 0. Then∂F

∂x+∂F

∂z

∂z

∂x= 0.

By solving the above equation, we obtain

∂z

∂x= −∂xF

∂zF.

Lecture Notes for Math 1540 First Previous Next Last 53

Page 54: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Relative Extrema for two-variable functions

• The function f(x, y) has a relative maximum at the point (a, b) if

f(x, y) ≤ f(a, b)

for any (x, y) close to (a, b).

• The function f(x, y) has a relative minimum at the point (a, b) if

f(x, y) ≥ f(a, b)

for any (x, y) close to (a, b).

Lecture Notes for Math 1540 First Previous Next Last 54

Page 55: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Relative Extrema for two-variable functions

• The critical points of a function f(x, y) are the solutions to the followingsystem {

fx(x, y) = 0

fy(x, y) = 0

• Second-derivative test for a critical point (a, b): D(x, y) = fxxfyy − f2xy.

1) If D(a, b) > 0 and fxx(a, b) < 0, then f has a relative maximum at (a, b).2) If D(a, b) > 0 and fxx(a, b) > 0, then f has a relative minimum at (a, b).3) If D(a, b) < 0, then f has a saddle point at (a, b).4) If D(a, b) = 0, then NO conclusion.

Lecture Notes for Math 1540 First Previous Next Last 55

Page 56: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Relative Maximum

Case 1: D = fxxfyy − f2xy > 0 and fxx < 0.

Lecture Notes for Math 1540 First Previous Next Last 56

Page 57: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Relative Minimum

Case 2: D = fxxfyy − f2xy > 0 and fxx > 0.

Lecture Notes for Math 1540 First Previous Next Last 57

Page 58: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Saddle

Case 3: D = fxxfyy − f2xy < 0.

Lecture Notes for Math 1540 First Previous Next Last 58

Page 59: Lecture Notes for Math 1540xiangshengw/math1540/math1540.pdf2.The m 1 column vector Bis also given. 3.The n 1 column vector Xis the variable to be solved. 4.Solution Cis a column vector

Lagrange Multipliers

• Find the critical points of w = f(x1, · · · , xn) subject to g(x1, · · · , xn) = 0.

• Introduce a lagrange multiplier λ:F (x1, · · · , xn, λ) = f(x1, · · · , xn)− λg(x1, · · · , xn).

• Find the critical points of F (x1, · · · , xn, λ), namely, solve the system∂F∂x1

(x1, · · · , xn, λ) = ∂f∂x1

(x1, · · · , xn)− λ ∂g∂x1

(x1, · · · , xn) = 0...

∂F∂xn

(x1, · · · , xn, λ) = ∂f∂xn

(x1, · · · , xn)− λ ∂g∂xn

(x1, · · · , xn) = 0

∂F∂λ (x1, · · · , xn, λ) = −g(x1, · · · , xn) = 0

Lecture Notes for Math 1540 First Previous Next Last 59