KEMBAR78
Chapter 2 - Matrix Algebra | PDF | Matrix (Mathematics) | Operator Theory
0% found this document useful (0 votes)
42 views21 pages

Chapter 2 - Matrix Algebra

fdgh

Uploaded by

Gezahegn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views21 pages

Chapter 2 - Matrix Algebra

fdgh

Uploaded by

Gezahegn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Rift Valley University College

CHAPTER TWO

MATRIX ALGEBRA AND ITS APPLICATIONS

2.1 Matrix Concepts

Introduction
A matrix is simply a rectangular arrangement of real numbers and characterized by
its elements, orders and rules applied for it. Matrices are widely applied in the
representation of linear equation and systems of linear equation, solving systems of
linear equations, input out put analysis, markov chain analysis, and so forth,
What is matrix?
A matrix (plural matrices) is a rectangular array of real numbers, which is
enclosed by large bracket [] or brasses ( ) subject to certain rules of
operation.
The real numbers which form the array are called the entries or elements of
the matrix. The elements in any horizontal line form a row and those in any
vertical line form a column of the matrix.
A matrix is farther characterized by its dimension. The dimension or order
indicates the number of rows and the number of columns contained with in
the matrix.
If a matrix has m rows and n columns, it’s said to have dimension :
m x n, which is real “m by n”.

By: Zelalem L. Page 1


Rift Valley University College

2.2 Dimensions and Types of Matrix

Consider the following matrix which has dimension 5x3, or it’s a “5 by 3” matrix

75 82 86
Example: 91 95 100
65 70 68
59 80 99
75 76 74
General form:-
A matrix a containing elements aij has the general form

a11 a12 a13---------- a1n


a21 a22 a23 ………. a2n
A= a31 a32 a33 ………. a3n
.
.
. mxn
2m1 2m2 2m3 …….. 2mn

This generalized matrix is represented as having m rows and n columns, then it is said to
be of size m x n (read m by n).
The subscripts on an element aij indicates that the element is located at the intersection of
row i and column j of the matrix. For example, a21 is located at the intersection of row 2
and column 1 the elements a35 would located in row 3 and column 5 of the matrix.
Special types of matrices.
a. Vectors: A matrix having only one row or one column.
I. Row Vector (matrix) having only one row
II. Column Vector (matrix) having only one column

By: Zelalem L. Page 2


Rift Valley University College

b. Square Matrices
- A matrix having the same number of rows and columns
- If the dimension of a matrix is an m x n square matrix is such that m = n
c. Identity matrix
- Also called a unit matrix
- Is a square matrix for which the elements along the primary diagonal all
equal 1 while all other elements equal 0
d. Transpose of a matrix
- There are times when the data elements in a matrix need to be arranged
- One arrangement is to form the transpose of a matrix.

Example: - A= 3 2
4 0
1 -2
- Given the (m x n) matrix, A, with elements aij, the transpose of A denoted by At
is an (n x m) matrix which contains elements.

at ij = aji so, At = 3 4 1

2 0 -2

e. Null or zero matrix


Whose elements are zero

By: Zelalem L. Page 3


Rift Valley University College

2.3 Matrix Operations and Technique

Consider the system of equations:

x1 - x2 + x 3 = 1
2x2 - x3 = 1
2x1 + 3x2 = 1

We can write this equation in matrix form, as follows:

1 −1 1  x1  1
    
Let A =  0 2 − 1 , X =  x2  , B = 1
    
2 3 0   x3  1
Now our matrix equation is: AX = B

• if A-1 exists
• we can do some algebra with our matrix equation
• much like solving ordinary linear equations:

AX = B
A-1AX = A-1B (mult both sides on the left by A-1)
IX = A-1B
X = A-1B

Voila! We have solved our equation.

Bad news: we need to compute A-1 to do it this way!!!

Good news: once we have A-1, we can easily solve the system for any B –– just multiply
B on the left by A-1 !!!

By: Zelalem L. Page 4


Rift Valley University College

2.3.1. Matrices: Basic Operations

A matrix is a rectangular array of numbers.

The anatomy of a matrix

col col col Each element


1 2 3
Has a name:
Row 1 3 − 5 a a12 a13 
  =  11 
 3  a a 23 
Row 2  2 1  21 a 22
Row dimension: 2 column dimension: 3
Dimensions of matrix: 2 × 3 ("two by three")
A square matrix has the same number of rows as columns

Operations on matrices

Addition and subtraction (element-by-element)

1 3 − 5  0 −1 − 2  1 2 − 7
 +  = 
2 1 3   3 0 1   __ __ __ 
 
If dimensions are different, addition and subtraction are undefined

Scalar multiplication

Properties of matrix multiplications


