0% found this document useful (0 votes)
2 views53 pages

Attachment

Chapter two discusses matrix algebra, defining matrices as rectangular arrays of elements and explaining their importance in organizing data and solving linear equations. It covers types of matrices, matrix equality, and operations such as addition, subtraction, and multiplication, emphasizing the conditions under which these operations are valid. Additionally, it introduces the concept of the multiplicative inverse of a matrix and the methods for finding it through row operations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views53 pages

Attachment

Chapter two discusses matrix algebra, defining matrices as rectangular arrays of elements and explaining their importance in organizing data and solving linear equations. It covers types of matrices, matrix equality, and operations such as addition, subtraction, and multiplication, emphasizing the conditions under which these operations are valid. Additionally, it introduces the concept of the multiplicative inverse of a matrix and the methods for finding it through row operations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 53

Chapter two

Matrix Algebra and its Applications


1. DEFINITIONS of Matrix

• A rectangular array of ordered elements


(numbers, functions or just symbols) is known
as a matrix.
• The literal form of a matrix in general is
written as
a11 a12 a13 . . . . a1n
a21 a22 a23 . . . . a2n
. . . . . . .
. . . . . . .
am1 am2 am3 . . . . amn mxn
• We use boldface type to represent a matrix, and we
enclose the array itself in square brackets.
• The horizontal lines are called rows and the vertical
lines are called columns.
• Each element is associated with its location in the
matrix.
• Thus the element aij is defined as the element located
in the intersection of ith row and the jth column.
• Using this notation, we may also use the notation aij
mxn to identify a matrix of order m x n, i.e. a matrix
having m rows (the number of rows is given first) and n
columns.
• Example: The following are examples of matrices
A= This is a 3 x 2 matrix
• Some of the above matrix elements are the followings:
a 11 = 1, a12 = 7, a21 = 5, a22 = 3, a31 =4 and a32 =2
This is a 4 x 3 matrix Elements X43 = 12 x32 = 7
Importance of matrices

• Matrices provide a most convenient vehicle for


organizing and storing large quantities of data.
• Matrices are used to represent complex systems
and operations by compact entities.
• In general, matrices are used:
• To handle large linear systems
• To solve complex linear equations
• An effective means for summarizing and
organizing voluminous data
2.2. Types of matrices
• Some frequently used matrices have special names.
• Column matrix. a matrix of one column but two or more
number of rows is known as a column matrix or a column
vector.
• Frequently, for such a matrix, only a single subscript is
used for the elements of the array.
• Row matrix, or a row vector is matrix which contains only a
single row and two or more columns. It is a 1xn matrix.
• Square matrix. is a matrix which has the same number of
rows and columns, i.e. m = n, is a square matrix or quadratic
matrix of order (n x n) or just of order n.
• The primary or prin­ciple diagonal of a square matrix consists
of the elements all. a22 • .•.• ann.
• Diagonal matrix:- is a square matrix in which all elements
except those of the principal diagonal are zero
• Unit or Identity matrix (I) is a square matrix in which all
elements of a diag­onal matrix are unity and all of the off
diagonal entries are zeros.
• The product of any given matrix and the identity matrix is
the given matrix it self.
• That is, A x I = A and I.A = A. Thus, the identity matrix
behaves in matrix multiplication like the number 1 in an
ordinary arithmetic.
• If all elements of a matrix are zero, aij = 0, the matrix is
called a null or zero matrix, O.
• A subclass of a square matrix which is frequently
encountered in circuit analysis is a symmetric matrix.
A = 2 -1 1 1 -1 4 2
1 0 -3 B = -1 3 0 C = -1
4 0 2 1
1 0 0
U= 0 1 0 W= [a11 a12 a13 . . . . A1n ]
0 0 1
• The matrices above are of orders (2 x 3) for A, (3 x 3) for
B and (3 x 1) for C. Matrix B is a square and symmetric
matrix, and matrix C is a column matrix or column vector.
• U is a unit matrix (also square, diagonal and symmetric).
• W is a row matrix or row vector.
• Matrix of the order (1 x 1), which consists of a single
element, is simply referred to as a scalar.
Matrix Equality

• Two matrixes are equal if and only if


