Math 166 Chapter 5 (5.1 – 5.3) – Matrices

advertisement
Math 166
Chapter 5 (5.1 – 5.3) – Matrices
Chapter 4 (4.3, 4.4) – System of Linear Equations
TAMU – Spring 2014
5.1 Introduction to Matrices
Matrix : is a rectangular array of numbers. It consists of rows and columns.
• The order (or size) of a matrix with m rows and n columns is given by m x n and is read as 'm
by n'.
• Every element in the matrix is referred to by it's row and column number. That is, the element in
the ith row and jth column of a matrix A will be ___________.
• A Row matrix is a matrix with ONE ROW and any number of columns.
• A Column matrix is a matrix with ONE COLUMN and any number of rows.
• A Square matrix is one where the number of rows is the same as the number of columns.
• Two matrices are equal if they have the same order and all corresponding entries are equal.
Examples:
•
Multiplication of a Matrix by a Number (or a scalar) : If c is a number and A is a matrix,
then cA is a matrix obtained by multiplying every entry in A by c.
•
Transpose of a Matrix : is obtained by interchanging the rows and columns. The transpose of
matrix A is represented as AT.
•
Addition and Subtraction of Matrices : is possible ONLY IF THE MATRICES ARE OF
THE SAME ORDER.
These operations are performed by adding or subtracting corresponding entries in the matrices.
•
The Zero Matrix is a matrix of any order, such that all its entries are ZERO. It's given by O.
If A be any matrix, such that the order of A is the same as that of O, then
1) A + O = O + A
1
2) A – A = O
Math 166
Chapter 5 (5.1 – 5.3) – Matrices
Chapter 4 (4.3, 4.4) – System of Linear Equations
TAMU – Spring 2014
Calculator
1. Creating a new Matrix
MATRIX (2nd x-1) → Scroll to EDIT → Choose the matrix you want to create, let us say [A] → Enter
the number of rows and columns of the matrix → Enter the elements of matrix → 2nd MODE
2. Matrix Operations
a) Transpose of a Matrix:
MATRIX (2nd x-1) → Scroll to the matrix you are working with → NAMES →ENTER → MATRIX
(2nd x-1) → Scroll to MATH →Scroll to 2: T→ ENTER
Example 1.Given the matrices A, B, C, and D, perform the following operations and write the final
matrices:
A=
B=
C=
D=
a) 2A – B
b) (2A – B)T
c) C - D / 2
d) C T – D / 2
e) Is A + B = B + A?
2
f) Is 2(A + B) = 2B + 2A?
Math 166
Chapter 5 (5.1 – 5.3) – Matrices
Chapter 4 (4.3, 4.4) – System of Linear Equations
TAMU – Spring 2014
Example 2. If X is a 3 x 5 matrix, Y is a 5 x 5 matrix, Z is a 5 x 3 matrix, and U is a 2 x 2 matrix, then
state the order of the following matrices (if the operation is possible).
a) X + Z
b) X – ZT
Example 3. Find x, y, z if you are given the following:
3
c) 2U
d) Y + Y + Y
Math 166
Chapter 5 (5.1 – 5.3) – Matrices
Chapter 4 (4.3, 4.4) – System of Linear Equations
TAMU – Spring 2014
4.3 System of Linear Equations with Unique Solutions
rref stands for Row Reduced Echelon form. It is a reduced for of a matrix that may be easier to work
with. We can do it by hand, or with the help of a Calculator. In this class, we'll use our Calculators!!!
Calculator
Matrix Operation – rref
MATRIX (2nd x-1) → Scroll to MATH → Scroll to B: rref → MATRIX (2nd x-1) → Scroll to the matrix
you want to work with → ENTER
Example 4. Using the rref calculator function for matrices, check whether the following equations
have a unique solution. If so, find the solution.
a) 2x + 3y + 4z = 5
x – 2y + 2z = 4
x + y + z = -2
b) x + 2y + z – u = -2
x + 2y + 2z + 2u = 9
y + z – u = -2
y – 2z + 3u = 4
4
Math 166
Chapter 5 (5.1 – 5.3) – Matrices
Chapter 4 (4.3, 4.4) – System of Linear Equations
TAMU – Spring 2014
Example 5. A store sells a total of 300 shirts, trousers and dresses. The sales of the dresses equaled
sum of the other two. The dresses cost $30, the shirts cost $40, and the trousers cost $50, each. If the
store sold $11,500 worth of these apparels in that month, how many of each were sold?
Example 6. A furniture company makes chairs, footstools and couches out of fabric, wood and
stuffing. The number of units of each of these materials needed for each of the products is given in the
table. How many of each product can be made if there are 54 units of wood, 63 units of fabric, and 43
units of stuffing available?
Wood
Fabric
Stuffing
Chair
2
2
1
Footstool
3
1
1
Couch
1
3
3
5
Math 166
Chapter 5 (5.1 – 5.3) – Matrices
Chapter 4 (4.3, 4.4) – System of Linear Equations
TAMU – Spring 2014
Example 7. Every software developer has to write three types of documents for every new product he
develops– a technical document, a business document, and a customer-friendly document. Each
document has to go through three managers.
The numbers of hours each manager takes to proof-read each type of document is given.
If the first manager has 34 hours, the second manager has 35 hours, and the third manager has 36 hours
for this job, how many documents of each type can they process?
Manager #1 Manager #2 Manager #3
Technical
2
3
3
Business
4
2
3
Customer friendly
2
4
3
Example 8. Ted has three times as many dimes as quarters. If the total face value of these coins is
$3.30, how many of each type of coin does Ted have?
6
Math 166
Chapter 5 (5.1 – 5.3) – Matrices
Chapter 4 (4.3, 4.4) – System of Linear Equations
TAMU – Spring 2014
4.4 System of Linear Equations with non-unique solutions
Example 9. Using the rref calculator function for matrices, check whether the following system of
equations has a solution.
x – y +z = 1
2x + 3y – 2z = 1
3x + 2y – z = 1
Example 10. Using the rref calculator function for matrices, check whether the following system of
equations have a parametric solution. If so, write the parametric solution.
a) x – y +z = 1
2x + 3y – 2z = 1
3x + 2y – z = 1
Check for the following:
i) Is (5, –1, 1) one of the solutions?
ii) Is (5, 2, 1) one of the solutions?
b) -2x + 6y + 4z = 12
3x – 9y – 6z = -18
Check if (0, 1, –1) a solution?
c) x + 2z + 3u = 4
y + 2z + 3u = 5
7
Math 166
Chapter 5 (5.1 – 5.3) – Matrices
Chapter 4 (4.3, 4.4) – System of Linear Equations
TAMU – Spring 2014
Example 11. You and your friends are baking cakes to deal with the stress of Spring break coming to
an end! You make three kinds of cakes – Chocolate, Red Velvet, and Pineapple. The chocolate cake
uses 7 cups of butter and 4 cups of sugar. Red Velvet uses 1cup of butter and 2 cups of sugar. Pineapple
cake uses 2 cups of butter and 2 cups of sugar. You have got 30 cups of butter and 30 cups of sugar
available at home. (You probably love to bake!). How many of each type of cake can you bake?
Follow the steps to answer this question
1. Write the system of equations.
2. Find the general solution for the system of equations.
3. Choose the parameter and find the possible values it can take.
4. List all possible combinations of the number of cakes of each type.
8
Math 166
Chapter 5 (5.1 – 5.3) – Matrices
Chapter 4 (4.3, 4.4) – System of Linear Equations
TAMU – Spring 2014
5.2 Matrix Multiplication
Given two matrices – A of size m x p, and B of size q x n, their product AB = C is defined if p = q, and
C is a matrix of order m x n.
NOTE : If AB is defined, it's NOT necessary that BA will also be defined.
Example 12. Given matrices A and B
A=
B=
a) Compute AB and BA, using calculator (if they exist)
b) Is AB = BA?
9
Math 166
Chapter 5 (5.1 – 5.3) – Matrices
Chapter 4 (4.3, 4.4) – System of Linear Equations
Example 13. Given matrices A and B
A=
B=
a) Compute AB (if it exists) by hand, and check your answer with the calculator.
b) Compute BA (if it exists) and check if it is equal to the product matrix AB.
10
TAMU – Spring 2014
Math 166
Chapter 5 (5.1 – 5.3) – Matrices
Chapter 4 (4.3, 4.4) – System of Linear Equations
TAMU – Spring 2014
Example 14. Matrix M shows the nutritional content of 3 different types of dog food. A dog is fed 27
grams of kibbles, 55 grams of bits, and 68 grams of chunks.
a) Write the column matrix N representing the amount, in grams, of each type of food fed to a dog.
b) Find the product MN. What does the product represent?
c) How many units of all the vitamins combined, does the dog get in a meal?
Example 15. Matrix A shows the number of calories from fat, protein, and carbohydrates per unit of
each food. Matrix B represents the number of units of food eaten by a person.
a) Find AB.
b) What does AB represent?
11
Math 166
Chapter 5 (5.1 – 5.3) – Matrices
Chapter 4 (4.3, 4.4) – System of Linear Equations
TAMU – Spring 2014
5.3 Inverse of a Matrix If A be a matrix of order n x n, and if matrix B is its inverse, then
B will also be of the order n x n , and B = A-1
*** To check if two matrices are inverses of each other, find their product. If the product is an identity
matrix, then the two matrices are inverses of each other.
Example 16. Find the inverse of
We have learned to solve the system of equations by writing the coefficients and constant term as an
augmented matrix, reducing it using rref function, and finding the solution, if it exists. Inverse of a
matrix can also be used to solve a system of linear equations.
Example 17. Solve the system of linear equations using inverse matrix. Verify your answer using rref.
x + y + 2z = 1
2x + 3y + 2z = 2
x + y + 3z = 0
12
Download