You are on page 1of 38

Topic 5

Matrix Algebra
Topic Objectives
1. Introduce the concept of a matrix and consider special types of matrices.
2. Define matrix addition and scalar multiplication operations.
3. Express a system as a single matrix equation using matrix multiplication.
4. Use matrix reduction to solve a linear system.
5. Solve the theory of homogeneous systems.
6. Use inverses to solve systems.
Topic Outline
1. Matrices
2. Matrix Addition and Scalar Multiplication
3. Matrix Multiplication
4. Solving Systems by Reducing Matrices
5. Inverses
Matrices
• A matrix consisting of m horizontal rows and n vertical columns is called an
m×n matrix or a matrix of size m×n.
• For the entry aij, we call i the row subscript and j the column subscript.

Example 1

M is a 3 x 4 matrix,
a ij  a11  20
Matrices
• Two
  matrices are said to have the same order (be the same size) if they have the
same number of rows and the same number of columns.

Example2
• and
•do not have the same order.
•C is a 2  3 matrix and D is a 3  2 matrix.
Matrices
• Some
  matrices take special names because of their size. If the number of rows equals
the number of columns, we say the matrix is a square matrix.

• Matrix B below is a 3  3 square matrix.

• A matrix with one row, such as [9 5] or [3 2 1 6], is called a row matrix


• A matrix with one column, such as is called a column matrix.
Matrices
•  Any matrix in which every entry is zero is called a zero matrix, for example

• We define two matrices to be equal if they are of the same order and if each entry in
one equals the corresponding entry in the other.
• In a square matrix, A = [aij ], of order n, the entries a11, a22, . . . , ann are called the
diagonal entries and form the principal diagonal of A.
Transpose of a Matrix
• When
  the columns and rows of matrix A are interchanged to create a matrix B, and
vice versa, we say that A and B are transposes of each other and write AT = B and BT
= A.

Example 3
Given that . Find BT

  4 0 −4
Solution: 𝑇
𝐵 = 3
0 [ 0
1
0
0 ]
•Example
  4
Given that
and
Find:

(a) a23 = ?
(b) Is A a square matrix?
(c) Find the transpose of matrix A.
(d) Does A = B?
Example 4 – Solution
•(a)  a23 represents the element in row 2 and column 3 of matrix A — that is, a23 = 2.

(b) Yes, it is a 3  3 (square) matrix.

(c)

(d) No, a33 ≠ b33.


Matrix Addition and Scalar Multiplication
Matrix Addition

• If two matrices have the same number of rows and columns, we can add the matrices
by adding their corresponding entries.

• Sum A + B is the m × n matrix obtained by adding corresponding entries of A and B.


Matrix Addition and Scalar Multiplication
• The
  matrix –B is called the negative of the matrix B, and each element of –B is the
negative of the corresponding element of B.

Example 5
then

• Using the negative, we can define the difference A – B (when A and B have the same
order) by A – B = A + (–B), or by subtracting corresponding elements.
Example 6

a. 1 2  7  2 1  7 2  2  8 0
3 4   6 4   3  6 4  4   3 8
       

5 6
   3 0 
  5  3 6  0
   8 6

1 2   2
b. 3   isimpossible as matrices are not of the same size.
 4   1
Scalar Multiplication
• If A is an m×n matrix and k is a real number, then kA is obtained by multiplying
each entry in A by k.
• Properties of Scalar Multiplication:

Subtraction of Matrices
• If A is any matrix, then –A is called the negative of A:
 A    1 A
Example 7

a.  6 3 6  2  6  6 3  2  0 5
 4 1  4 1    4  4 11    8 0
       

 3 2
  0 3 
   30 2  3
   3  1

6 0 3  3
b. If A and B ,then
2  1

1
  1

6 2    
A  2B  
T
   
0  1    
Example 7 - Solution