1. Matrix multiplications are not commutative.
• Even when the two products AB #A are both defined for given matrices
A. and , B, they re usually not equal to one anther
• i.e, A.B ≠ B.A

By: Zelalem L. Page 5


Rift Valley University College

2. Matrix multiplication does, however, satisfy the associative property. If A, B and


C are three matrices of sizes mxn , nxp and pxq. Respectivey, then the products
AB, BC, (AB) C and A (BC) are all defined, the following property can be shown:
(AB) C = A (BC) = ABC.
3. When any square matrix is multiplied by the identify matix, it remains unchanged.
AI = IA = A
4. If a is a square matrix of size nxn, we can multiply it by self
- The resulting product AA is denoted by A2, It’s again of size nxn
- Multiplying by A again we obtain AAA which is denoted by A3 and is
again of size nxn.
- Not that A2,A3…. Are defined if A is a square matrix.
5. The product of two matrices can be the zero matrix O, evne thought neither matrix
is the zero matrix.
For coample: if A= 1 0 and B= 0 0 then it’
Easily seen that 0 0 1 0

AB = 0, even though A ≠ 0 and B ≠ 0

Multiply a matrix by a number (element-by-element):

1 3 − 5  3 9 __ 
3  =  
2 1 3   __ __ __ 
 

By: Zelalem L. Page 6


Rift Valley University College

Matrix multiplication (row and column inner products):


column 1 element (1,1)
row 1 1 3 0 ⇓
1 3 − 5    − 12 
   −1 −1 
0 =  
2 1 3     
 2   
 0 0 
column 2 element (1,2)
row 1 1 3 0 ⇓
1 3 − 5    − 12 0 
   −1 −1 
0 =  
2 1 3     
 2   
 0 0 
Important: for above product we have:
(2 x 3 ) matrix × (3 x 3) matrix
• boxed numbers have to be the same, or . . .
• product is undefined (inner product does not compute)
Note: ( 2 x 3) × ( 3 x 3 ) = (2 x 3) = dimensions of product

Example 1 2 3 -2 1 2
Given A= 4 5 6 and B= 3 2 1
2 1 4 1 3 2

By: Zelalem L. Page 7


Rift Valley University College

Then find AB and BA

Solution:
Here A and B are both of size 3 x 3, thus AB and BA are both defined and
both have size (3 x 3)
1 2 3 -2 1 2
AB = 4 5 6 3 2 1
2 1 4 1 3 2

1 (-2)+ 2(3)+3(1) 1(1)+2(2)+3(3) 1(2)+2(1)+3(2)


AB = 4(-2)+5(3)+6(1) 4(1)+5(2)+6(3) 4(2)+5(2)+6(2)
2(-2)+1(3)+4(1) 2(1)+1(3)+4(3) 2(2)+1(1)+4(2)

7 14 10
Given AB = 13 32 25
3 16 13

Calculate for BA =?
Example:-
Suppose that a firm manufactures two products: I and II, by using different amounts
of the three raw materials, P,Q, and R. let the units of row materials used for the two
products be given by the following matrix.

Raw materials
P Q R

By: Zelalem L. Page 8


Rift Valley University College

Product I 3 2 4 =A
II 2 5 1

Systems of linear equations.

• A system of equation is a set consisting of more than one equation.


• One way to characterize a system of equations is by its dimensions.
• If a system of equations consists of M equations and n Variables, we say that
this system is an “M” by “n” system. Many applications in business and
Economics deal with systems of equations.
Matrix Representation of an Equation
- An equation may be represented using the inner product, for example, the expression
3x1+ 2x2 – 4x3 can be represented by the inner product as follows.

(3 5 -4) X1
X2
X3
- Where the raw vector contains the coefficients for each variable in the expression
and the column vector contains the variables. Multiply the two vectors to verify that
the inner product does result in the original expression.
- To represent the equation 3x1+ 2x2 – 4x3 =25 , we can equate the inner product with
a (1X1) matrix containing the right – side constant ,

- or

By: Zelalem L. Page 9


Rift Valley University College

(3 5 -4) x1 = (25)
x2
X3
- Remember that for two matrices to be equal, they must have the same dimension.
The inner product always results in a (1x1) matrix, which in this case contains one
element expression 3x1+ 2x2 – 4x3
- A linear equation of the form a1x1 + a2x2 + a3x3+ …… + anxn = b can be
represented in matrix form as: (a1 a2 ……….. an ) x1 = b
x2
x3
Matrix Representation of system of linear Equations.
- Where as single equations may be represented using the inner product ,a system of
equations can be represented using matrix multiplications consider, for example:-
2x – 3y = 7
4x + y = 21

2x – 3y = 7
4x + y 21

There fore, 2 -3 x = 7
4 1 y 21

If we define matrices A, B and x as:-

