52
Lecture 3. Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1

Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Lecture 3. Solving Linear SystemsUniversity of British Columbia, Vancouver

Yue-Xian Li

February 5, 2019

1

Page 2: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

3.1 Examples and geometric meaning of solutions

Def: A system of m equations and n unknowns can begenerally expressed as

a11x1 + a12x2 + · · · + a1nxn = b1,a21x1 + a22x2 + · · · + a2nxn = b2, (3.1.1)...am1x1 + am2x2 + · · · + amnxn = bm,

where aij, bi, (1 ≤ i ≤ m, , 1 ≤ j ≤ n) are typicallyknown scalars in R. xj, (1 ≤ j ≤ n) are supposed to bethe unknowns to be solved. Subscripts of the coefficients aijare defined by

i jarow # column #

The unknowns are denoted by x1, x2, · · · , xn but notx, y, z, · · · because when n is large, we run out of let-ters.

2

Page 3: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Eg: Horse and donkey are carrying potato bags for theirmaster. Donkey complains carrying too many and wantsto transfer one bag to horse. Horse tells the truth: “If yougave me one, I would be carrying twice as many as you do.If I gave you one, we would be carrying the same number.”How many bags each are carrying now?

Ans: Let

x1 = # of bags by H;x2 = # of bags by D.

DH 1

H+1=2(D−1)

H−1=D+1

According to the schematic diagram, we obtain a linear sys-tem of 2 equations with 2 unknowns x1, x2

x1 − 2x2 = −3, (1)x1 − x2 = 2. (2)

1xx 1

x 2

1x

(7,5)

1

2

3

4

5

x2

10 2 3 4 5 6 7

2x2

=−3

= 2

Geometry:Each equation=a line in R2.Solution=point of intersection between the two.

3

Page 4: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Three possible outcomes in solving a linear system of 2 equa-tions and 2 unknowns in R2:

(1) If the two lines L1, L2 are not parallel, a unique solu-tion=point of intersection between them;

(2) If they are parallel but not on top of each other, no pointof intersection, i.e. no solution;

(3) If they are on top of each other, then all points on theline are solutions, i.e. infinitely many solutions.

4

Page 5: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

3.2 Solving a system using Gaussian elimination

Eg 3.2.1: Use Gaussian elimination to solve

x1 − 2x2 = −3, (1)

x1 − x2 = 2. (2)

Basic idea behind Gaussian elimination (GE): adding an equal

quantity to two sides of an equation does not disturb the equality of the

two sides.

Given that

lhs1 = rhs1, (1)

lhs2 = rhs2, (2), we know that

(1) αlhsi = αrhsi, (i = 1, 2, α is a scalar);

(2) lhs1 ± lhs2 = rhs1 ± rhs2;

(3) lhs1 ± αlhs2 = rhs1 ± αrhs2, (α is a scalar);

(4) αlhs1 ± βlhs2 = αrhs1 ± βrhs2, (α, β are scalars).

Now, execute GE. Step 1: Eliminate x1 in (2).x1 − 2x2 = −3, (1)

x1 − x2 = 2. (2)

(2)=(2)−(1)−→x1 − 2x2 = −3, (1)

x2 = 5. (2)

Step 2: Back substitute x2 = 5 into (1) to solve x1.

x2=5 into (1)−→ x1 − 2(5) = −3, −→ x1 = 10− 3 = 7.

5

Page 6: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Eg 3.2.2: Use GE to solve

x1 + x2 + x3 = 4, (1)

x1 + 2x2 + 3x3 = 9, (2)

2x1 + 3x2 + x3 = 7, (3)

Ans: Step 1: Eliminate x1 in (2), (3).

(Drop the equation number for simplicity!)

x1 + x2 + x3 = 4,

x1 + 2x2 + 3x3 = 9,

2x1 + 3x2 + x3 = 7,

(2)=(2)−(1)−→(3)=(3)−2(1)

x1 + x2 + x3 = 4,

x2 + 2x3 = 5,

x2 − x3 = −1,

Step 2: Eliminate x2 in (3).

(3)=(3)−(2)−→

x1 + x2 + x3 = 4,

x2 + 2x3 = 5,

−3x3 = −6,

−→ x3 = 2.

Step 2: Back-substitute x3 in (2) and then x2, x3 in (1).

x3=2 in (2)−→

x1 + x2 + x3 = 4,

x2 + 2(2) = 5,

x3 = 2,

−→ x2 = 1.

x3=2 in (1)−→x2=1 in (1)

x1 + (1) + (2) = 4,

x2 = 1,

x3 = 2,

−→ x1 = 1.

6

Page 7: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

How matrix algebra could have been discovered by you?

Imagine that you are hired as a clerk in an equation solving company

and your job is to use GE to solve linear systems 8 hours a day and year

after year!

After probably less than a month, you’ll realize that copying x1, · · · , xnin each step is a complete waste of time! You might as well do the

elimination on just the coefficients of them while keeping the numbers

positioned at exactly where they are supposed to locate. Anybody in-

cluding yourself could have invented the augmented matrix as follows.

7

Page 8: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Eg 3.2.3: Use GE to solve

2x1 + x2 + 3x3 = 1,4x1 + 5x2 + 7x3 = 7,