a.  6 3 6  2  6  6 3  2  0 5
 4 1  4 1    4  4 11    8 0
       

 3 2
  0 3 
   30 2  3
   3  1

6 0 3  3
b. If A and B ,then
2  1

1
  1

6 2  6  6  0 8
A  2B  
T
   
0  1 2  2  2 1

Multiplication of Matrices
Many computations that occur in business and manufacturing operations can be
expressed and analyzed by using matrix multiplication.

Example 8
Suppose one store of an electronics retailer has 30 plasma TVs, 20 LCD TVs, and 10
home theater systems in its inventory.

If the value of each plasma TV is $800, that of each LCD TV is $750, and that of each
home theater system is $500, then the value of this inventory is
30(80) + 20(750) + 10(500) = $44,000
Multiplication of Matrices
•If we write the value of each of the items in the row matrix, A, and the number of each
of the items in the column matrix, B, then the value of this inventory may be
represented by

•This useful way of operating with a row matrix and a column matrix is called the
product AB.
Example 9

Given the price and the quantities, calculate the total cost.

P  2 3 4  7  units of A
Q 5
 
 units of B

11 units of C
Solution:
The cost vector is

7
PQ   2 3 4  5
 
   73

11
Example 10

1 0
 1  2 3 0  1
If A B C
0 2
 3 4 
 1 1 2 


1 1

compute ABC in two ways.
Solution 1: Solution 2
 1 0  1 0
  2 3  1  
 AB  C   
1 0
 2  3 0  1  2
 1   0
A BC       0 2
 4  1 
2   
 3 4   1 1 2 
   3  1  1 1
 
1 1
  
 1  2  2  1   4  9 1 0
  6  1 2  5    4  9
 3 4  3 4 19   0 2  
   
 5 4 11 
 1  6 19 

 1

Note that A(BC) = (AB)C.
Example 11
If 3 2  52  51  1 0 0 0
A B 1 3 
I  O
1 4
   10 10  0 1
 0 0

compute each of the following.
Solution:
1 0  3 2  2  2
a. I  A      
0 1  1 4 1  3

 3 2 1 0   3 2  2 0  3 6
b. 3 A  2I   3
 1  2   3  
 4

0

 
1   1


4 0 
2 
 3 6

Example 12

Write the system 2 x1  5 x 2  4



8 x1  3 x 2  7
in matrix form by using matrix multiplication.

Solution:
2 5  x1  4
A X   B 
8 3
  x2  7 
If AX  B
then the single matrix equation is

2 5  x1   4
8     
 3  x2  7 
Solving Systems by Reducing Matrices
Elementary Row Operations
1. Interchanging two rows of a matrix
2. Multiplying a row of a matrix by a nonzero number
3. Adding a multiple of one row of a matrix to a different row of that matrix
Properties of a Reduced Matrix
• All zero-rows at the bottom.
• For each nonzero-row, leading entry is 1 and all other entries in the column of the
leading entry are zero.
• Leading entry in each row is to the right of the leading entry in any row above it.
Example 13
For each of the following matrices, determine whether it is reduced or not reduced.

1 0 1 0 0 0 1
a.  b. c.
0 3
 0 1 0
 1 0

1 0 0 0 1 0 3
0 0 0
d. e.
0 0 0 f.
0 0 1 2
0 0 0

 

0 1 0
 
0 0 0 0

Solution:
a. Not reduced b. Reduced
c. Not reduced d. Reduced
e. Not reduced f. Reduced
Systems with Unique Solutions
• We can use matrices to solve systems of linear equations by performing the same
operations on the rows of a matrix to reduce it as we do on equations in a linear system.
• The three different operations we can use to reduce the matrix are called elementary
row operations and are similar to the operations with equations that result in
equivalent systems. These operations are
1. Interchange two rows.
2. Add a multiple of one row to another row.
3. Multiply a row by a nonzero constant.
Example 14
By using matrix reduction, solve the system
2 x  3 y  1

 2x  y  5
 x  y 1