i. They are of the same order, and
ii. Each element of one matrix is equal to its
associated (placed in the row of the same
number and the column of the same number)
element in the other matrix.
• Thus, for two matrices, A and B, of the same
order and with elements aij and bij respectively, if
A = B, then all the elements have to be equal, i.e.
aij= bij for all values of i and j.
for example, for the matrices A & B below
a11 a12 a13 b11 b12 b13
A = a21 a22 a23 B = b21 b22 b23
a31 a32 a33 b31 b32 b33
Matrix A & B to be equal,
a11 = b11, a12 = b12, a13 = b13
a21 = b21, a22 = b22, a23 = b23
a31 = b31, a32 = b32, a33 = b33
• A= is equal to B =

• A = is not equal to C =
• Because, even though they contain the same set of
numerical values, A and C are not equal because
their corresponding elements are not equal; that
is, a11 ≠ c11 and so on
2.3. Matrix Algebra

• Algebra - is a part of mathematics that deals with


operations (+, -, x ÷).
• Thus, matrix algebra is mathematical operation
performed on the matrix.
• As well, it is also called as matrix operation (the
application of mathematical operations like
addition, subtraction, multiplication and division
in matrices).
2.3.1 ADDITION AND SUBTRACTION OF MATRIXES

• If two matrices A and B are of the same order, that


have the same number of rows and the same number
of columns, we may determine their sum by adding
the corresponding elements.
• Thus if the elements of A are aij and those of B are
bij, then the elements of the resulting matrix C are
Cij = Aij + Bij for all i and j
and C = A + B
Clearly A + B = B + A for matrices.
• Note that if two matrices differ in their number of
rows or their number of columns, their sum is not
defined.
Computational rules for addition and rescaling of matrices

For matrices A; B; C 2 Rnm


1. A+B = B+A …………...(commutative addition)
2. A+(B+C) = (A+B)+C ...(associative addition)
3. A+ 0 = A …………....(addition identity element)
+ =

• Subtraction is similarly defined, i.e.


Cij = Aij - Bij for all i and j and C = A - B

- =

• To add or subtract two matrices A and B the same order,


i.e. have the same number of rows and the same number
of columns,
2.3.2. MULTIPLICATION OF MATRICES

• The general multiplication rule of any two


matrices A and B is defined only if the number of
columns of A is equal to the number of rows of B.
• If A is of order (m x n) and B is of order (n x p)
(such a pair of matrices is said to be conform­able
for multiplication), then the product AB is a matrix
C of order (m x p):
• In other words the number of columns of the first
matrix, A, has to be the same as the number of rows
of the second matrix, B.
• Note that if these two numbers (columns in the first
matrix and rows in the second matrix) are different,
the product matrix AB does not exist.
• There are 3 types of matrix multiplications. These are;
a. Scalar multiplication
b. Vector-by-Vector multiplication
c. Matrix by matrix multiplication
a) Matrix Multiplication by (Scalar Multiplication)
• A matrix can be multiplied by a constant by multiplying
each component in the matrix by a constant.
• The multiplication of a matrix by a scalar means that
every element of the matrix is multiplied by the scalar.
• Thus, if k is a scalar and A is a matrix with elements
ai}, the elements of the matrix kA are kai
1. Multiplication by A Scalar continues

• A real or complex number is referred to as a


scalar to distinguish it from a matrix.
ka11 ka12 . .ka13 . . . ka1n
KA = ka21 ka22 . . ka23 . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
kam1 kam2. .kam3 . .kamn
• Example: If A = [6 5 7],
Then 2A = [(2x6) (2x5) (2x7)]
Thus 2A = [12 10 14]
• Laws of Scalar Multiplication
• The operation of multiplying a matrix by a constant (a
scalar) has the following basic properties.
x and y are real numbers and A and B are matrix of
• If
mxn
1. XA = AX
2. (X+Y)A = XA+YA
3. X (A+B) = XA + XB
4. X (YA) = XY (A)
2. Vector-by-Vector multiplication

• In multiplying two vectors always a row vector


is written in the first position and the column
vector in the second position.
• Each component of a row vector is multiplied
by the corresponding component of the column
vector to obtain a result known as partial
product
• The sum of all partial products is called dot
product of two vectors, and this is a number not
a vector.
• In other words, Vector- by- Vector multiplication
results in a real number and not a matrix.
• Example: Consider the product (AB) of the following
row and column vectors.
• A= 3 4 -2 6 B=
• 3x2=6
• 4 x 5 = 20 partial products
• -2 x 7 =-14
• 6x0=0
12 Dot Product
c. Matrix by Matrix Multiplication

• If A and B are two matrices, the product AB is


