Full
Full
MODULES (LINEAR
ALGEBRA)
CHAPTER OVERVIEW
Supplemental Modules (Linear Algebra) is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.
1
Matrices
1. Definition of a Matrix
Definition: Matrix
⎛4 5 ⎞
⎜0 15⎟
⎝ −9 3
⎠
is a 3 by 2 matrix.
Example 2
Consider the system of equations
2x − y z
+3 = 5 (1)
x z
+4 = 3 (2)
5x −7 y +3 z = 7 (3)
⎛ 2 −1 3 5 ⎞
⎜
⎜ 1 0 4 3 ⎟
⎟
⎝ 5 −7 3 7 ⎠
is called the augmented matrix associated to the system of equations. Two matrices are called equal if all of their entries are the
same. Two matrices are called row equivalent is one can be transformed using a sequence of the three operations that we
discussed earlier.
1. Interchanging two rows.
2. Multiplying a row by a nonzero constant.
3. Replacing a row with the row + a constant multiple of another row.
Example 3
Solve
2x −y z
+ =3 (4)
x +y +z = 2 (5)
y −z = −1 (6)
Solution
We write the associated augmented matrix:
⎛ 2 −1 1 3 ⎞
⎜⎜ 1 1 1 2 ⎟
⎟
⎝ 0 1 −1 −1 ⎠
Now begin solving by performing row operations:
1 [Link]
R1 ↔ R2
⎛ 1 1 1 2 ⎞
⎜⎜ 2 −1 1 3 ⎟ ⎟
⎝ 0 1 −1 −1 ⎠
R1 ↔ R −2
⎛ 1 1 1 2 ⎞
⎜
⎜ 0 3 −1 −1 ⎟ ⎟
⎝ 0 1 −1 −1 ⎠
R2 ↔ R3
⎛ 1 1 1 2 ⎞
⎜
⎜ 0 1 −1 −1 ⎟ ⎟
⎝ 0 3 −1 −1 ⎠
R1 − R2 → R1 , R3 +3R2 → R3
⎛ 1 1 1 2 ⎞
⎜
⎜ 0 1 −1 −1 ⎟ ⎟
⎝ 0 3 −1 −1 ⎠
R1 − R2 → R1 , R3 +3R2 → R3
⎛ 1 0 2 3 ⎞
⎜
⎜ 0 1 −1 −1 ⎟ ⎟
⎝ 0 0 −4 −4 ⎠
R3 → − 14 R3
⎛ 1 0 2 3 ⎞
⎜
⎜ 0 1 −1 −1 ⎟ ⎟
⎝ 0 0 1 1 ⎠
R1 −2R3 → R1 , R2 + R3 → R2
⎛ 1 0 0 1 ⎞
⎜
⎜ 0 1 1 0 ⎟ ⎟
⎝ 0 0 1 1 ⎠
R1 −2R3 − → +R1 , R2 + R3 → R2
⎛ 1 0 0 1 ⎞
⎜
⎜ 0 1 0 0 ⎟ ⎟
⎝ 0 0 1 1 ⎠
We can now put the matrix back in equation form:
x = 1, y = 0 and z = 1
Note
If we had seen a bottom row that was of the form 0 0 0 a where a is a nonzero constant, then there would be no solution. If a
had been 0 there would be infinitely many solutions.
2 [Link]
3. Addition and Scalar Multiplication of Matrices
We can only add matrices that are of the same dimensions, that is if
⎛2 3⎞
A=(1 2
), B =⎜4 1⎟, C = (
1 3
)
3 4 ⎝5 9⎠ 7 2
A+C = ( 1 +1 2 +3
)=( 2 5
)
3 +7 4 +2 10 6
For any matrix, we can multiply a matrix by a real number as in the following example (Same B as above):
⎛ 10 15 ⎞
5 B = ⎜ 20 ⎟
⎝ 25 ⎠
5
45
We define the zero matrix to be the matrix with only zeros for entries. For example, the 2 by 2 zero matrix is
(0 0
)
0 0
4. Multiplication of Matrices
To multiply matrices, unfortunately the definition is not the obvious one. We can only multiply matrices where the number of
columns of the first matrix is the same as the number of rows of the second matrix. The best way to learn how to multiply matrices
is by example:
⎛7 −3 ⎞
Let A=( 3 5 2
) , and B = ⎜ −2 1 ⎟
0 1 −2 ⎝0 5
⎠
then AB = ( 3(7) + 4(−2) + 2(0) 3(−3) + 4(1) + 2(5)
)=( 13 5
)
0(7) + 1(−2) + −2(5) 0(−3) + 1(1) + −2(5) −12 −9
Exercise
⎛ 4 2 1 ⎞ ⎛1 0⎞ ⎛3 4 2 ⎞
Let A=(1 2
) , B = ⎜ −2 0 0 ⎟ , C = ⎜ 2 1 ⎟ , D = ( 35 4 0
), B =⎜1 5 0 ⎟
3 4 ⎝ 1 6 −1
⎠ ⎝4 5⎠ 0 0 ⎝1 −1 2
⎠
Evaluate each one that makes sense:
1) A + B 2) 4C 3) AB 4) CD 5) DC 6) B + E 7) A3
5. Applications of Matrices
Application 1
A) Tables and chairs are made in the Mexico plant, the Brazil plant, and the US plant. The matrix below represents the quantity
made per day.
Quantity
Mexico Brazil US
A: Tables 15 10 50
Chairs 30 12 75
3 [Link]
Labor and material cost for 1997 are represented in the following matrix.
Labor Material
Mexico 15 20
B= Brazil 12 10
US 30 5
Labor Material
Mexico 17 25
C= Brazil 15 15
US 45 10
Application 2
Suppose that you have two jobs, each contribute to two different mutual funds for retirement. The first fund pays 5% interest and
the second pays 8% interest. Initially $5,000 is put into the funds and after one year there will be $5,300. If the first fund got half of
the money from the first job and one third of the money from the second job, how much did each job contribute?
Hint: Multiplication of matrices is the same as composition of functions
Larry Green (Lake Tahoe Community College)
Integrated by Justin Marshall.
This page titled Matrices is shared under a not declared license and was authored, remixed, and/or curated by Larry Green.
4 [Link]
2: Determinants and Inverses
Determinants
Consider row reducing the standard 2x2 matrix. Suppose that a is nonzero.
(a b)
c d
1
aR 1 → R , R − cR
1 2 1 → R
2
b
(1 a )
c d
b
(1 a )
0 d − cba
Now notice that we cannot make the lower right corner a 1 if
d − cba = 0
or
ad − bc = 0.
Definition: The Determinant
(a b )
c d
it tells us when it is possible to row reduce the matrix and find a solution to the linear system.
Example 2.1
( 35 1
2
)
is
3(2) − 1(5) = 6 − 5 = 1.
Determinants of 3 x 3 Matrices
We define the determinant of a triangular matrix
⎛a d e⎞
⎜0 b f⎟
⎝0 0 c⎠
by
det = abc.
2.1 [Link]
Notice that if we multiply a row by a constant k then the new determinant is k times the old one. We list the effect of all three row
operations below.
Theorem
The effect of the the three basic row operations on the determinant are as follows
1. Multiplicationof a row by a constant multiplies the determinant by that constant.
2. Switching two rows changes the sign of the determinant.
3. Replacing one row by that row + a multiply of another row has no effect on the determinant.
To find the determinant of a matrix we use the operations to make the matrix triangular and then work backwards.
Example 2.2
⎛ 2 6 10
⎞
⎜ ⎟
⎝ ⎠
2 4 −3
0 4 2
2
R
1 → R 1 (Multiplies the determinant by
1
2
)
⎛ 1 3 5
⎞
⎜ ⎟
⎝ ⎠
2 4 −3
0 4 2
⎛ 1 3 5
⎞
⎜ ⎟
⎝ ⎠
0 −2 −13
0 4 2
Note that we do not need to zero out the upper middle number. We only need to zero out the bottom left numbers.
R 3 +2 R
2 → R
3 (No effect on the determinant).
⎛ 1 3 5
⎞
⎜ ⎟
⎝ ⎠
0 −2 −13
0 0 −24
2
the determinant of the original matrix, the determinant of the
original matrix has
Inverses
We call the square matrix I with all 1's down the diagonal and zeros everywhere else the identity matrix. It has the unique property
that if A is a square matrix with the same dimensions then
AI IA A = = .
2.2 [Link]
Definition
If A is a square matrix then the inverse A−1 of A is the unique matrix such that
AA−1 = A−1 A = I .
Example 2.3
Let
A =(2 5)
1 3
then
A−1 = ( 3 −5 )
−1 2
Verify this!
Theorem: ExistEnce
The inverse of a matrix exists if and only if the determinant is nonzero.
To find the inverse of a matrix, we write a new extended matrix with the identity on the right. Then we completely row reduce, the
resulting matrix on the right will be the inverse matrix.
Example 2.4
( 2 −1 )
1 −1
First note that the determinant of this matrix is
−2 +1 = −1
hence the inverse exists. Now we set the augmented matrix as
( 21 −1 1 0
−1 0 1 )
R1 ↔R2
( 12 −1 0 1
−1 1 0 )
R2 −2R1 →R2
( 10 −1 0 1 )
1 1 −2
R1 + R2 →R1
( 10 01 11 −1−2 )
Notice that the left hand part is now the identity. The right hand side is the inverse. Hence
A−1 = ( 1 −1 )
1 −2
2.3 [Link]
Solving Equations Using Matrices
Example 2.5
2 −x y =3
x −y = 4
Then we can write this in matrix form
Ax = b
where
A=(2 −1
), x =(x), and b =(3)
1 −1 y 4
A Ax = A b
−1 −1
or
x=A b −1
From before,
A −1
= (1 −1
)
1 −2
( −1 −5 )
or
x = −1 and y = 5
Contributors
Larry Green (Lake Tahoe Community College)
Integrated by Justin Marshall.
This page titled 2: Determinants and Inverses is shared under a not declared license and was authored, remixed, and/or curated by Larry Green.
2.4 [Link]
3: Linear Systems
1. Geometry of Systems of Equations
We know that for two by two linear systems of equation, the geometry is that of two lines that either intersect, are parallel, or are
the same line. If they intersect then there is exactly one solution, if they are parallel then there are no solutions, and if they are the
same line, then there are infinitely many solutions. For three by three systems, the situation is different. The solution set is either
the empty set, a point, a line, or a whole plane. For four by four systems, the geometry becomes four dimensional and is rough to
comprehend, but is still useful.
cRj + Ri → Ri (3.1)
We follow the following steps that use row operations to solve a system of equations.
1. We interchange rows so that the top left corner is nonzero (preferably a 1).
2. We multiply row 1 by the appropriate number to make the top left corner a 1.
3. We replace rows two and three with the appropriate multiples of row 1 + rows two and three to make the two bottom rows begin
with 0.
4. We interchange the two bottom rows so that the middle coefficient nonzero.
5. We multiply row two appropriately so that the middle number is a 1.
6. We use row two to make the middle top and bottom zero.
7. Make the bottom right 0.
8. Use row three to make the top and middle rights 0.
x =1 (3.2)
y =2 (3.3)
z=3 (3.4)
3. Exercises
4x −3y z− =0 (3.5)
x −3y +2z = 7 (3.6)
3x 9y − z = −2 (3.7)
3x −2y z
+ =3 (3.8)
4x +y =1 (3.9)
11y z
−4 = −9 (3.10)
4. Application
3.1 [Link]
Your breakfast consists of orange juice, cereal, and eggs with the following nutritional information:
OJ Cereal Eggs
If you must have 30% protein, 30% Vitamin C and 300 calories for your breakfast, How many servings of OJ, Cereal, and
Eggs should you have?
Solution
Let
x = the number of servings of OJ
y = the number of servings of Cereal
z = the number of servings of eggs
Then
y 10 +20 z = 30 (3.11)
20 x +15 y = 30 (3.12)
We conclude that the breakfast should consist of 1.5 of a serving of OJ, no cereal, and 1.5 servings of eggs.
1.
20 x y
+15 = 30 (3.14)
y 10 z = 30
+20 (3.15)
2.
3 3
x + y = (3.17)
4 2
10 y +20 z = 30 (3.18)
3.
3 3
x + y = (3.20)
4 2
10 y +20z = 30 (3.21)
4. Already Done
5.
3 3
x + y = (3.23)
4 2
y +2 z =3 (3.24)
6.
3.2 [Link]
3 3
x − z =− (3.26)
2 4
y +2 z = 3 (3.27)
10 z = 15 (3.28)
7.
3 3
x − z =− (3.29)
2 4
y +2 z = 3 (3.30)
3
z= (3.31)
2
8.
3
x = (3.32)
2
y =0 (3.33)
3
z= (3.34)
2
3: Linear Systems is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.
3.3 [Link]
4: Linear Programming
1. Linear Programming (An Example)
Maximize
1. If we can graph
and note that the graph is a line that intersects the region.
2. If we can graph
and note that the graph is a straight line that intersects the region. Notice also that these lines are parallel.
3. If , we again get a parallel line that intersects the region.
4. If , we get a parallel line that does not intersect the region. Therefore, must be smaller than 30.
We are searching for the parallel line that is farthest from the origin that intersects the region. this occurs at the corner point .
4.1 [Link]
2. The Big Theorem
Theorem: Fundamental Theorem of Linear Programming
If a linear programming problem has a solution, then the solution always occurs at a corner point. If two adjacent
corner points give solutions, then every point on the line segment connecting them also give that solution. If the
profit function is
then if the region is bounded, then obtains both a maximum and a minimum.
1. If and are positive, then will always have a minimum in the region if the region lies entirely within the first
quadrant.
We graph the equations and notice that there are three easy to find corner points
The forth corner point is at the intersection of the two lines. The matrix is
2 1
1 1
1 -1
-1 2
4.2 [Link]
Now construct a profit table:
Point
3,200
2,500
3,400
Since the largest number is 3,400, we can conclude that the maximum occurs at the point with a value of 3,400.
Harveys is planning to add an additional room to its casino. The casino consists of card tables and slot
machines. On an average day, a slot machine makes $2,000, while a card table makes $30,000. The total
square feet available at Harveys' new casino room for gaming is 3,000 square feet and the total number of
additional employees allowed by the gaming commission is 45. If a slot machine occupies 6 square feet and
requires one employee per 12 machines and a card table occupies 54 square feet and requires three
employees per two tables, how many slot machines and how many card tables should be put into the new
casino room in order to maximize profit? What is the maximum Profit? (Smaller tables are permitted)
A veterinarian wishes to prepare a supply of dog food by mixing Purina Big chunks and Alpo Meaties. The
mixture is to contain at least 50 units of carbohydrates, at least 36 units of protein, and at least 40 units of fat.
The Big Chunks contain 3 units of carbohydrates per pound, 3 units of protein per pound, and 2 units of fat per
pound. The Meaties contain 5 units of carbohydrates per pound, 4 units of protein per pound, and 8 units of fat
per pound. The veterinarian can purchase the Big Chunks for 44 cents per pound and the Meaties for 80 cents
per pound. How many pounds of each dog food should be mixed in order to meet the dietary requirements at
the least cost?
4: Linear Programming is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.
4.3 [Link]