Uploaded by PSALMER JAMES BETIS

LECTURE WEEK 3 Review of Matrices

ME 404
ADVANCE MATHEMATICS
FOR ME
Engr. Zedric Rei C. Canicon
Lecturer
©2023
1
Batangas State University
Matrices: Review,
Operations & Vectors
©2022 Batangas State University
Matrix
Matrix is a rectangular array of real numbers arranged in “m” rows and “n”
columns. The term “matrix” was introduced by the English mathematician James
Joseph Sylvester (1814- 1897) in 1850.
The size of a matrix is determined by the number of rows and columns. The
expression "m x n" is the dimension or order of the matrix. If the matrix has only one
column, it is called a column matrix and if it has only one row, it is called a row
matrix. The following is a 3 x 3 matrix or square matrix (i.e. 3 rows and 3 columns).
©2023 Batangas State University
3
Engr. Zedric Rei C. Canicon
Matrix
A matrix is called by m x n matrix where m is designated as row and n as
column (note: rows always come first). The size of matrix is determined by the m x n
matrix.
©2023 Batangas State University
4
Engr. Zedric Rei C. Canicon
Matrix
A matrix is a rectangular array of numbers or functions enclosed in brackets.
The numbers (or functions) are called entries or, less commonly, elements of the
matrix.
©2023 Batangas State University
5
Engr. Zedric Rei C. Canicon
Matrix
1
23
55 −6
1/2 3
4
12
−7
©2023 Batangas State University
6
Engr. Zedric Rei C. Canicon
Matrix
1
23
55 −6
1/2 3
4
12
−7
SQUARE MATRIX
©2023 Batangas State University
7
Engr. Zedric Rei C. Canicon
Matrix
1
23
55 −6
1/2 3
4
12
−7
LEADING ENTRY
©2023 Batangas State University
8
Engr. Zedric Rei C. Canicon
Matrix
1
23
55 −6
1/2 3
4
12
−7
DIAGONAL ENTRIES
©2023 Batangas State University
9
Engr. Zedric Rei C. Canicon
Matrix
1
0
55 −6
1/2 3
0
0
−7
LOWER TRIANGULAR
MATRIX
©2023 Batangas State University
10
Engr. Zedric Rei C. Canicon
Matrix
1 23
0 −6
0 0
4
12
−7
UPPER TRIANGULAR
MATRIX
©2023 Batangas State University
11
Engr. Zedric Rei C. Canicon
Vectors
A vector is a matrix with only one row or column. Its entries are called the
components of the vector. A row vector is of the form
A column vector is of the form
©2023 Batangas State University
12
Engr. Zedric Rei C. Canicon
Matrix
1 0
0 −6
0 0
0
0
−7
DIAGONAL MATRIX
©2023 Batangas State University
13
Engr. Zedric Rei C. Canicon
Operations on Matrix
Addition/ Subtraction of Matrices
Matrices having the same number of rows and columns are added by adding
corresponding elements. Thus, for all m x n matrices A and B as example, their sum 𝐴 +
𝐡 is a matrix 𝐢 = 𝑐𝑖𝑗 such that π‘Žπ‘–π‘— + 𝑏𝑖𝑗 = 𝑐𝑖𝑗 , for 𝑖 = 1,2, … , π‘š and 𝑗 = 1,2, … , 𝑛.
Since the sum of A and B is itself an m x n matrix, it is said that the set of all m x n
matrices is closed under matrix addition. Addition of matrices of different sizes is undefined.
©2023 Batangas State University
14
Engr. Zedric Rei C. Canicon
Operations on Matrix
Example 1:
If 𝐴 =
−4
0
6 3
5
and 𝐡 =
1 2
3
−1 0
, what is the value of 𝐴 + 𝐡 ?
1 0
Solution:
𝐴+𝐡 =
−4 + 5 6 + (−1) 3 + 0
0+3
1+1
2+0
𝟏
πŸ“
πŸ‘
𝑨+𝑩=
πŸ‘ 𝟐 𝟐
©2023 Batangas State University
15
Engr. Zedric Rei C. Canicon
Operations on Matrix
Example 2:
16 21 −3
5 −1 0
If 𝐢 = 8 −10 6 and 𝐷 = 3 1
0 , what is the value of 𝐢 + 𝐷 ?
16 10
2
8 −7 −7
Solution:
16 + 5 21 + −1
−3 + 0
𝐢+𝐷 = 8 + 3
−10 + 1
6+0
16 + 8 10 + (−7) 2 + (−7)
𝟐𝟏 𝟐𝟎 −πŸ‘
π‘ͺ + 𝑫 = 𝟏𝟏 −πŸ— πŸ”
πŸπŸ’ πŸ‘ −πŸ“
©2023 Batangas State University
16
Engr. Zedric Rei C. Canicon
Operations on Matrix
Example 3:
−4 6
If 𝐴 =
0 1
5
3
and 𝐷 = 3
2
8
−1 0
1
0 , what is the value of 𝐴 + 𝐷 ?
−7 −7
Solution:
Matrices to be solved do not have the same order/size of matrix that is why
the operation cannot be performed.
©2023 Batangas State University
17
Engr. Zedric Rei C. Canicon
Operations on Matrix
Scalar Multiplication of Matrices
The product of any π‘š π‘₯ 𝑛 matrix A = π‘Žπ‘–π‘— and any scalar c (number c) is
written cA and is the m x n matrix cA = π‘π‘Žπ‘–π‘— obtained by multiplying each entry of
A by c.
-1A is simply written as –A and is called the negative of A. Similarly, (-k)A is
written as –kA. Also, A+(-B) is written as A-B and is called the difference of A and
B and must have the same size.
©2023 Batangas State University
18
Engr. Zedric Rei C. Canicon
Operations on Matrix
Example 3:
2.7 −1.8
If 𝐴 = 0
0.9 , find the value of the following:
9.0 −4.5
a. -A
b.
10
𝐴
9
c. 0A
Solution:
2.7 −1.8
−2.7 1.8
a. 𝐴 = 0
0.9 then− 𝐴 = 0
−0.9
9.0 −4.5
−9.0 4.5
©2023 Batangas State University
19
Engr. Zedric Rei C. Canicon
Operations on Matrix
Example 3:
2.7 −1.8
If 𝐴 = 0
0.9 , find the value of the following:
9.0 −4.5
a. -A
b.
10
𝐴
9
c. 0A
Solution:
2.7 −1.8
10
b. 𝐴 = 0
then
𝐴=
0.9
9
9.0 −4.5
10
× 2.7
9
10
×0
9
10
× 9.0
9
10
× −1.8
9
10
𝟏𝟎
× 0.9 . 𝑨
9
πŸ—
10
× −4.5
9
©2023 Batangas State University
20
Engr. Zedric Rei C. Canicon
πŸ‘ −𝟐
= 𝟎 𝟏
𝟏𝟎 −πŸ“
Operations on Matrix
Example 3:
2.7 −1.8
If 𝐴 = 0
0.9 , find the value of the following:
9.0 −4.5
a. -A
b.
10
𝐴
9
Solution:
2.7 −1.8
𝟎
a. 𝐴 = 0
0.9 then 𝟎 𝑨 = 𝟎
9.0 −4.5
𝟎
c. 0A
𝟎
𝟎
𝟎
©2023 Batangas State University
21
Engr. Zedric Rei C. Canicon
Operations on Matrix
Rules for Matrix Addition and Scalar Multiplication
From the familiar laws for the addition of numbers, we obtain similar laws for
the addition of matrices of the same size m x n, namely,
Here 0 denotes the zero matrix of (size m x n), that is, the m x n matrix with
all entries zero. If m=1 or n=1, this a vector, called a zero vector.
©2023 Batangas State University
22
Engr. Zedric Rei C. Canicon
Operations on Matrix
Hence matrix addition is commutative and associative. Similarly, for scalar
multiplication we obtain rules
©2023 Batangas State University
23
Engr. Zedric Rei C. Canicon
Operations on Matrix
Matrix Multiplication
The product C = AB (in this order) of an m x n matrix A = π‘Žπ‘—π‘˜ multiplied by
an r x p matrix B = π‘π‘—π‘˜ is defined if and only if r = n and is then the m x p matrix C =
π‘π‘—π‘˜ with entries
©2023 Batangas State University
24
Engr. Zedric Rei C. Canicon
Operations on Matrix
Matrix Multiplication
The condition r = n means that the second factor, B, must have as many rows
as the first factor has columns, namely n. A diagram of sizes that shows when
matrix multiplication is possible is as follows:
©2023 Batangas State University
25
Engr. Zedric Rei C. Canicon
Operations on Matrix
The entry π‘π‘—π‘˜ is obtained by multiplying each entry in the jth row of A by the
corresponding entry in the kth column of B and then adding these n products.
For instance, 𝑐21 = π‘Ž21 𝑏11 + π‘Ž22 𝑏11 + β‹― + π‘Ž2𝑛 𝑏𝑛1 , and so on. One calls this
briefly a multiplication of rows into columns. For n = 3, this is illustrated by
©2023 Batangas State University
26
Engr. Zedric Rei C. Canicon
Operations on Matrix
Example 1: Multiplication of Matrix and Vector
Find Matrix AB and BA.
4 2
𝐴=
1 8
3
𝐡=
5
©2023 Batangas State University
27
Engr. Zedric Rei C. Canicon
Operations on Matrix
Example 2:
Find Matrix AB as A x B = AB
3
5 −1
𝐴= 4
0
2
−6 −3 2
2 −2 3
𝐡= 5 0 7
9 −4 1
©2023 Batangas State University
28
Engr. Zedric Rei C. Canicon
1
8
1
Operations on Matrix
Matrix Multiplication Rules
provided A, B, and C are such that the expressions on the left are
defined; here, k is any scalar. (b) is called the associative law. (c) and (d)
are called the distributive laws.
©2023 Batangas State University
29
Engr. Zedric Rei C. Canicon
Operations on Matrix
Transpose Matrix
If matrix A is reflected in its main diagonal, so that all rows become
columns and all columns become rows without changing their relative
order of entries in the rows and columns, the result is a transpose
matrix, AT.
©2023 Batangas State University
30
Engr. Zedric Rei C. Canicon
Operations on Matrix
Example 1:
©2023 Batangas State University
31
Engr. Zedric Rei C. Canicon
Operations on Matrix
Example 2:
©2023 Batangas State University
32
Engr. Zedric Rei C. Canicon
Operations on Matrix
Example 3:
Find the transpose of Matrix Z.
5
16
33 21
𝑍=
−2 −50
8
0.5
15
4
0
−4/5
Solution:
5
𝑍 𝑇 = 16
15
33
21
4
−2
8
−50
0.5
0
−4/5
©2023 Batangas State University
33
Engr. Zedric Rei C. Canicon
Operations on Matrix
Rules for Transposition:
©2023 Batangas State University
34
Engr. Zedric Rei C. Canicon
Operations on Matrix
Example: Application of Matrix Multiplication
Supercomp Ltd produces two computer models PC1086 and PC1186. The matrix A shows
the cost per computer (in thousands of dollars) and B the production figures for the year 2010 (in
multiples of 10,000 units.) Find a matrix C that shows the shareholders the cost per quarter (in
millions of dollars) for raw material, labor, and miscellaneous.
©2023 Batangas State University
35
Engr. Zedric Rei C. Canicon
Operations on Matrix
Special Matrices
Symmetric matrices are square matrices whose transpose equals the
matrix itself. Skew-symmetric matrices are square matrices whose
transpose equals minus the matrix.
©2023 Batangas State University
36
Engr. Zedric Rei C. Canicon
Operations on Matrix
©2023 Batangas State University
37
Engr. Zedric Rei C. Canicon
Operations on Matrix
©2023 Batangas State University
38
Engr. Zedric Rei C. Canicon
Operations on Matrix
Special Matrices
Scalar matrix is a diagonal matrix whose elements main diagonal are
the same.
3 0
0 3
0 0
0
0
3
©2023 Batangas State University
39
Engr. Zedric Rei C. Canicon
Operations on Matrix
Special Matrices
Identity matrix is a diagonal matrix whose elements main diagonal are
all 1.
1 0
0 1
0 0
0
0
1
©2023 Batangas State University
40
Engr. Zedric Rei C. Canicon
Operations on Matrix
Special Matrices
Trace of matrix is the sum of the entries of main diagonal of a square
matrix.
1
23 4
55 −6 12
1/2 3 −7
©2023 Batangas State University
41
Engr. Zedric Rei C. Canicon
Operations on Matrix
Given with matrices, solve the following operations.
1
𝑍 = 55
1/2
1
𝐸=
3
a. 𝑍𝐸
23 4
−6 12
3 −7
7 0
5 0
7
0
5
0
𝐷=
−4
−7
−2 −1/2
15 3 1 12
π‘Œ=
3 −8 0 1
b. 3𝐷 − 2 π‘Œ 𝑇
c.𝐸𝑍 𝑇
©2023 Batangas State University
42
Engr. Zedric Rei C. Canicon