2x1 − 5x2 + 5x3 = −7.

Ans: Set up the following augmented matrix and do GE. 2 1 3 | 14 5 7 | 72 −5 5 | −7

(2)=(2)−2(1)−→(3)=(3)−(1)

2 1 3 | 10 3 1 | 50 −6 2 | −8

(3)=(3)+2(2)−→

inverse triangle

2 1 3 | 10 3 1 | 50 0 4 | 2

Back−→substitution

x1 = −1x2 = 3

2x3 = 1

2

.

• The above inverse triangular form is also called therow echelon form (REF).

• This example shows Possibility #1, i.e. yielding oneunique solution.

• Geometrically, the 3 planes described by the 3 equationsintersect at one single point.

8

Page 9: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Eg 3.2.4: Use augmented matrix to solve

x1 + x2 + x3 = 1,x1 + 2x2 + 3x3 = 1,

2x1 + 3x2 + 4x3 = 2.

Ans: 1 1 1 | 11 2 3 | 12 3 4 | 2

(2)=(2)−(1)−→(3)=(3)−2(1)

1 1 1 | 10 1 2 | 00 1 2 | 0

(3)=(3)−(2)−→

REF

1 1 1 | 10 1 2 | 00 0 0 | 0

Back−→substitution

x1 = 1 + tx2 = −2tx3 = t

.

Thus, ~x =

x1

x2

x3

=

1 + t−2tt

= t

1−21

+

100

.• The is a line with a direction (1,−2, 1) and a point

(1, 0, 0) on it. Every point on it is a solution!

• This example shows Possibility #2, i.e. yielding in-finitely many solutions

• Geometrically, the 3 planes intersect in one line.

9

Page 10: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Eg 3.2.5: Use augmented matrix to solve

x1 + x2 + x3 = 1,x1 + 2x2 + 2x3 = 2,

2x1 + 3x2 + 3x3 = 4.

Ans: 1 1 1 | 11 2 2 | 22 3 3 | 4

(2)=(2)−(1)−→(3)=(3)−2(1)

1 1 1 | 10 1 1 | 10 1 1 | 2

(3)=(3)−(2)−→

REF

1 1 1 | 10 1 1 | 10 0 0 | 1

0=1!−→Contradiction!

No solution!

• This example shows Possibility #3, i.e. no solution!

• Geometrically, the 3 planes have no common point ofintersection.

10

Page 11: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Some other applications of GE

OEg1: Check if ~a =

123

, ~b =

1−31

, ~c =

2−14

are

LI.

Ans: One can always check if Vppiped =∣∣∣~a · (~b× ~c)∣∣∣ is zero.

Since GE maintains the linear dependency of the columnsof a matrix, one can alway use GE to obtain the REF andcheck if the columns are LI.

Put the 3 vectors into the columns of the following matrix.

1 1 22 −3 −13 1 4

(2)=(2)−2(1)−→(3)=(3)−3(1)

1 1 20 −5 −50 −2 −2

(2)=(2)/(−5)−→(3)=(3)/(−2)

1 1 20 1 10 1 1

(3)=(3)−(2)−→REF

1 1 20 1 10 0 0

.Now, it is obvious that column#1+column#2=column#3or C1 + C2 = C3, which implies that ~c = ~a + ~b which isobvious now after we have found the linear relation in REF.Thus, they are LD and not LI.

11

Page 12: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

OEg2: For the same vectors ~a, ~b, ~c defined in previousexample, find a LC of them such that

α1~a + α2~b + α3~c = ~d =

175

.

Ans: α1

123

+ α2

1−31

+ α3

2−14

=

175

α1 + α2 + 2α3

2α1 − 3α2 − α3

α31 + α2 + 4α3

=

175

α1 + α2 + 2α3 = 1,2α1 − 3α2 − α3 = 7,3α1 + α2 + 4α3 = 5.

Using GE on the augment matrix, one can solve the system.

1 1 2 | 12 −3 −1 | 73 1 4 | 5

(2)=(2)−2(1)−→(3)=(3)−3(1)

1 1 2 | 10 −5 −5 | 50 −2 −2 | 2

(2)=(2)/(−5)−→(3)=(3)/(−2)

1 1 2 | 10 1 1 | −10 1 1 | −1

(3)=(3)−(2)−→REF

1 1 2 | 10 1 1 | −10 0 0 | 0

.

12

Page 13: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Thus,

α1

α2

α3

=

−t + 2−t− 1t

for simplicity−→t=0

2−10

.There are infinitely many solutions. We only need one, sopick the one at t = 0!

13

Page 14: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

OEg3: Given y = f (x) = ax2 + bx + c and that (x, y) =(1, 6), (2, 11), (0, 5) are 3 points on the curve of f (x). Findf (x).

Ans: Substitute the 3 points into the function, one get thefollowing system. a + b + c = 6,

4a + 2b + c = 11,c = 5.

Using GE on the augment matrix, one can solve the system.

1 1 1 | 64 2 1 | 110 0 1 | 5

(2)=(2)−4(1)−→

1 1 1 | 60 −2 −3 | −130 0 1 | 5

(2)=(2)/(−2)−→

REF

1 1 1 | 60 1 3

2 |132

0 0 1 | 5