defined if and only if the number of columns
in A is equal to the number of rows in B, i.e., if
A is an m x n matrix, B should be an n x b.
• Hence it is important to check dimensions
before starting the multiplication process.
• If this requirement is met, A is said to be
conformable to B for multiplication.
• The matrix resulting from the multiplication of
two matrix has dimensions equivalent to the
number of rows in A and the number of
columns in B.
• Matrix by matrix multiplication indicates a row by
column multiplication, where the entry in the ith row and
jth column of the product AB is obtained by multiplying
the entries in the ith row of A by the corresponding
entries in the jth column of B and then adding the results.
The process is going on as follows
• The first element in the raw is multiplied by the first
element in the column; the second element in the row is
multiplied by the second element in the column and so
on until the nth row element is multiplied by n th column
element.
• These products are then summed up to obtain the single
number that is the product of the two vectors.
• Multiplication of matrices is possible only if the number
of columns of the first equals the number of rows of the
second.
• If A is of dimension n x m and if B is of dimension m x
p, then the product A.B is of dimension n x p.
• X

• A.B = ((2x-1) + (3x0) + (4x5)), ((2x7) + (3x8) + (4x1)) =


18 42
= ((6x-1) + (9x0) + (7x5)), ((6x7) + (9x8) + (7x1))
=
29 121
• AB =
• The result for BA is different:
B.A = (-1x2) + (7x6) = 40 (-1×3) + (7×9) = 60
(-1×4) + (7×7) = 45
• = (0×2) + (8×6) = 48 (0×3) + (8×9) = 72 (0×4)
+ (8×7) = 56
• = (5×2) + (1×6) = 16 (5×3) + (1×9) = 24
(5×4) + (1×7) = 27

Special Properties of Matrix Multiplication
• The Associative and distributive laws of ordinary algebra
apply to matrix multiplication.
• Given three matrices A, B and C, which are conformable for
multiplication?
• A (BC) = (AB) C -- Associative law, not C (AB).
• A (B+C) = AB + AC -------------- Distributive law
• (A+B) C = AC + BC -------------- Distributive law
• The commutative law of multiplication does not apply to
matrix multiplication.
• For any two real numbers X and Y, the product XY is always
identical to the product YX. But for two matrices A and B, it
is not generally true that AB equals BA. (In the product AB,
we say that B is pre multiplied by A and that A is post
multiplied by B).
• The product of two matrices can be the zero
matrixes even though neither of the two matrices
themselves is zero matrix! Example.
• A= X =
2.4. The Multiplicative Inverse of a Matrix

• If A is a square matrix of order n, then a square


matrix of its inverse (A-1) of the same order n is said
to be the inverse of A, if and only if
AA-1 = I = A-1A
• Two square matrices are inverse of each other if
their product is the identity matrix: I = AA -1= A-1A
• Not all matrixes have an inverse. In order for a
matrix to have an inverse, the matrix must, first of
all, be a square matrix.
• Still not all square matrixes have inverse. If a
matrix has an inverse, it is said to be inevitable or
non-singular.
• A matrix that doesn’t have an inverse is said to be
singular.
• An inevitable matrix will have only one inverse;
that is, if a matrix does have an inverse, that
inverse is unique.
• Which means the matrix A cannot have two
different inverses. Suppose BA = I and also AC = I
. Then B = C
Finding the Inverse of a Matrix

• Let us begin by considering a tabular format where


the square matrix A is augmented with an identity
matrix of the same order, as [A I].
 Now we are trying to determine the inverse.