Solution:
Reducing the augmented coefficient matrix of the system,

2 3  1 1 0 4 
   
2 1 5
0 1  3
1 1 1 0
   0 0 
We have  x 4

y  3
Elimination Method
• The process that we use to solve a system of equations with matrices (called the
elimination method or Gauss-Jordan elimination method) is a systematic
procedure that uses row operations to attempt to reduce the coefficient matrix to
an identity matrix.
Systems with No unique Solutions
• It is also possible for a system of linear equations to have an infinite number of solutions or no solution at
all.

Although coefficient matrices for systems with an infinite number of solutions or no solution will not reduce
to identity matrices, row operations can be used to obtain a reduced form from which the solutions, if they
exist, can be determined.
•A matrix is said to be in reduced form when it is in the following form:
1. The first nonzero element in each row is 1.

2. Every column containing a first nonzero element for


some row has zero everywhere else.

3. The first nonzero element of each row is to the right of


the first nonzero element of every row above it.

4. All rows containing zero are grouped together below


the rows containing nonzero entries.
Systems with No unique Solutions
•The following matrices are in reduced form because they satisfy these conditions.

•The following matrices are not in reduced form.

•In the first two matrices, the circled element must be changed to obtain a reduced
form.
Example 15

Using matrix reduction, solve


 x1  2 x 2  5 x 3  5 x 4  3

 x1  x 2  3 x 3  4 x 4  1
x  x  x  2x  3
Solution:  1 2 3 4

The matrix is reduced to


1 0 1 3 1 
 
0 1 2 1  2 
0 0 0 0 0 
 
The solution is  x1  1  r  3s
 x  2  2r  s
 2

 x3  r

x4  s
• The system  a11 x1  a12 x 2  ...  a1n x n  c1
 .


 .

 .
 .


am1x1  am 2 x 2  ...  amn x n  c m

is called a homogeneous system if c1 = c2 = … = cm = 0.


• The system is non-homogeneous if at least one of the c’s is not equal to 0.

Concept for number of solutions (homogeneous):


1. k < n  infinite solutions k: nonzero-rows
2. k = n  unique solution n: unknowns
Inverse Matrices
•If the product of A and B is the identity matrix, I, we say that B is the inverse of A (and
A is the inverse of B). The matrix B is called the inverse matrix of A, denoted A–1.

•Inverse Matrices
Example 16
Solve the system by finding the inverse of the coefficient matrix.
 x1  2 x3  1

 4 x1  2 x2  x3  2
 x  2 x  10 x  1
 1 2 3
Example 16 - Solution
Solve the system by finding the inverse of the coefficient matrix.
 x1  2 x3  1

 4 x1  2 x2  x3  2
 x  2 x  10 x  1
 1 2 3

Solution:
1 0 2 
We have
A
4 2 1 


1 2  10

For inverse, 9 2 2
A1  
 2
41
4 9
2

5 1 1
  x1    9 2 2  1    7 
 x    41 4 9 
2    17
The solution is given by X = A−1B:  2  2 2    

 x3 
 5 1 1
  1
  4 
So, x1 = -7, x2 = -17 and x3 = -4
Matrix Equations
•If A is an n  n matrix and if B and X are n  1 matrices, then Ax = B is a matrix
equation.
•If the inverse of a matrix A exists, then we can use that inverse to solve the matrix
equation for the matrix X. The general solution method follows.
•Multiplying both sides of the equation (from the left) by A–1 gives
Matrix Equations
•Thus inverse matrices can be used to solve systems of equations. Unfortunately, this
method will work only if the solution to the system is unique. In fact, a systemAx = B
has a unique solution if and only if A –1 exists.

•If the inverse of the coefficient matrix exists, the solution method above can be used to
solve the system.
Inverse Matrices
•If the inverse exists for a square matrix A, we find A–1 as follows.

You might also like