A= 2 -3 X= x and B = 7
4 1 y 21

Then this matrix equation can be written simply as AX = B

Example:-

By: Zelalem L. Page 10


Rift Valley University College

Express the following system of equations in matrix form:


2x + 3y + 4Z = 7
4y = 2 + 5Z
3Z - 2x + 6 = 0

Solution: 2 3 4 x 7
0 4 -5 Y = 2
-2 0 3 z -6

Exercise II: - Express the following system of equations in matrix form:


X1 – 2X2 + 3X4 + X5 = 100
2X1 - 3X3 + X4 = 60
4X2 – X3 + 2X4 + X5 = 125

Solution: 1 -2 0 3 1 X1 100
A= 2 0 -3 1 0 X= X2 and B = 60
0 4 -1 2 1 X3 125
X4
AX = B X5

Solution: 1 -2 0 3 1 X1 100
A= 2 0 -3 1 0 X= X2 and B = 60
0 4 -1 2 1 X3 125
X4
X5

By: Zelalem L. Page 11


Rift Valley University College

Example III:- A dealer of colour television sets has five 26 inch sets , eight 20 inch sets,
four 19 inch sets, and Ten 12 inch sets. The 26 inch sets is sold for $ 650 each, the 20
inch sets is sold for $ 500 casch , the 18 inch sets is sold for $ 300 each , and the 12 inch
set 5 is sold for $ 300 each express the total selling price for his television stock as the
product of two matrices.
Solution:

650
Total seling price = (8 5 4 10) 550 = $ 12,650
500
300

Solution Approaches to systems of equation using matrix.

- In solving systems of equation, we are interested in identifying values of the


variables that satisfy equations in the system simultaneously
- E.g. 5x + 10Y = 20
3x + 4Y = 10
- There are quite a few solution procedures which may be used in solving systems of
equations, we will concentrate on those apply matrices.
- These are Gaussian Elimination method, Inverse method, and Determinant method

By: Zelalem L. Page 12


Rift Valley University College

2.1 Gaussian Elimination method.


- The procedures begin with the original system of equations and transform it, using
row operations, in to an equivalent system from which the solution may be read
directly.

a1X1 + b1 X2 = C1
a2X1 + b2 X2 = C2

Gaussian elimination method

1X1 + 0 X2 = V1 Trans formed System


0X1 + 1x2 = V2

X1 = V1
X2 = V2 [(V1V2 )] is the solution set

Steps of Gaussian Method


1. Write the system of linear equations in augmented form (i.e. in the form of A/B
where A is coefficient matrix and B is constant matrix).
2. Apply elementary raw operations to transform the original augmented matrix in
another one.
- These raw operations are:-
1. Interchanging two rows.
2. Multiplying or dividing a raw by a non-zero constant

By: Zelalem L. Page 13


Rift Valley University College

3. Adding (or subtracting) a constant multiple of one row to another raw.


3. Decide the values of variable matrix, and the values are determined when A is reduced
to identity I matrix. Then the final augmented matrix is called reduced matrix and C is
solution value matrix.

Gauss-Jordan Elimination

We will do row operations:


1. Interchange two rows Ri Rj
2. Multiply a row by a constant cRi Ri
3. Add a multiple of one row cRi + Rj Rj
to another
• on an augmented matrix to solve a system
• using a method known as

GAUSS-JORDAN ELIMINATION:

1. Get a 1 in upper left corner (by row ops 1 and/or 2)


2. Get 0's everywhere else in its column (by row op 3)
3. Mentally delete row 1 and column 1. What remains is a smaller submatrix.
4. Get 1 in upper lefthand corner of the submatrix.
5. Get 0's everywhere else in its column for all rows in the matrix (not just the
submatrix).
6. Mentally delete row 1 and column 1 of the submatrix, forming an even smaller
submatrix.
7. Repeat 4, 5, 6 until you can go no further.
8. The matrix will now be in reduced row-echelon form (RREF), or just reduced form.
6. Re-write the system in natural form.
7. State the solution.

A. If you get a row of all zeros, use row op 1 to make it the last row
B. If you get a row with all zeros to the left of the line, and a non-zero on the right, STOP
(no solution).

By: Zelalem L. Page 14


Rift Valley University College

Example:

 2 − 2 1 3
 
 3 1 −1 7  R3 R1
 
1 − 3 2 0
 
1 − 3 2 0
 
 3 1 −1 7  - 3R 1 + R 2 → R 2
  - 2R 1 + R 3 → R 3
 2 − 2 1 3
 
1 − 3 2 0
 
 0 10 − 7 7  1
R R2
  10 2
0 4 − 3 3
 
1 − 3 2 0
  3R2 + R1 R1
0 1 − 7 7  -4R2 + R3 R3
 10 10 
 − 3 3 