• We undergo a set of permissible row operations on the
augmented matrix [A I] to transform A on the left side
of the vertical line in to an identity matrix (I).
• If A/I is transformed by row operation in to I B , then
the resulting matrix B on the right is A-1.
• However, if we obtain all zero in one or more rows to
the left of the vertical line, then A -1does not exist.
• The allowable manipulations are called Elementary
Row Operations .
• These Elementary Row Operations are operations
permitted on the row of a matrix.
• In a matrix Algebra there are 3 types of row operations.
i. Any pair of row in a matrix may be interchanged
/Exchange operations/Interchanging rows/.
ii. A row can be multiplied by any non-zero real number
/Multiple operations/. The multiplication of any row
by a non-zero number.
iii. A multiple of any row can be added to any other
row /Add-A-Multiple operations/. But the multiplied
row never be changed / remains the same/
• The addition /subtraction of (a multiple of) one row
to/from) another row.
Basic Procedures to Find the Inverse of a Square Matrix
1. To get ones first in a column and next zeros
(within a given column)
2. To get zeros first in a matrix and next ones.
• One’s First: Try to set ones first in a column and
then zeros of the same column. Go from left to
right
• Zeros First: Find the off diagonal zeros first, and
following this obtain ones on the main diagonal.
Example
• Find M-1 given that M =
• Solution
• 1/3 R1 R1
multiply R1 by 4 and add the result on R2
• multiply R2 by 3/2 ¿
• Add 1/3 R2 on R1
• since the left side of the vertical line is
identity matrix, the operation is completed. Thus:
• M-1 =
Example 2
• Find A-1 given that A =
• Solution: Write the given matrix in augmented form
• multiply R1 by ½
• multiply R1 by 3 and add the result on R2
• since we have all zeros in the second row of the
matrix to the left of vertical bar, the invers of A does
not exist
Example 3
• Find M-1 given M =
• Solution: rewrite the matrix in augmented form
• multiply R1 by -1
• multiply R1 by -3 and add the result on R2
only R2 is changed
• multiply R1 by -4 and
add the result on R3
• multiply R2 by 1/8
multiply R2 by - 8 and
add the result on R3
• multiply R2 by 2 + R1
• multiply R3 by and ¼
• ¼ R3 + R1
1/8 R3 + R2
• Thus: M-1 =
• Matrix Determinant
• It is also possible to find the invers of a matrix
using determinate method. Determinant of a
matrix is a number which determines either the
matrix has an inverse or not.
2 x 2 matrix déterminant

• For any matrix which has 2 x 2 dimension, the


determinant is calculated as follows.
• First, we have to assign a, b, c, d for each element
in the matrix as
• Then, determinant of the matrix is denoted by
det(A) or /A/ and calculated by ad – bc.
• Example 1: Find the determinant of the matrix A
and B, if
• A=
Solution:

• (1x8) – (5x-2) = 8 + 10 = 18
• Det (A) = 18. Since the determinant of this matrix is
different from zero this matrix has an inverse.
• Exercise
• Calculate the determinant of the following 2x2
matrices : A = B=
Solution
A. (1 x -2) – (3 x 5) = -2 – 15 = /-17/ = 17
B. (-4 x 6) – (-2 x 12) = -24 – (-24) = -24 + 24 = 0
Det (B) = 0 . Since the determinant of this matrix is
zero this matrix has no inverse.
• Invers of A= =
• Example
• Find M-1 given that M =
• Find A-1 given that A =
3 x 3 matrix déterminant

• Before being able to evaluate the determinant of a


3X3 matrix (or all other matrices of a greater
dimension), you will first need to learn a few
concepts
Assignment 10%
• Find the invers of the following matrix using
determinants. Show and explain each steps
A=
2.5. Matrix Applications
• The inverse of the matrix is an important instrument in
order to solve linear equations and find the values of
variables in the equation.
• The following two examples illustrates how to solve
linear equations using the inverse of a matrix.
2.5.1. Solving Systems of Linear Equations n by n
systems
• Systems of linear equations can be solved using different
methods. Some are:
i. Inverse method
ii. Gaussian Method.
iii. Elimination method for 2 variable problems (equations).
iv. Cramer’s rule-using determinants (independent study)
i. Inverse Method

• To solve systems of linear equations using the


inverse method the coefficient matrix should be
inevitable, and it involves the following steps:
1. Put all equations in a matrix form (square
matrix form).
2. Find the inverse of the coefficient matrix.
3. Multiply the inverse with right hand side
values (vector of constants)
• The two linear equations of the system
a11x1 + a12x2 = b1
a21x1 + a 22x2 = b2
Can be represented by the matrix equation AX = B where
A= is called the Coefficient matrix,

X = is the solution vector, or vectors of unknowns

B= is called the vectors of constant.


• x =
• represents a solution of the system if both
equations are satisfied when we substitute x 1 = n1
and x2 = n2.
• The following two examples illustrates how to
solve linear equations using the inverse of a
matrix.
• Example 1: Find the value of X, Y,
x – 3y = 3
x + 2y = 8
• Solution
• After we get the inverse of the matrix, if we
multiply the inverse with the product matrix we
will get the values of x and y.
• The matrix form of the above equations is

x =
• Here our intention is to change the left matrix in
to identity matrix
• since row one column one is 1 we just put it
as it is
• -R1 + R2
• 1/5 R2 to change 5 to 1
• 3R2 + R1 =

• Now the left side is changed to identity matrix
then our result is x = 6 and y = 1. This value is
correct because we have already proved above.
Assignment 10%
Find the values of X, Y, and Z using the application
of inverse method

3X – 6Y + 3Z = 11
2Z + Y – Z = 2
5X – 5Y + 2Z = 6

You might also like