Back−→substitution

a = 2b = −1c = 5

.Thus, the function is f (x) = 2x2 − x + 5.

14

Page 15: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

OEg4: Given two lines

L1 : ~x =

9 + t11 + 2t12− 2t

, L2 : ~x =

9− s17− 4ss + p

,where s, t are parameters, p is a scalar to be determined.

(a) For p =?, L1 and L2 intersect with each other.

(b) For p =?, L1 and L2 do not intersect.

Ans:

(a) At the point of intersection (if any) 9 + t11 + 2t12− 2t

=

9− s17− 4ss + p

−→ s + t

4s + 2t−s− 2t

=

06

p− 12

Use GE on the augment matrix to solve the system. 1 1 | 0

4 2 | 6−1 −2 | p− 12

(2)=(2)−4(1)−→(3)=(3)+(1)

1 1 | 00 −2 | 60 −1 | p− 12

15

Page 16: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

(2)=(2)/(−2)−→(3)=(3)/(−1)

1 1 | 00 1 | −30 1 | 12− p

(3)=(3−(2)−→REF

1 1 | 00 1 | −30 0 | 15− p

Thus, if p = 15, the two intersect at t∗ = −3, s∗ = 3,and ~x∗ = (6, 5, 18).

(b) For p 6= 15, L1 and L2 can not intersect.

16

Page 17: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

OEg5: (Practice 8) Find the (shortest) distance betweentwo lines:

L1 : ~x = s

111

; L2 : ~x = t

123

+

100

.

L

p2

L

p1

1

2L

3

Ans: Shortest distance is the line, denoted by L3, thatconnects the two and is ⊥ to both! Thus, its direction is

~l3 =

∣∣∣∣∣∣i j k1 1 11 2 3

∣∣∣∣∣∣ =

1−21

.Let’s connect L3 to the point s(1, 1, 1) on L1 with s to bedetermined. Using the point-direction formula, the equationof L3 is

L3 : ~x = r

1−21

+ s

111

, (r is a parameter.)

17

Page 18: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Now, connect L3 to L2 by making the two equations equalto each other

L3 = L2 ⇒ r

1−21

+s

111

= t

123

+

100

.This gives us the linear system to solve for parameters r, s, t

r

1−21

+ s

111

− t 1

23

=

100

.Now, apply GE on the augmented matrix,

[A|~b] =

1 1 −1 | 1−2 1 −2 | 01 1 −3 | 0

(2)=(2)+2(1)−→(3)=(3)−(1)

1 1 −1 | 10 3 −4 | 20 0 −2 | −1

t=1

2−→Back substitution

r = 16

s = 43

t = 12

.Point of intersection on L1 is ~p1 = 4

3(1, 1, 1) and point ofintersection on L2 is ~p2 = 1

2(1, 2, 3) + (1, 0, 0) = (32, 1,

32).

18

Page 19: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Therefore,

d = ||~p2 − ~p1|| = ||(1

6,−2

6,1

6)|| = 1√

6.

Alternatively,

d = ||L3(r =1

6)− L3(r = 0)|| = ||1

6(1,−2, 1)|| = 1√

6.

19

Page 20: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

3.3 Rank and solution structure

Def: Rank of a matrix [A] or an augmented matrix [A|~b] are

denoted by Rank[A] and Rank[A|~b], respectively, is definedas the number of nonzero rows in their respective inversetriangular form or REF.

Eg 3.2.3: Check back this example, one gets

[A|~b] =

2 1 3 | 10 3 1 | 50 0 4 | 2

, Rank[A] = Rank[A|~b] = 3.

Possibility #1: When Rank[A] = Rank[A|~b] = numberof unknowns, there exists a unique solution.

Eg 3.2.4: Check back this example, one gets

[A|~b] =

1 1 1 | 10 1 2 | 00 0 0 | 0

, Rank[A] = Rank[A|~b] = 2 < 3.

Possibility #2: When Rank[A] = Rank[A|~b] < numberof unknowns, there exist infinitely many solutions.

20

Page 21: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Eg 3.2.5: Check back this example, one gets

[A|~b] =

1 1 1 | 10 1 1 | 10 0 0 | 1

, Rank[A] = 2 < Rank[A|~b] = 3.

Possibility #3: When Rank[A] < Rank[A|~b], there is nosolution.

When this happens, there is inconsistency among the 3 equa-tions such that they cannot be satisfied simultaneously.

Conclusion: Rank[A] = Rank[A|~b] guarantees the exis-tence of at least one solution, otherwise there is no solu-tion. In this case, Rank[A|~b] is the number of LI equationsin the system, or the actual number of constraints on thesolution(s), or the “codimension” of the geometric objectdescribed by the system.

21

Page 22: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

3.4 Homogeneous vs Nonhomogeneous

For a linear system of 3 equations and 4 unknowns

(3.4.1)

x1 + 2x2 + x3 + 2x4 = b1,2x1 + 4x2 + 4x3 + 6x4 = b2,3x1 + 6x2 + x3 + 4x4 = b4,

The augmented matrix can be expressed as

(3.4.2) [A|~b] =

1 2 1 2 | b1

2 4 4 6 | b2

3 6 1 4 | b3

, whereA =

1 2 1 22 4 4 63 6 1 4

3×4

is the coefficient matrix, ~b =

b1

b2

b3

3×1

is a vector constant.

In the linear system described by (3.4.1) or (3.4.2), if ~b = ~0,then the system is homogeneous. Otherwise, it is nonho-mogeneous.

• In a homogeneous system, all terms are scalar multiplesof one of the unknowns. No pure scalar terms can exist.

• For a homogeneous system, [A|~b] = [A|~0] which guaran-

tees Rank[A] = Rank[A|~b]. Thus, there is at least onesolution, i.e. ~x = ~0, for any homogeneous system.

22

Page 23: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Generally speaking, if [A] is the coefficient matrix of any lin-

ear system and [A|~b] is the corresponding augmented matrix,then

Def: The system is homogeneous if ~b = ~0; it is nonhomo-geneous if ~b 6= ~0.

Theorem: For a homogenenous system

• Rank[A] = Rank[A|~b] = Rank[A|~0] is guaranteed.

• ~x = ~0 is always a solution.

• If Rank[A] = Rank[A|~0] = number of unknowns, ~x = ~0is the unique solution.

• If Rank[A] = Rank[A|~0] < number of unknowns, thereare infinitely many solutions.

For a nonhomogenenous system

• Rank[A] = Rank[A|~b] = number of unknowns, there isone unique solution.

• If Rank[A] = Rank[A|~b] < number of unknowns, thereare infinitely many solutions.

• If Rank[A] < Rank[A|~b], there is no solution.

23

Page 24: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Eg 3.4.1: Solve the homogeneous system

2x1 + 3x2 + 4x3 = 0,2x1 + x2 − x3 = 0,

6x1 + 5x2 + 2x3 = 0.

Ans:

[A|~0] =

2 3 4 | 02 1 −1 | 06 5 2 | 0

(2)=(2)−(1)−→(3)=(3)−3(1)

2 3 4 | 00 −2 −5 | 00 −4 −10 | 0

(3)=(3)−2(2)−→

REF

2 3 4 | 00 −2 −5 | 00 0 0 | 0

x3=t−→Back substitution

t

74−5

21

.Since Rank[A] = Rank[A|~0] = 2 < 3 = number of un-knowns, there are infinitely many solution which forms aline that passes through the origin.

24

Page 25: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Eg 3.4.2: Find one parametric expression of the line L

defined by

x− 2y + 3z = 6,2x− y + 3z = 3.

Ans: Knowing the normals of the two planes ~n1 = (1,−2, 3),~n2 = (2,−1, 3), one can always find the direction of L by~l = ~n1 × ~n2. Then, use the point-direction formula to findthe parametric form.

Note that L is the solution of the system. GE on the aug-ment matrix is the best and easiest way of doing this.

[A|~b] =

[1 −2 3 | 62 −1 3 | 3

](2)=(2)−2(1)−→

[1 −2 3 | 60 3 −3 | −9

]

(2)=(2)/3−→REF

[1 −2 3 | 60 1 −1 | −3

]z=t−→

Back substitution

−tt− 3t

.Thus,

~x = t

−111

+

0−30

is the parametric form.

Thus, Rank[A] = Rank[A|~b] = 2 < 3 = number of un-knowns. Thus, the number of parameters =3-2=1.

25

Page 26: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Eg 3.4.3: This is Eg 2.8.7 revisited! Express the planedefined by x + 2y + 3z = 6 in parametric form.

Ans: In Eg 2.8.7, we found 3 points on the plane, usedthem to find two directions on the plane ~l1 and ~l2. We thenused the parametric formula to get the result.

Notice that finding the parametric expression is equivalentto solving this system of equation. In this case,

[A|~b] = [1 2 3 | 6].

Thus, Rank[A] = Rank[A|~b] = 1 < 3 = number of un-knowns. The number of parameters=3-1=2.

Let z = t, y = s, then x = 6− 2s− 3t. Therefore,

~x =

6− 2s− 3tst

=

600

+ s

−210

+ t

−301

is one parametric expression of the plane. There are in-finitely many equivalent such expressions.

26

Page 27: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Conclusion:

Finding the parametric formula of a geometric object isequivalent to solving the corresponding system of equations.The number of parameters required is equal to the dimen-sion of the object which is equal to

# of unknowns - Rank[A|~b].

Therefore,

Rank[A] = Rank[A|~b] ⇔ at least 1 solution exists.

Rank[A] = Rank[A|~b] = # of LI eqns in a linear system.

Rank[A] = Rank[A|~b] = codimension of the solution.

27

Page 28: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Reduced row echelon form (RREF)

Def: RREF is the simplest possible REF in which the lead-ing nonzero number in each nonzero row is 1 (a.k.a. the pivotor leading 1), other entries in the same column must all be 0.Zeroed out rows must be placed at the bottom of the matrix.

Eg 3.4.4: [A|~b] =

1 ∗ ∗ 0 ∗ 0 0 | ∗0 0 0 1 ∗ 0 0 | ∗0 0 0 0 0 1 0 | ∗0 0 0 0 0 0 1 | ∗0 0 0 0 0 0 0 | 0

is in RREF,

where ∗ stands for any scalar.

What to learn by inspecting the RREF of a linear system?

• Number of columns in [A] = number of unknowns (=7).

• Rank[A] = Rank[A|~b] = number of LI equations (=4).

• Number of columns in [A] not containing a pivot (leading1) = number of parameters in solution (=3).

• In the example above, x5 = t, x3 = s, x2 = r.

28

Page 29: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Eg 3.4.5: Eg 3.4.1 revisited! In that example,

[A|~0] =

2 3 4 | 02 1 −1 | 06 5 2 | 0

(2)=(2)−(1)−→(3)=(3)−3(1)

2 3 4 | 00 −2 −5 | 00 −4 −10 | 0

(3)=(3)−2(2)−→

REF

2 3 4 | 00 −2 −5 | 00 0 0 | 0

.It is obvious that this REF is not RREF since the leadingnumbers in each nonzero row are not 1 and not all entriesin the same column as the leading number in the 2nd roware 0! Let’s now reduce it to RREF! 2 3 4 | 0

0 −2 −5 | 00 0 0 | 0

(1)=(1)/2−→(2)=(2)/(−2)

1 32 2 | 0

0 1 52 | 0

0 0 0 | 0

(1)=(1)−3

2(2)−→RREF

1 0 −74 | 0

0 1 52 | 0

0 0 0 | 0

which is now in RREF!

29

Page 30: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Conclusions:

• To turn REF into RREF: (i) make each pivot equal to1; (ii) turn all entries above a pivot to 0.

• RREF makes it easier to find linear relation(s) betweenthe columns of a matrix, in example above,

C3 = −7

4C1 +

5

2C2.

• RREF makes back substitution easier, in example above,

x3 = t, x2 = −5

2t, x1 =

7

4t.

30

Page 31: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Eg 3.4.6: Given that

~a =

226

, ~b =

315

, ~c =

4−12

, and ~v =

6210

.

(a) Show with two different methods ~a, ~b, ~c are LD.

(b) Find one set of scalars x1, x2, x3 such that ~v is a LC

of ~a, ~b, ~c, i.e.

x1~a + x2~b + x3~c = ~v (∗).

(c) Find all possible choices of x1, x2, x3 that satisfy eq.(*).

Ans:

(a) Method 1:∣∣∣∣∣∣2 2 63 1 54 −1 2

∣∣∣∣∣∣ = 4−18+40−24−(−10)−12 = 0 ⇒ LD.

Method 2: Show that

x1~a+x2~b+x3~c = x1

226

+x2

315

+x3

4−12

= ~0, (∗∗).

cab be satisfied with x1, x2, x3 that are not all zeros.This homogeneous system can be solve by GE of its aug-mented matrix.

31

Page 32: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

[A|~0] =

2 3 4 | 02 1 −1 | 06 5 2 | 0

(2)=(2)−(1)−→(3)−3(1)

2 3 4 | 00 −2 −5 | 00 −4 −10 | 0

(1)=(1)/2−→

(3)=(3)−2(2)

1 32 2 | 0

0 −2 −5 | 00 0 0 | 0

(2)=(2)/(−2)−→REF

1 32 2 | 0

0 1 52 | 0

0 0 0 | 0

(1)=(1)−3

2(2)−→RREF

1 0 −74 | 0

0 1 52 | 0

0 0 0 | 0

x3=t−→Back substitute

74t−5

2tt

Thus, the solution to the homogeneous system is

~xh =

x1

x2

x3

= t

74−5

21

= t

7−10

4

,where the subscript h represents the solution of the ho-mogeneous system (**). Therefore, there exist infinitely

many choices of nonzero ~xh such that x1~a+x2~b+x3~c = ~0.

(b) In this case, one obviously answer can be found by notic-

ing that ~v = 2~b. Thus,

~xp =

x1

x2

x3

=

020

32

Page 33: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

is an obvious choice. Where the subscript p representsone particular solution to the nonhomogeneous system(*).

(c) To find all possible choices of x1, x2, x3 that satisfyeq.(*), one need to use GE to solve the correspondingaugmented matrix.

[A|~b] =

2 3 4 | 62 1 −1 | 26 5 2 | 5

(2)=(2)−(1)−→(3)−3(1)

2 3 4 | 60 −2 −5 | −40 −4 −10 | −8

(1)=(1)/2−→

(3)=(3)−2(2)

1 32 2 | 3

0 −2 −5 | −40 0 0 | 0

(2)=(2)/(−2)−→REF

1 32 2 | 3

0 1 52 | 2

0 0 0 | 0

(1)=(1)−3

2(2)−→RREF

1 0 −74 | 0

0 1 52 | 2

0 0 0 | 0

x3=t−→Back substitute

74t

2− 52t

t

Thus,

~x =

x1

x2

x3

=

74t

2− 52t

t

= t

74−5

21

+

020

= ~xh+~xp.

33

Page 34: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

The fact that the general solution to the nonhomogeneoussystem (*) is equal to the sum of ~xh (the solution to thecorresponding homogeneous system) and ~xp (one particularsolution to the nonhomogeneous system) is NOT a coinci-dent. It is a general rule.

Theorem: The solution to any linear, nonhomogeneoussystem represented by the augmented matrix [A|~b] can al-ways be expressed as

~x = ~xh + ~xp,

where ~xh is the solution to the corresponding homogeneoussystem represented by [A|~0] and ~xp is one particular solutionto the nonhomogeneous system.

• This result can be generalized to any linear equation (beit algebraic, differential, integral, integro-differential) orsystems of linear equations.

34

Page 35: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

3.5 Application to resistor networks

3.5.1 Elements in electronic circuits.

(1) Resistor and Ohm’s Law.

Resistor: an element that impedes the flow of electric-ity causing a voltage drop following Ohm’s Law.

Ohm’s Law: V = IR or voltage drop across a resisteris proportional to the resistance given a constant currentflow.

I

V

R

• Resistance (R) is measured in units of Ω (Ohm).

• Electric charge (Q) is measured in units ofC (Coulomb).

• Electric current (I) is measured in units of A (Am-pere), 1A = 1 Coulomb per second.

• Voltage (V ) is measured in units of V (Volt).

35

Page 36: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

(2) Voltage source (e.g. a battery): a unit that provides astable voltage drop between its two electrodes.

+

5V

Voltage source Current source

3A

(3) Current course: a unit that provides a stable source ofcurrent.

∗(4) Other electronic elements (not considered in resistor net-works)

Unit: H (Henry)

Diode

(Semiconductor) (Semiconductor)

L

Inductor

C

Capacitor

Unit: F (Farad)

Transistor

36

Page 37: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

3.5.2 Basic problem: given the diagram of a resistornetwork, solve the current flowing through each element andthe voltage drop across it.

(1) Sequential circuit: a circuit in which all resistors are con-nected sequentially.

Owing to the conservation of current, current flowingthrough each resistor remains the same in a sequentialcircuit. In such a network, there is only one unknown,the current i.

=1Ω

+

(C1)12V

Ω=3

=4

Ω2

1

L1

R3

i

R

R+

Ω=

2

=4

ΩΩ=3

Ω=1

12V

(C2)−

R1

R4

L1L2

L3i1

R3

R2

i2

i3

(2) Parallel circuit: a circuit in which resistors are connectedin parallel, e.g. R2, R3 are parallel but are sequentialwrt R1, R4. Parallel resistors share identical voltagedrop.

(3) Circuit loop in a closed resistor circuit is defined as aclosed passage. In (C1), there is only 1 loop with 1 un-known current i. In (C2), however, one could find 3 dif-

37

Page 38: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

ferent loops and 3 distinct unknown currents, i1, i2, i3.However, only 2 out of the 3 are independent.

Independent loop: a loop is independent if at leastone of its edges is never shared with another existingloop.

+

Ω=

2

=4

Ω

Ω=3

Ω=1

12V

(C2)−

R1

R4

L1L2

L3i1

R3

R2

i2

i3

Eg: In (C2), L1 and L2 are independent because theedge where R2 is located is not shared between the two.If we take L1 and L2 as existing loops, then L3 cannotbe independent because every one of its edges is sharedeither with L1 or L2.

Therefore, only two out of the three currents i1, i2, i3are independent. In fact, i3 = i1− i2. Thus, if i1, i2 aresolved, i3 will be known as a result.

Conclusion: The number of independent loops in aclosed resistor circuit is equal to the number of unknownsin the system. It is also the number of LI equations thatone can write down for the circuit.

38

Page 39: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

3.5.3 Solving a resistor network

Eg 3.5.1 Given the circuit, find i1, i2, i3.

+

−12V

4Ω2Ω

node1

node2

2

i1

i2

i3

1LL

Ans: The classical solution is based on two physical laws.

Kirchhoff’s 1st/current law: At each node, the totalcurrent is conserved. Or the sum of all currents flowing inis equal to the sum of all currents flowing out.

At node 1: i1 − i2 − i3 = 0 ⇒ i3 = i1 − i2.

At node 2: i2 + i3 − i1 = 0 ⇒ i3 = i1 − i2.

Kirchhoff’s 2nd/voltage law: In each closed loop, thetotal voltage drop is zero.

In loop 1: 1i1 + 2i3 + 3i1 − 12 = 0i3=i1−i2−→ 6i1 − 2i2 = 12.

In loop 2: 4i2 − 2i3 = 0i3=i1−i2−→ −2i1 + 62i2 = 0.

6i1 − 2i2 = 12,−2i1 + 62i2 = 0.

39

Page 40: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Now, one uses GE on the augmented matrix to solve it.

[A|~b] =

[6 −2 | 12−2 6 | 0

](1)=(1)/6−→(2)=(2)/2

[1 −1

3 | 2−1 3 | 0

](2)=(2)+(1)−→

REF

[1 −1

3 | 20 8

3 | 2

]Back−→

substitution

[i1 = 9

4i2 = 3

4

].

• Now, i3 = i1 − i2 = 64.

• Voltage across each resistor can be calculated based onOhm’s law. E.g. the voltage drop between node 1 andnode 2 is equal to 2i3 = 4i2 = 12

4 = 3 V .

• Therefore, with two independent loops, we simply needto solve a system of two equations. (Actually, there ex-ist only two LI equations in this circuit.) Every otherunknown can be calculated once the two independentunknowns are solved.

40

Page 41: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

A simplified approach: The Loop Only Method.The classical solution described above can be further sim-plified by just writing down voltage drop equations in eachloop without having to use Kirchhoff’s 1st law on the nodes.Let’s demonstrate it using an example.

Eg 3.5.2 Solve the following resistor network with a cur-rent source and two voltage sources.

12V12V

1A

+−

+

+

− i3 i1−

E

i1

i2 i3

L2L3

N1

N2

L1

N3

i2−i3

i1i2

Current source: A source that provides a stable currentflow in the edge of the circuit where the source is located.However, the voltage drop across a current source, E, is nowan unknown as well as its direction.

Thus, in the circuit above, i1 = 1 A but E is unknown.Every quantity marked with blue colour is unknown.

41

Page 42: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

12V12V

1A

+−

+

+

− i3 i1−

E

i1

i2 i3

L2L3

N1

N2

L1

N3

i2−i3

i1i2

Step 1: Identify and label the independent loops. Pre-select a designated direction of current flow in each loop,typically in clockwise direction. If the current turn out tobe negative, then the actual direction should be opposite tothe marked blue arrow.

Step 2: Label the unknown current in each independentedge of each loop with the number of that loop, e.g. in loop3, that current would be i3.

Step 3: Label the current in each shared edge betweentwo loops as follows: pre-select a direction of that current.Then, contribution from the loop in the same direction is“positive”, the one that is opposite to it would be “nega-tive”.

For example, the edge between loop 1 and loop 2, the cur-rent is i2 − i1. This approach guarantees that Kirchhoff’s

42

Page 43: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

1st law is preserved at each node.

Now, we can write down the loop equations.

12V12V

1A

+−

+

+

− i3 i1−

E

i1

i2 i3

L2L3

N1

N2

L1

N3

i2−i3

i1i2

L1: 2−6(i3−1)−4(i2−1)−E = 0 −→ 4i2+6i3+E = 12.L2: 4(i2− 1) + 2(i2− i3) + 12 = 0 −→ 6i2− 2i3 = −8.L3: −2(i2−i3)+6(i3−1)−12 = 0 −→ 2i2−8i3 = −18.

4i2 + 6i3 + E = 12,6i2 − 2i3 = −8,

2i2 − 8i3 = −18.⇒ [A|~b] =

4 6 1 | 126 −2 0 | −82 −8 0 | −18

(3)=(3)/2−→(1)↔(3)

1 −4 0 | −96 −2 0 | −84 6 1 | 12

(2)=(2)−6(1)−→(3)=(3)−4(1)

1 −4 0 | −90 22 0 | 460 22 1 | 48

(3)=(3)−(2)−→

REF

1 −4 0 | −90 22 0 | 460 0 1 | 2

Back−→substitution

i2 = − 711

i3 = 2311

E = 2

.43

Page 44: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Eg 3.5.3: Solve the resistor network.

+

1A

1A9V 3Ω3Ω

1A

1Ω 5Ω

E

+

L1

2i

1i

L

1

i

1

i

i

2i1

2i

+12i

32 L

Ans:

L1: i1 + 3(i1 − i2) + 5i1 − 9 = 0 −→ 9i1 − 3i2 = 9.

L2: 3(i2 + 1)− 3(i1 − i2) = 0 −→ 3i1 − 6i2 = 3.

L3: 5 + 3(i2 + 1) + E = 0 −→ 3i2 + E = −8.

9i1 − 3i2 = 9,3i1 − 6i2 = 3,

3i2 + E = −8.⇒ [A|~b] =

9 −3 0 | 93 −6 0 | 30 3 1 | −8

(1)=(1)/3−→(2)=(2)/3

3 −1 0 | 31 −2 0 | 10 3 1 | −8

(1)↔(2)−→

1 −2 0 | 13 −1 0 | 30 3 1 | −8

44

Page 45: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

(2)=(2)−3(1)−→(2)=(2)/5

1 −2 0 | 10 1 0 | 00 3 1 | −8

(3)=(3)−3(2)−→REF

1 −2 0 | 10 1 0 | 00 0 1 | −8

Back−→

substitution

i1 = 1i2 = 0E = −8

.

Eg 3.5.4: Solve the resistor network.

+ −

2Ω 1Ω

+

+

−12V

12V

2A1Ω

2Ω 4Ω

2A

L

L1L2

3

1i

2+3i−3i 1i

3i

+i1 2E

Ans:

L1: i1 + (i1 + 2)− 2(i3− i1)− 12 = 0 → 4i1− 2i3 = 10.

L2: (i1+2)+4(i3+2)−E = 0 → i1+4i3−E = −10.

L3: 2(i3−i1)+4(i3+2)+4i3−12 = 0 → −2i1+10i3 = 4.

45

Page 46: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

4i1 − 2i3 = 10,i1 + 4i3 − E = −10,

−2i1 + 10i3 = 4.⇒ [A|~b] =

4 −2 0 | 101 4 −1 | −10−2 10 0 | 4

(1)=(1)/2−→

(3)=(3)/(−2)

2 −1 0 | 51 4 −1 | −101 −5 0 | −2

(1)→(2)→(3)−→(3)→(1)

1 −5 0 | −22 −1 0 | 51 4 −1 | −10

(2)=(2)−2(1)−→(3)=(3)−(1)

1 −5 0 | −20 9 0 | 90 9 −1 | −8

(3)=(3)−(2)−→(2)=(2)/9

1 −5 0 | −20 1 0 | 10 0 −1 | −17

Back−→

substitution

i1 = 3i3 = 1E = 17

.

46

Page 47: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

3.6 Other applications of linear system

Applications of linear system cover a wide variety of areas in-cluding science, engineering, computer, software, sociology,economics, art, . . .

Eg 3.6.1: Find the appropriate integers x1, x2, x3, x4that balance the following chemical reaction.

x1C6H12O6 + x2O2 ⇒ x3CO2 + x4H2O + energy.

Let’s balance each element between the two sides.

C: 6x1 = x3 → 6x1 − x3 = 0;

H : 12x1 = 2x4 → 12x1 − 2x4 = 0;

O: 6x1 +2x2 = 2x3 +x4 → 6x1 +2x2−2x3−x4 = 0.

6x1 − x3 = 0,12x1 − 2x4 = 0,

6x1 + 2x2 − 2x3 − x4 = 0.⇒ [A] =

6 0 −1 012 0 0 −26 2 −2 −1

(2)=(2)−2(1)−→(3)=(3)−(1)

6 0 −1 00 0 2 −20 2 −1 −1

(2)=(2)/2−→(2)↔(3)

6 0 −1 00 2 −1 −10 0 1 −1

47

Page 48: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

x4=t, Back−→substitution

x1 = t

6x2 = tx3 = tx4 = t

⇒ ~x =

x1

x2

x3

x4

= t

16111

.Let t = 6, then x1 = 1, x2 = x3 = x4 = 6. Thus, thebalanced chemical reaction yields

C6H12O6 + 6O2 ⇒ 6CO2 + 6H2O + energy.

48

Page 49: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Eg 3.6.2: Traffic at four nodes of a city block are measuredyielding the numbers given in the graph. All streets allowonly one-way traffic as indicated. Determine the traffic flowsx1, x2, x3, x4 in the four streets involved.

X1

X2

X3

X4

A B

CD

450

350 350

250

Ans:

Table 1: Traffic flow at each node.

Node Fin Fout Equation: Fin=Fout

A 450 x1 + x4 x1 + x4 = 450B x1 + 250 x2 −x1 + x2 = 250C x2 x3 + 350 x2 − x3 = 350D x3 + x4 350 x3 + x4 = 350

x1 + x4 = 450,−x1 + x2 = 250,

x2 + x3 = 350,x3 + x4 = 350.

1 0 0 1 | 450−1 1 0 0 | 2500 1 −1 0 | 3500 0 1 1 | 350

49

Page 50: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

(2)=(2)+(1)−→(3)=(3)−(2)′

1 0 0 1 | + 4500 1 0 1 | + 7000 0 −1 −1 | − 3500 0 1 1 | + 350

(2)=−(2)−→(3)−(2)′

1 0 0 1 | 4500 1 0 1 | 7000 0 1 1 | 3500 0 0 0 | 0

x4=t, Back−→substitution

x1 = 450− tx2 = 700− tx3 = 350− tx4 = t

⇒ ~x(t) = t

−1−1−11

+

4507003500

.It is obvious that 0 ≤ t ≤ 350. Therefore,

~x(0) =

4507003500

≥ ~x(t) ≥ ~x(350) =

1003500

350

.

50

Page 51: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Eg 3.6.3: Economy of coal, electricity, steel industries. LetPc, Pe, Ps be prices (in $) of total annual OUTPUT of thecoal, electricity, steel sectors respectively. At equilibrium,

Output = Expanses, for each sector.

The percentage of the output of each sector purchased byother sectors are summarized as follows. Find the relativeoutput of each sector.

Table 2: Purchase ratios of different sectors.

Output fromPurchased by Coal Electricity Steel

Coal 0 0.4 0.6Electricity 0.6 0.1 0.2

Steel 0.4 0.5 0.2

Pc = 0Pc + 0.4Pe + 0.6Ps,Pe = 0.6Pc + 0.1Pe + 0.2Ps,Pe = 0.4Pc + 0.5Pe + 0.2Ps,

Pc − 0.4Pe − 0.6Ps = 0,−0.6Pc + 0.9Pe − 0.2Ps = 0,−0.4Pc − 0.5Pe + 0.8Ps = 0.

1 −0.4 −0.6−0.6 0.9 −0.2−0.4 −0.5 0.8

(2)=(2)+0.6(1)−→(3)=(1)+(2)+(3)

1 −0.4 −0.60 0.66 −0.560 0 0

(2)=(2)/0.66−→

1 −0.4 −0.60 1 −28

330 0 0

(1)=(1)+0.4(2)−→

1 0 −3133

0 1 −2833

0 0 0

51

Page 52: Lecture 3. Solving Linear Systemsyxli/m152_L3_2019.pdf · Solving Linear Systems University of British Columbia, Vancouver Yue-Xian Li February 5, 2019 1. 3.1 Examples and geometric

Ps=t, Back−→substitution

Pc = 3133t

Pe = 2833t

Ps = t

⇒ PcPePs

= t

313328331

≈ t

0.940.85

1

.

52