9/27/2018 Module 2
https://onlinecampus.bu.edu/bbcswebdav/pid-6253499-dt-content-rid-23201016_1/courses/18fallmetad510_d1/course/module2/allpages.htm 1/47
Module 2
This is a single, concatenated file, suitable for printing or saving as a PDF for offline viewing. Please
note that some animations or images may not work.
Module 2 Study Guide and Deliverables
Topics and
Readings
Lecture 3 (Sept 20): Systems of Linear Equations and Matrices
Module 2 Lecture 3 lecture notes
Textbook, Chapter 6
Lecture 4 (Sept 27): Linear Programming and Its Applications
Module 2 Lecture 4 lecture notes
Textbook, Chapter 7 (skip 7.4, 7.6, and 7.7)
Discussions: Module 2 Discussion postings due Oct 3 at 11:59 PM ET
Assignments: Complete the Individual Exercise problems at the end of each Lecture, as well as
selected problems from the textbook.
Midterm Midterm 1 (Oct 4) Covering topics from Lectures 1 through 4
Lecture 3 – Systems of Linear Equations and Matrices
Learning Objectives
After successfully completing the module, students will be able to:
1. Solve systems of linear equations
2. Apply augmented matrices and the Gauss Jordan Method
3. Calculate Matrix operations and Inverses
4. Calculate production matrices from demand and input-output matrices
Systems of Linear Equations
A system of linear equations is simply a group of linear equations on some number of variables, typically denoted . By linear we mean
that the only operations permitted in the system are addition, subtraction, and multiplication by constants. For example,
qualifies as a system of linear equations. On the other hand, none of the following equations would be found in a system of linear equations:
x, y, z
4x + y = z
y = 3x
x + y + z = 12
9/27/2018 Module 2
https://onlinecampus.bu.edu/bbcswebdav/pid-6253499-dt-content-rid-23201016_1/courses/18fallmetad510_d1/course/module2/allpages.htm 2/47
Given a system of two linear equations in two variables, the most common ways of solving it are via substitution and elimination.
Substitution
Suppose you’re given
To solve this via the substitution method, isolate one variable, then substitute the new equation from the isolated variable into the other
equation, as follows:
Plugging this into the first equation, we get
We can now solve for . Simplifying:
We can then plug 4.5 in for in either original equation to get
Elimination
The elimination method involves multiplying both sides of an equation by a constant, then adding the resulting equations to cancel a variable.
For example, given the following system of equations:
We could first multiply the bottom equation through by -3 (this would help us to eliminate x from the system), resulting in:
Summing the two equations yields:
Which gives us . Substituting 5 for in either of the original equations returns .
4xy = z
y = + 12x2
y = ex
3x − 4y = 15
2x + 5 = 6y
2x + 5 = 6y ⟹ x = 6y − 5
2
3 × − 4y = 15 6y − 5
2
y
9y − 7.5 − 4y = 15 ⟹ 5y = 22.5 ⟹ y = 4.5
y
2x + 5 = 6 × 4.5 ⟹ x = (27 − 5)/2 ⟹ x = 11
3x + 4y = 26
x − 7y = −33
3x + 4y = 26
−3x + 21y = 99
0x + 25y = 125
y = 5 y x = 2
9/27/2018 Module 2
https://onlinecampus.bu.edu/bbcswebdav/pid-6253499-dt-content-rid-23201016_1/courses/18fallmetad510_d1/course/module2/allpages.htm 3/47
Uniqueness, Dependency, and Consistency
If, like the previous two examples, substitution and elimination, a system has a unique solution it is said to be independent.
Systems of equations don’t always have unique answers. Take the following system of equations:
Dividing the bottom equation through by 3 and bringing over to the other side yields:
You can see that any value of can result in an answer. For example, ( , ) and ( , ) both work. Such a system is
called dependent.
A system is said to be inconsistent if there is no solution that satisfies all of its equations.
Take the following system of linear equations as an example:
Dividing the bottom equation by 4, we get:
This means that has to equal both 40 and 25: an impossibility.
Figure 1 shows, from left to right, graphs of dependent, inconsistent and independent systems of 2 equations.
Figure 1: Dependent, Inconsistent and Independent Systems of 2 Equations
Larger Systems of Linear Equations
x − 3y = 10
3x − 30 = 9y
y
x − 3y = 10
x − 3y = 10
x x = 16 y = 2 x = 10 y = 0
5x + 6y = 40
20x + 24y = 100
5x + 6y = 25.
5x + 6y
9/27/2018 Module 2
https://onlinecampus.bu.edu/bbcswebdav/pid-6253499-dt-content-rid-23201016_1/courses/18fallmetad510_d1/course/module2/allpages.htm 4/47
Elementary Operations
A system of linear equations can contain more than two equations. To solve such an equation, we rely on the elementary operations. These
operations, used correctly, make a system easier to solve without changing the solution. If two linear equations have the same solution, they’re
called equivalent.
The elementary operations are:
1. Change the order of equations
Eq. A
Eq. B
Eq. C
Eq. A’ = B
Eq. B’ = A
Eq. C’ = C
2. Multiply an equation by a nonzero constant
Eq. A
Eq. B
Eq. C
Eq. A’ = A
Eq. B’ = B
Eq. C’ = 2C
3. Replace an equation with the sum of itself and a constant nonzero multiple of another equation from the system
Eq. A
Eq. B
Eq. C
Eq. A’ = A
Eq. B’ = B + 2C
Eq. C’ = C
The following process allows us to use the elementary operations to solve a larger system:
First, set the leading coefficient of the first equation to one using either operation 1 or 2.
Then, eliminate the leading variable of the first equation from subsequent equations using operation 3.
The second equation will have a different leading variable now from equation 1. Repeat the prior steps on the second equation. Do this again
for the third equation, and so on. The last equation will only contain one variable. You can then go backwards through the equations and solve
for each of them.
Example Solve the following system of equations:
First we switch the order so the leading coefficient of the first equation is 1:
Next, we multiply the first equation by 3 and subtract it from the second:
Then we multiply the first equation by 3 and subtract it from the third equation:
Then we multiply the first equation by 4 and subtract it from the last equation:
3x + 2y + z = 10
5x − 2y + 3z = 20
x + y + z = 50
≡
5x − 2y + 3z = 20
3x + 2y + z = 10
x + y + z = 50
3x + 2y + z = 10
5x − 2y + 3z = 20
x + y + z = 50
≡
3x + 2y + z = 10
5x − 2y + 3z = 20
2x + 2y + 2z = 100
3x + 2y + z = 10
5x − 2y + 3z = 20
x + y + z = 50
≡
3x + 2y + z = 10
7x + 5z = 120
x + y + z = 50
3w − 5x − 4y − z = −70
3w + 6x − 2y + 6z = 101
4w − 2x + 3y + 5z = 66
w + x + y + z = 30
9/27/2018 Module 2
https://onlinecampus.bu.edu/bbcswebdav/pid-6253499-dt-content-rid-23201016_1/courses/18fallmetad510_d1/course/module2/allpages.htm 5/47
Now we can multiply equation 3 by 3 and add it to equation 2 to set its leading multiplier to 1:
Now we eliminate from equation 3 by subtracting 3 times equation 2:
We go on to eliminate from equation 4 by adding 6 times equation 2
Next we can divide equation 3 by 61:
And add equation 3 × 133 to equation 4:
Solving for in equation 4 and plugging it back into the prior equations we get
We now repeat the process for
Continuing the process, we find and .
Augmented Matrices
You may have surmised in the last module that we can create a more efficient notation to solve linear equations, since the variable names are
superfluous. Given a system of linear equations, we could create a matrix to house the relevant information. For example, instead of writing:
We could create an array of numbers containing the same information, as follows:
We call this an augmented matrix because we include the right side of the equations in the matrix. As before we can apply the elementary
operations to this matrix, only we call them row operations.
Row Operations
Rows can be interchanged:
Multiplied by a nonzero constant:
And exchanged for the sum of itself and a nonzero multiple of another row.
x
x
z
y
x = 9 w = 5
x + y + z = 7
x − 2y + 3z = 3
2x + z = 9
⎡
⎣
⎢ ⎢ ⎢
1
1
2
1
−2
0
1
3
1
7
3
9
⎤
⎦
⎥ ⎥ ⎥
≡
⎡
⎣
⎢ ⎢ ⎢
1
1
2
1
−2
0
1
3
1
7
3
9
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
1
2
−2
1
0
3
1
1
3
7
9
⎤
⎦
⎥ ⎥ ⎥
≡
⎡
⎣
⎢ ⎢ ⎢
1
1
2
1
−2
0
1
3
1
7
3
9
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
1
4
1
−2
0
1
3
2
7
3
18
⎤
⎦
⎥ ⎥ ⎥
9/27/2018 Module 2
https://onlinecampus.bu.edu/bbcswebdav/pid-6253499-dt-content-rid-23201016_1/courses/18fallmetad510_d1/course/module2/allpages.htm 6/47
Solving Augmented Matrices
To find the answer to a system using an augmented matrix, you can use the analogous method as for a system of equation: try to use the row
operations to make every element along the diagonal a 1, and everything below the diagonal a 0. Let’s call the 3 rows and .
First, let our new
Then let
Then let
Lastly, let
This is equivalent to our first augmented matrix, and represents the following system of equations:
And we see that the solution is .
The Gauss Jordan Method
If instead of back solving the zeroed matrix, we wish to solve the rest of the equation in augmented matrix form, we’d use the Gauss Jordan
method: We use the row operations to resolve the augmented matrix in the following form:
≡
⎡
⎣
⎢ ⎢ ⎢
1
1
2
1
−2
0
1
3
1
7
3
9
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
1
3
1
−2
1
1
3
2
7
3
16
⎤
⎦
⎥ ⎥ ⎥
, ,R1 R2 R3
= −R ′
2 R2 R1
≡
⎡
⎣
⎢ ⎢ ⎢
1
1
2
1
−2
0
1
3
1
7
3
9
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
0
2
1
−3
0
1
2
1
7
−4
9
⎤
⎦
⎥ ⎥ ⎥
= × −1/3R ″
2 R
′
2
≡
⎡
⎣
⎢ ⎢ ⎢
1
0
2
1
−3
0
1
2
1
7
−4
9
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
0
2
1
1
0
1
− 2 3
1
7 4 3
9
⎤
⎦
⎥ ⎥ ⎥
= − 2 :R ‴
3 R
″
3 R1
≡
⎡
⎣
⎢ ⎢ ⎢
1
0
2
1
1
0
1
− 2
3
1
7 4
3
9
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
0
0
1
1
−2
1
− 2
3
−1
7 4
3
−5
⎤
⎦
⎥ ⎥ ⎥
= −3/7( + 2 )R ⁗
3 R ‴
3 R ‴
2
≡
⎡
⎣
⎢ ⎢ ⎢
1
0
0
1
1
−2
1
− 2 3
−1
7 4 3
−5
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
0
0
1
1
0
1
− 2 3
1
7 4 3
1
⎤
⎦
⎥ ⎥ ⎥
≡
⎡
⎣
⎢ ⎢ ⎢
1
0
0
1
1
0
1
− 2 3
1
7 4 3
1
⎤
⎦
⎥ ⎥ ⎥
x + y + z = 7
y − z =2 3
4 3
z = 1
x = 4, y = 2, z = 1
⎡
⎣
⎢ ⎢ ⎢
1
0
0
0
1
0
0
0
1
y
x
z
⎤
⎦
⎥ ⎥ ⎥
9/27/2018 Module 2
https://onlinecampus.bu.edu/bbcswebdav/pid-6253499-dt-content-rid-23201016_1/courses/18fallmetad510_d1/course/module2/allpages.htm 7/47
To do so, we go through and subtract rows from those above them to zero out the values above the diagonal. In our prior example, starting with
the latest equivalent matrix, add to row to get:
Then subtract rows and from to return:
This is called reduced row echelon form.
Applications of Systems of Linear Equations
In this section, we will cover several applications of linear equations.
Example 1 6.3 Ex 11 Mathematics with Applications, Lial et al. Pretzels cost $3 per pound, dried fruit $4 per
pound, and nuts $8 per pound. How many pounds of each should be used to produce 140 pounds of
trail mix costing $6 per pound in which by weight there is twice as much pretzel as dried fruit?
We can write this as 3 equations with the number of pounds of each ingredient the unknowns: (we
choose as nuts, as pretzels, and as fruit to save some steps)
We put this in augmented matrix form:
Subtract from to get
Add to to get
Solving through, we find , meaning our conditions are satisfied when
we use 80 pounds of nuts, 20 of fruit, and 40 of pretzels.
Going through the same steps with equations:
2/3 × R3 R2
≡
⎡
⎣
⎢ ⎢ ⎢
1
0
0
1
1
0
1
− 2 3
1
7 4 3
1
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
0
0
1
1
0
1
0
1
7
2
1
⎤
⎦
⎥ ⎥ ⎥
R2 R3 R1
≡
⎡
⎣
⎢ ⎢ ⎢
1
0
0
1
1
0
1
0
1
7
2
1
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
0
0
0
1
0
0
0
1
4
2
1
⎤
⎦
⎥ ⎥ ⎥
x y z
x + y + z = $140
y − 2z = 0
$8x + $3y + $4z = 140 × $6 = $840
8R1 R3
⎡
⎣
⎢ ⎢ ⎢
1
0
0
1
1
−5
1
−2
−4
140
0
−280
⎤
⎦
⎥ ⎥ ⎥
5R ′
2 R ′
3
⎡
⎣
⎢ ⎢ ⎢
1
0
0
1
1
0
1
−2
−14
140
0
−280
⎤
⎦
⎥ ⎥ ⎥
z = 20, y = 40, and x = 80
9/27/2018 Module 2
https://onlinecampus.bu.edu/bbcswebdav/pid-6253499-dt-content-rid-23201016_1/courses/18fallmetad510_d1/course/module2/allpages.htm 8/47
Subtract 8 times equation 1 from equation 3 to get
Add 5 times equation 2 to equation 3 to get
Solving:
Example 2 6.3 Ex 7 Mathematics with Applications, Lial et al. Tickets to a concert cost $5 for adults, $3 for
teenagers, and $2 for preteens. If 570 people attend a concert, total ticket receipts come to $1950,
and ¾ as many teenagers attend as preteens, How many of each age group attended?
Let represent the number adults attending the concert; represent the number of teenagers
attending the conference, and represent the number of preteens attending the conference.
If 570 people attend the conference, then .
If total ticket receipts come to $1950 then .
If ¾ as teenagers attend as preteens, then .
Using an augmented matrix,
Subtract 5 times the first row to the last row to get
Add 2 times the second row to the last row to get
We can conclude that there were 200 preteens, 150 teenagers, and 220 adults in attendance.
Example 3
x + y + z = $140
y − 2z = 0
$8x + $3y + $4z = 140 × $6 = $840
x + y + z = $140
y − 2z = 0 − 5y − 4z = −280
x + y + z = $140y − 2z = 0 − 14z = −280
z = − = 20 −280
−14
y = 2z = 40
x = 140 − 20 − 40 = 80
x y
z
x + y + z = 570
5x + 3y + 2z = 1950
y = z 3 4
⎡
⎣
⎢ ⎢ ⎢
1
0
5
1
1
3
1
−0.75
2
570
0
1950
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
0
0
1
1
−2
1
−0.75
−3
570
0
−900
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
0
0
1
1
0
1
−0.75
−4.5
570
0
−900
⎤
⎦
⎥ ⎥ ⎥
9/27/2018 Module 2
https://onlinecampus.bu.edu/bbcswebdav/pid-6253499-dt-content-rid-23201016_1/courses/18fallmetad510_d1/course/module2/allpages.htm 9/47
6.3 Ex 24a Mathematics with Applications, Lial et al. An electronics company produces transistors,
resistors, and computer chips. Each transistor requires 3 units of copper, 1 unit of zinc, and 2 units of
glass. Each resistor requires 3, 2, and 1 units of the three materials, and each computer chip requires
2, 1, and 2 units respectively. How many of each product can be made with 810 units of copper, 410
of zinc, and 490 of glass?
Let be our total transistors, resistors, and computer chips produced, respectively.
Since we have 810 units of copper, and transistors, resistors, and computer chips require 3, 3, and 2
units of copper respectively, we can say .
We can apply the same logic to 410 units of zinc: transistors, resistors, and computer chips require 1,
2, and 1 units of zinc so . We put this equation first in our matrix because we want
a leading 1.
Finally, transistors, resistors, and computer chips require 2, 1, and 2 units of glass, so
. We organize these in the following augmented matrix:
So they can make 100 transistors, 110 resistors, and 90 computer chips.
Matrices
We’ve discussed augmented matrices, but these are not the most frequently used version of a matrix. Most of the time, when we use the word
matrix, we’re referring to an m×n array of numbers, where m is the number of rows and n the number of columns. Rows are always listed first.
A typical 2×3 matrix might look like this:
If , then the matrix is called a row matrix. If , then the matrix is called a column matrix. If , the matrix is called a square
matrix.
For convenience, given a matrix , we denote the entry in the row and column as . In the above example, .
A row matrix A colum matrix A square matrix
Matrix Addition and Subtraction
x, y, and z
3x + 3y + 2z = 810
x + 2y + z = 410
2x + y + z = 490
≡ ≡
⎡
⎣
⎢ ⎢ ⎢
1
3
2
2
3
1
1
2
2
410
810
490
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
0
2
2
−3
1
1
−1
2
410
−420
490
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
0
0
2
−3
−3
1
−1
0
410
−420
−330
⎤
⎦
⎥ ⎥ ⎥
≡ ≡ ≡
⎡
⎣
⎢ ⎢ ⎢
1
0
0
2
−3
−3
1
0
−1
410
−330
−420
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
0
0
2
1
0
1
0
1
410
110
90
⎤
⎦
⎥ ⎥ ⎥
⎡
⎣
⎢ ⎢ ⎢
1
0
0
0
1
0
0
0
1
100
110
90
⎤
⎦
⎥ ⎥ ⎥
[ ]41.5 1−4 38 m = 1 n = 1 m = n
A ith jth aij = 8a23
[ ]1 2 3 ⎡
⎣
⎢ ⎢
1
2
3
⎤
⎦
⎥ ⎥
⎡
⎣
⎢ ⎢
1
0
−2
2
2
1
3
4
5
⎤
⎦
⎥ ⎥
9/27/2018 Module 2
https://onlinecampus.bu.edu/bbcswebdav/pid-6253499-dt-content-rid-23201016_1/courses/18fallmetad510_d1/course/module2/allpages.htm 10/47
If two matrices, and , are both , then (and only then), they can be added to one another. This is a simple matter of going through and
adding or subtracting each element to the corresponding element in the other matrix, as follows:
For example,
Similarly, an matrix can be subtracted from another in the expected manner:
Scalar Multiplication
A matrix can be multiplied by a scalar. A scalar is just a constant. In this case, you just multiply every element of the matrix by the scalar, as
follows:
For example,
Matrix Multiplication
Given an matrix, and an matrix, , we define the product of the row of (a row matrix) and the column of (an
column matrix) as the sum of the products of each corresponding entry. For example:
.
We can now define the product of and , (written , as the matrix whose entries = the row of × the column of .
Right away, we can see that it’s not always true that . In fact, if , isn’t even defined.
Example
A B m × n
[ ] + [ ] = [ ] a11
a21
a12
a22
a13
a23
b11
b21
b12
b22
b13
b23
+a11 b11
+a21 b21
+a12 b12
+a22 b22
+a13 b13
+a23 b23
+ =
⎡
⎣
⎢ ⎢
4
2
5
2
4
9
⎤
⎦
⎥ ⎥
⎡
⎣
⎢ ⎢
8
1
4
8
9
6
⎤
⎦
⎥ ⎥
⎡
⎣
⎢ ⎢
12
3
9
10
13
15
⎤
⎦
⎥ ⎥
m × n
[ ] − [ ] = [ ] 7
4
10
7
3
3
6
6
4
1
4
1
c × [ ] = [ ] a11
a21
a12
a22
a13
a23
c × a11
c × a21
c × a12
c × a22
c × a13
c × a23
10 × =
⎡
⎣
⎢ ⎢
3
5
9
1
1
6
9
6
7
⎤
⎦
⎥ ⎥
⎡
⎣
⎢ ⎢
30
50
90
10
10
60
90
60
70
⎤
⎦
⎥ ⎥
m × n A n × k B ith A 1 × n jth B
n × 1
[ ] × = 2 × 1 + 4 × 3 + 6 × 5 = 442 4 6 ⎡
⎣
⎢ ⎢
1
3
5
⎤
⎦
⎥ ⎥
A B AB m × k C cij i th A jth B
AB = BA m ≠ k BA
[ ] = [ ] 1
3
2
2
1
4
⎡
⎣
⎢ ⎢
1
4
5
5
3
2
2
1
1
⎤
⎦
⎥ ⎥
(1 × 1) + (2 × 4) + (1 × 5)
(3 × 1) + (2 × 4) + (4 × 5)
(1 × 5) + (2 × 3) + (1 × 2)
(3 × 5) + (2 × 3) + (4 × 2)
(1 × 2) + (2 × 1) + (1 × 1)
(3 × 2) + (2 × 1) + (4 × 1)
= [ ] 14
31
13
29
5
12
9/27/2018 Module 2
https://onlinecampus.bu.edu/bbcswebdav/pid-6253499-dt-content-rid-23201016_1/courses/18fallmetad510_d1/course/module2/allpages.htm 11/47
Suppose you’re offered a stock portfolio with 1000 shares of Stock A, 500 of Stock B, and 800 of Stock C, or a different portfolio with 850
shares of A, 800 shares of B, and 700 of C. You’re curious about two scenarios outlined in the following table:
Stock A Stock B Stock C
Scenario 1 $50 $60 $40
Scenario 1 $60 $55 $35
Let’s look at this equation in terms of what each row and column means
The Identity Matrix
Consider an matrix , with for and for . For , for example this matrix would look like this, with 1’s
along its diagonals and 0’s elsewhere:
We call such a matrix an identity matrix. This is because, for any square matrix ,