1 Section 2.3: Systems of Linear Equations: Un- determined and Overdetermined Systems

advertisement
Notes for math 141
1
Section 2.3-2.5
Finite Mathematics
Section 2.3: Systems of Linear Equations: Undetermined and Overdetermined Systems
Recall that in Section 2.2 You are required to learn how to do the Gauss-Jordan
Method by hand when there is a unique solution for the systems of linear equations,
but remember that you can check your work with the calculator.
Enter the matrix into the calculator:
1. Hit 2nd x−1 .
2. Cursor right two places to EDIT and hit ENTER on the matrix you wish to edit.
3. Enter the size of the matrix.
4 Enter the matrix elements.
Note: Our calculator will put an augmented matrix into row-reduced form for us.
This only works when the # of rows is less than or equal to # of columns. Below are
the steps you must follow:
1.
2.
3.
4.
Enter the augmented matrix into your calculator.
Go to your home screen.
Press MATRIX, cursor right to MATH, and select B:rref.
Call the matrix you want to reduce and hit ENTER.
Example 1.1. Solve the following system of equations using Gauss Jordan Elimination:
⎧
2y + 3z = 7
⎪
⎪
⎪
⎪
⎨3x + 6y − 12z = −3
⎪
⎪
⎪
⎪
⎩5x − 2y + 2z = −7
We can a unique solution x=-1, y=2 , z=1. We can check the answer in the calculator.
1
Notes for math 141
1.1
Section 2.3-2.5
Finite Mathematics
Solutions for Systems of Linear Equations
What are the possible cases when solving a system of linear equations?
We will use calculator to solve systems of linear equations.
2
Notes for math 141
Section 2.3-2.5
Finite Mathematics
Example 1.2.
⎧
x+y+z =1
⎪
⎪
⎪
⎪
⎨3x − y − z = 4
⎪
⎪
⎪
⎪
⎩x + 5y + 5z = −1
3
Notes for math 141
Section 2.3-2.5
Finite Mathematics
Example 1.3.
⎧
x + 2y − 3z = −2
⎪
⎪
⎪
⎪
⎨3x − y − 2z = 1
⎪
⎪
⎪
⎪
⎩2x + 3y − 5z = −3
4
Notes for math 141
Section 2.3-2.5
Finite Mathematics
Example 1.4.
⎧
2x − y = 1
⎪
⎪
⎪
⎪
⎨6x − y = 5
⎪
⎪
⎪
⎪
⎩x − 3y = −2
⎧
2x − y = 1
⎪
⎪
⎪
⎪
⎨6x − y = 5
⎪
⎪
⎪
⎪
⎩4x − 5y = −2
5
Notes for math 141
Section 2.3-2.5
Finite Mathematics
Theorem 1.5. We have the following theorem concerning the number of equations
and the number of variables in a system:
• If the number of equations is greater than or equal to the number of variables,
the system will have either a unique solution, no solution, or infinitely many
solutions.
• If the number of equations is fewer than than the number of variables, the system
will have either no solution or infinitely many solutions.
6
Notes for math 141
Section 2.3-2.5
Finite Mathematics
Example 1.6.
⎧
⎪
⎪x − 2y − 5z + w = −2
⎨
⎪
⎪
⎩2x − 3y − 2z + w = −2
7
Notes for math 141
1.2
Section 2.3-2.5
Finite Mathematics
Application
Example 1.7. A person has 15 coins made up of nickels, dimes, and quarters. If
the total value of the coins is $2. How many of each type of coin does this person
have? Let x, y, and z be the number of nickels, dimes, and quarters the person has
respectively.
8
Notes for math 141
2
Section 2.3-2.5
Finite Mathematics
Section 2.4: Matrices
2.1
Matrix
Recall
Definition 2.1. A matrix is an ordered rectangular array of numbers. A matrix with
m rows and n columns has size m × n. The entry in the ith row and jth column is
denoted by aij .
Example 2.2. Row matrix
Column matrix
Square matrix
9
Notes for math 141
2.2
Section 2.3-2.5
Finite Mathematics
Equality of matrices
Definition 2.3. Two matrices are said to be equal if they have the same size and
the corresponding entries are equal.
Example 2.4.
2
x
3
2 4 z
[
]=[
]
2 y−1 2
2 1 2
10
Notes for math 141
2.3
Section 2.3-2.5
Finite Mathematics
Matrix Operations
If we multiply a matrix A by a scalar (constant number) c, then the matrix cA is
obtained by multiplied every entry in A by c. For example, if B = cA, then bij = caij .
Note: Scalar multiplication does NOT change the size of the matrix.
1 5 −3
Example 2.5. Suppose A = [
]. Find 3A and −A.
3 −1 2
11
Notes for math 141
Section 2.3-2.5
Finite Mathematics
Two matrices of the same size can be added (or subtracted) to obtain another matrix of the same order by adding (or subtracting) corresponding entries. For example,
if C = A ± B, then cij = aij ± bij .
Note: We can add or subtract two matrices only if they have the same size. The
addition of matrices is commutative and associative, namely, A + B = B + A and
A + (B + C) = (A + B) + C.
⎡ 1 7⎤
⎡2 3 ⎤
⎢
⎥
⎢
⎥
⎢
⎥
⎢
⎥
Example 2.6. Suppose A = ⎢ 9 1⎥ and B = ⎢3 −2⎥. Find A + B and 2A − B.
⎢
⎥
⎢
⎥
⎢−4 6⎥
⎢5 8 ⎥
⎣
⎦
⎣
⎦
12
Notes for math 141
Section 2.3-2.5
Finite Mathematics
If A is an m × n matrix with entries aij , the transpose of A, denoted AT , is the n × m
matrix with entries aji . For example, if B = AT , then bij = aji .
⎡2 3 ⎤
⎡1 7 3⎤
⎥
⎢
⎥
⎢
⎢
⎥
⎢
⎥
Example 2.7. Suppose A = ⎢3 −2⎥ and B = ⎢ 9 1 −2⎥. Find AT and B T .
⎢
⎥
⎢
⎥
⎢5 8 ⎥
⎢−4 6 8 ⎥
⎣
⎦
⎣
⎦
13
Notes for math 141
2.4
Section 2.3-2.5
Finite Mathematics
Application
Matrices are often used to organize and work with data, not solely for solving systems
of equations.
Example 2.8. The number of science and non-science majors enrolled in Math 131,
151, and 166 were counted during two semesters. Matrix F below gives data for the
fall semester and matrix S gives data for the spring semester.
M 131 M 151 M 166
S
248
492
324
F=
(
)
NS
124
224
312
and
M 131 M 151 M 166
S
210
298
124
S=
(
)
NS
320
258
110
a. Find a matrix that gives the total number of science majors and the total
number of non-science majors enrolled in each of these classes over the 1-year
period.
b. Find a matrix that gives the average number of science majors and the average
number of non-science majors enrolled in each of these classes in a semester
over this 1-year period.
14
Notes for math 141
3
Section 2.3-2.5
Finite Mathematics
Section 2.5: Matrix Multiplication
Matrix multiplication is not as easy as matrix addition and subtraction.
First, let us consider the size of the product of two matrices.
Suppose A is an m × n matrix and B is a p × q matrix. Then the matrix A × B (or
AB for short) makes sense ONLY IF n = p, in other words, the number of columns of
A is equal to the number of rows of B.
If n = p, the product AB is an m × q matrix.
15
Notes for math 141
Section 2.3-2.5
Finite Mathematics
Example 3.1. Suppose that A is a 2 × 3 matrix, B is a 3 × 4 matrix and C is a
3 × 2 matrix. Determine the size of following product of matrices if they exist. If the
product is impossible, write DNE.
a. AB
b. BA
c. AC
d. CA
e. BC
f. B T C
Note: It is possible that AB exists but BA does not, or vice versa. Even if both
AB and BA exist, AB ≠ BA in most case. So the matrix multiplication is not
commutative, but it is associative and satisfies the distributive properties. Thus,
A(BC) = (AB)C
and A(B + C) = AB + AC
16
Section 2.3-2.5
Notes for math 141
Finite Mathematics
Now we consider the entries in the product of two matrices.
Let us start with a simple case.
⎡ b1 ⎤
⎢ ⎥
⎢b ⎥
⎢ ⎥
Suppose A = [a1 a2 ⋯ an ] and B = ⎢ 2 ⎥. Then AB is a 1 × 1 matrix and
⎢⋮⎥
⎢ ⎥
⎢bn ⎥
⎣ ⎦
⎡ b1 ⎤
⎢ ⎥
⎢b ⎥
⎢ ⎥
AB = [a1 a2 ⋯ an ] ⎢ 2 ⎥ = [a1 b1 + a2 b2 + ⋯ + an bn ]
⎢⋮⎥
⎢ ⎥
⎢bn ⎥
⎣ ⎦
Note the difference between a 1 × 1 matrix and a constant number.
Example 3.2. Find the following products.
4
a. [3 −2] [ ]
5
b. [2 −1 1] [3 −2 −5]
T
17
Notes for math 141
Section 2.3-2.5
Finite Mathematics
Now it is the time to consider the general case.
Given an m × p matrix A and a p × n matrix B, the product C = AB is an m × n
matrix and cij is the only entry in the product of ith row of A and jthe column of B,
in other words,
cij = ai1 b1j + ai2 b2j + ⋅ + aip bpj
Example 3.3. Find the following products.
⎡−1 2⎤
⎢
⎥ 3 2
⎢
⎥
a. ⎢ 2 0⎥ [
]
⎢
⎥
⎢ 3 1⎥ 1 4
⎣
⎦
T
b. [2 −1 1] [3 −2 −5]
⎡2 3⎤
⎥
1 a 0 ⎢⎢
⎥
c. [
] ⎢1 b ⎥
⎥
3 −1 2 ⎢⎢
⎥
⎣ c 0⎦
18
Notes for math 141
Section 2.3-2.5
Finite Mathematics
There is a special type of matrices, called the identity matrices.
Definition 3.4. The n × n identity matrix, In is the square matrix of order n × n
with ones down the main diagonal and zeros elsewhere. Thus,
⎡1
⎢
⎢0
⎢
⎢
In = ⎢0
⎢
⎢⋮
⎢
⎢0
⎣
0
1
0
⋮
0
0
0
1
⋮
0
⋯
⋯
⋯
⋱
⋯
0⎤⎥
0⎥⎥
⎥
0⎥
⎥
⋮ ⎥⎥
1⎥⎦
Properties of Identity Matrix: If A is an m × n matrix, then
Im A = AIn = A.
Particularly, if A is an n × n square matrix, then
In A = AIn = A
19
Notes for math 141
Section 2.3-2.5
Finite Mathematics
Using Calculator: In section 2.3 we learn how to enter matrices in calculator. Suppose you have entered some matrices in your calculator.
1. Hit 2nd x−1 and select the first matrix from the NAME screen.
2. Press the addition (or multiplication) button.
3. Hit 2nd x−1 again and select the second matrix from the NAME screen and then
press enter.
You can use calculator to compute the product of matrices for the question in homework and exams if possible, but you MUST know how to multiply matrices by hand.
20
Download