0 4

 1 21 
 1 0 − 
 10 10 
 0 7 7 
1 − -5R3 R3
 10 10 
 1 1 
 0 0 − 
 5 5 
By: Zelalem L. Page 15
Rift Valley University College

 1 21 
 1 0 −  1
 10 10  R3 + R1 R1
 0 7 7  10
1 −
 10 10  7
  R3 + R2 R2
 0 0 1 −1  10
 
1 0 0 2
 
0 1 0 0
 
0 0 1 − 1

Answer: x1 = 2, x2 = 0, x3 = -1

Variations on reduced forms

1 2 3
0 1 2  No solution
 4 
0 0

 1 0 1 − 3/ 7
8 / 7 
Infinitely many solutions
0 1 −2
• when there are infinitely many solutions
• we state "the solution" parametrically.
• above reduced form corresponds to the system:

x1 + x3 = -3/7
x2 - 2x3 = 8/7

1. Solve each equation for its first variable:


x1 = -x3 - 3/7
x2 = 2x3 + 8/7

By: Zelalem L. Page 16


Rift Valley University College

The variables x1 and x2 on the left appear nowhere else. The variable (or variables) on
the right can be chosen arbitrarily to be any real numbers (we use “t” for this)
2. State your solution parametrically:

For any real number t, a solution is


x3 = t x2 = 2t + 8/7 x1 = -t - 3/7

Or, stated as a triple: (-t - 3/7, 2t + 8/7, t)

(Since there are infinitely many real numbers t to choose from, this represents infinitely
many solutions)

2.2 Inverse of a Square Matrix


Multiplicative identity
• we know that 1 ⋅ a = a ⋅ 1 = a (for all real numbers a)
• multiplying any number by 1 yields the identical number
• “1” is called the multiplicative identity element for the real number system

Now note:

a b  1 0  1 0  a b  a b
  =  = 
 c d  0 1 0 1  c d   c d 

so the system of 2 × 2 matrices also has an identity element, called the identity
matrix, denoted by “I”

In fact, the system of 3 × 3 matrices has its own identity matrix, also denoted by I.
When I is mentioned, its dimension must be inferred from context.

Multiplicative inverse

By: Zelalem L. Page 17


Rift Valley University College

• also, for any real number a ≠ 0


• there is an element a-1, such that a ⋅ a-1 = a-1 ⋅ a = 1
• a-1 is called the multiplicative inverse of a

Q: does every square matrix A have a multiplicative inverse? That is, a matrix A-1
such that AA-1 = A-1A = I ?
A: Some do, some don’t.

Our job:
a b
• given matrix A =   (or any square matrix)
 c d 
-1
c d
• find, if possible, a matrix A =   such that
e f 

a b  c d  c d  a b  1 0
  =  = 
 c d  e f  e f   c d  0 1

Here’s how!

By: Zelalem L. Page 18


Rift Valley University College

1 −1 1
-1
 
Example: find A for A = 0 2 − 1
 
2 3 0 

The procedure:
(1) start with:

1 −1 1 1 0 0
 
0 2 −1 0 1 0
 
2 3 0 0 0 1
(2) Do row operations to put the left matrix in reduced form
(3) If the left matrix is I, the right matrix will be A-1
(4) If the left matrix is not I, A has no inverse.

By: Zelalem L. Page 19


Rift Valley University College

Here goes:

1 −1 1 1 0 0
 
0 2 −1 0 1 0 -2R1 + R3 R3
 
2 3 0 0 0 1

1 −1 1 1 0 0
 
0 2 −1 0 1 0  ½ R2 R2
 
0 5 −2 −2 0 1

1 −1 1 1 0 0 R + R
2 R1
 1 1  1

0 1 − 0 0 -5R2 + R3 R3
 2 2 
0 5 −2 −2 0 1

 1 1 
1 0
2
1
2
0
 1 1 
0 1 − 0 0 2R3 R3
 2 2 
 1 5 
0 0 −2 − 1
 2 2 

By: Zelalem L. Page 20


Rift Valley University College

 1 1 
1 0
2
1
2
0
 1 1 
0 1 − 0 0 2R3 R3
 2 2 
 1 5 
0 0 −2 − 1
 2 2 

 1 1 
1 0
2
1
2
0
  -½ R3 + R1 R1
1 1
0 1 − 0 0 ½ R3 + R2 R2
 2 2 
 
0 0 1 −4 −5 2
 

1 0 0 3 3 − 1
 
0 1 0 −2 −2 1
 
0 0 1 −4 −5 2 

Left matrix is I, so

3 3 − 1
-1
 
A = − 2 −2 1
 
− 4 −5 2 

Check it out!

By: Zelalem L. Page 21

You might also like