You are on page 1of 25

MATRICES

 A matrix is a group of numbers(elements) that are arranged in rows and columns. In


general, an m × n matrix is a rectangular array of mn numbers (or elements) arranged in m
rows and n columns. If m = n the matrix is called a square matrix. For example a 2×2 matrix
is

and an 3 × 3 matrix is

 Generally, we use bold phase letter, like A, to denote a matrix, and lower case letters with
subscripts, like 𝑎 , to denote element of a matrix. Here 𝑎 would be the element at 𝑖 row
and 𝑗 column. So 𝑎 is an element at 1st row and column. Sometime we use the
abbreviation A = (𝑎 ) for a matrix with elements 𝑎 .
NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020
MATRICES
Vectors and Matrices

 SPECIAL MATRICES

 1. Column Vector or Row Vector


 Column vector or column matrix is a matrix with only one column and m rows
(mx1).
 For example, the 4x1 matrix
−3
4
 A= is a column vector.
8
0
 Row vector or row matrix is a matrix with only 1 row and n columns (1xn). The
(1x3) matrix below is an example of row vector.
 B = −1 5 − 7

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Vectors and Matrices

2. Null matrix
This matrix also known as zero matrix is a matrix whose elements are equal to
zero.
0 0
A=
0 0
3. Square Matrix
A matrix with equal umber of rows and columns is called a square matrix. A
square matrix of size n x n is also called a matrix of order n.
7 1 2
A= 5 4 8
3 6 10

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Vectors and Matrices

4. Identity matrix
A square matrix is called an identity matrix if all its diagonal elements are equal
to 1 and all its off-diagonal elements are equal to 0.

5. Diagonal Matrix
A diagonal matrix is a square matrix in which every element not on the principal
diagonal is zero and whose diagonal elements can take any value.
7 0 0
A= 0 4 0
0 0 3
NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020
MATRICES
Vectors and Matrices
6. Scalar matrix
Scalar matrix is a diagonal matrix where all entries along the principal diagonal are all equal, that
is, 𝑎 = 𝑎 = 𝑎 .
4 0 0
Let A = 0 4 0
0 0 4
be a scalar matrix of order 3. The matrix can also be written as 4I where I is identity matrix.
7. Symmetric Matric
A square matrix in which the corresponding off-diagonal elements are equal, that is 𝑎 = 𝑎 for all I
and j is called a symmetric matrix.
1 5 3 4
A= 5 6 7 9
3 7 2 3
4 9 3 5 NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020
MATRICES
Vectors and Matrices
8. Transpose Matrix
Let A = (𝑎 ) be am x n matrix. The transpose of A by 𝐴 is defined by 𝐴 = (𝑎 ) where the
corresponding rows and columns of A are interchanged.

3 −1
0 8 3 0 6 −2
A= The transpose of A is a 2 x 4 matrix 𝐴 where 𝐴 =
6 5 −1 8 5 3
−2 3

10. Inverse Matrix


Let A and B be square matrices. The matrix B is called the inverse of A if and only if the
product of A and B is the identity matrix, that is AB = BA.

*Examples will be discuss on the following chapter


NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020
MATRICES
Vectors and Matrices

9. Singular Matrix
A square matrix having no inverse is called a singular matrix. Thus a square
matrix for which the inverse exists is called nonsingular matrix.

*Examples will be discuss on the following chapter

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Vectors and Matrices
 Examples:

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Vectors and Matrices

 Examples:

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Vectors and Matrices

 Examples:

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Matrix Operations

Matrix Addition/Subtraction
Consider the following properties:
Two matrices are conformable with respect to addition if they have the same
dimensions
A. The sum of two matrices A and B which are conformable with respect to
addition is a matrix whose elements are sum of corresponding elements of A and
B.
B. Addition of matrices is commutative A+B = B+A.
C. Addition of matrices of associative A+(B+C) = (A+B)+C = (A+C)+B

Note that the above properties are also true for matrix subtraction. The addition
of conformable matrices A and B is summarized by
A+B =C= (𝐶 ) = (𝑎 + 𝑏 )

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Matrix Operations

 Examples(Matrix Addition/Subtraction):
 1.)

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Matrix Operations
Examples(Matrix Addition/Subtraction):
2.) Given the Matrices
3 2 −2 1 −2 0
A = 4 −1 2 and B = 2 1 −1
−2 0 1 1 3 2

Find A + 𝐵 .

Solution:The transpose of matrix B is a 3 x3 matrix 𝐵 where


1 2 1
𝐵 = −2 1 3
0 −1 2
3 2 −2 1 2 1 3+1 2 + 2 −2 + 1 4 4 −1
A + 𝐵 = 4 −1 2 + −2 1 3 = 4 ± 2 −1 + 1 2 + 3 = 2 0 5
−2 0 1 0 −1 2 −2 + 0 0 ± 1 1+2 −2 −1 3

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Matrix Operations

Examples(Matrix Addition/Subtraction):

3.) Given the Matrices


7 3 −3 0
A= 5 9 and B = 8 1
11 −2 −3 −4

Find A-B.
7 3 −3 0 7 − (−3) 3−0 10 3
A-B = 5 9 - 8 1 = 5−8 9−1 = −3 8
11 −2 −3 −4 11 − (−3) −2 − (−4) 14 2

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Matrix Operations

 Matrix Multiplication
• Not all matrices can be multiplied together, just as not all
matrices can be added
• The ability to multiply is dependent on the order of the
matrices
• If has order × ( rows and columns) and has order
× ( rows and columns), we can multiply × only if = .
The resultant matrix will have order ×
• We say the product is undefined if the matrices cannot be
multiplied
NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020
MATRICES
Matrix Operations

 Matrix Multiplication Requirements


• That is, to multiply two matrices with orders

• Note that × might be defined, but × undefined.


• Another way to say if multiplication is possible is: “The number
of columns in the first matrix must be equal to the number of
rows in the second matrix”
NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020
MATRICES
Matrix Operations

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Matrix Operations

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Matrix Operations

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Matrix Operations

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Matrix Operations
How to multiply matrices
Rule: Let 𝐴 and 𝐵 be matrices whose product, 𝐴 × 𝐵, is defined as 𝐶.
To calculate the value of element 𝑐 , ,we combine the 𝑖 row of matrix 𝐴 and the 𝑗 column of
matrix 𝐵.

 A combination of the 2nd row of 𝐴 and the 1st column of


 𝐵 gives the element in the 2nd row and 1st column of 𝐶.

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Matrix Operations
 How do we actually combine the elements of the row and column?

• Consider both the row and column as a list of numbers


• Multiply the corresponding elements in each list together
• Add the results of these products together

 Example:

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Matrix Operations
 EXAMPLE:

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Matrix Operations

Matrix Product Applications

Kathrin’s meryenda sells for Banana cue for 10.40Php, Tokneneng for 11.50Php and
Puto pao for 6.00Php.

This is represented with the cost matrix

Her sales of those three items over one week are represented in a matrix, where each column represents a
weekday, and each row represents a menu item.

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020


MATRICES
Matrix Operations

Matrix Product Applications cont.

 Write a matrix product to calculate the amount of money


made each day, and calculate the product:

NUMERICAL SOLUTIONS FOR CIVIL ENGINEERS 2020

You might also like