Beruflich Dokumente
Kultur Dokumente
of Structures
Prepared by:
Engr. Kenny B. Cantila
Matrix – is a rectangular array of quantities arranged in rows and
columns. A matrix with m rows and n columns can be expressed as
follows.
Order of matrix is the size of a matrix that is measured by the number of its
rows and columns (m x n).
Types of Matrix
Vectors are a special type of matrix which have only one column or one row.
Column Vector – a matrix with all its elements are arranged in a single
column.
x1
x2
𝐂= C = ⋮ (i = 1,2, … , n)
xn
Row Vector – a matrix with all its elements arranged in a single row.
𝐑 = R = y1 y2 ⋯ yn (j = 1,2, … , n)
Types of Matrix (cont’d)
𝐢 = 𝐢𝟏 𝟐 + 𝐢𝟐 𝟐 + ⋯ 𝐢𝐧 𝟐 = 1
Square Matrix – is a matrix which has the same number of rows and
columns, that is, m = n.
Diagonal matrix - is a square matrix with all elements equal to zero except
the elements on the major diagonal, which is the left-to-right downward-
sloping line of elements from a11 to a33.
a11 0 0
𝐃= D = 0 a22 0
0 0 a33
1 0 0
𝐈= I = 0 1 0
0 0 1
Types of Matrix (cont’d)
Upper triangular matrix - has all zero elements below the major diagonal.
Lower triangular matrix - has all zero elements above the major diagonal.
a11 0 0
𝐋 = L = a21 a22 0
a31 a32 a33
Types of Matrix (cont’d)
0 0 0
𝐎= O = 0 0 0
0 0 0
𝑎11 𝑎12 0 0 0
𝑎21 𝑎22 𝑎23 0 0
𝐓= T = 0 𝑎32 𝑎33 𝑎34 0
0 0 𝑎43 𝑎44 𝑎45
0 0 0 𝑎54 𝑎55
Types of Matrix (cont’d)
Banded Matrix – has all zero elements except along particular diagonals.
Sparse matrix is one in which most of the elements are zero. Most large
matrices arising in the solution of ordinary and partial differential equations
are sparse matrices.
Matrix Algebra
Matrix Algebra
𝐀 + 𝐁 + 𝐂 = (𝐀 + 𝐁) + 𝐂
𝐀+𝐁=𝐁+𝐀
Example: Add the following matrices.
1 2 3 3 2 1
𝐀= 2 1 4 𝐁 = −4 1 2
1 4 3 2 3 −1
(1 + 3) (2 + 2) (3 + 1) 4 4 4
𝐀 + 𝐁 = (2 − 4) (1 + 1) (4 + 2) = −2 2 6
(1 + 2) (4 + 3) (3 − 1) 3 7 2
Matrix multiplication consists of row-element to column-element
multiplication and summation of the resulting products.
Multiplication of the two matrices A and B is defined only when the number
of columns of matrix A is the same as the number of rows of matrix B.
Matrices that satisfy this condition are called conformable in the order AB.
Thus, if the size of matrix A is n x m and the size of matrix B is m x r, then
the size of matrix C is n x r. Matrices that are not conformable cannot be
multiplied.
𝐀𝐁 ≠ 𝐁𝐀
Matrix Multiplication Example
1 2 3 2 1
𝐀= 2 1 4 𝐁= 1 2
1 4 3 2 1
3 7 −2
𝐀= 0 8 1
12 −4 10
3 7 −2
𝐁 = c𝐀 = −𝟔 0 8 1
12 −4 10
2 −4
𝐁 = −5 8
1 3
2 −5 1
𝐁𝐓 =
−4 8 3
Properties of a Matrix
A, B, C are matrices A′ ′
=A AI = IA = A
′
A' is the transpose of matrix A A+B = A′ + B′ AA−1 = A−1 A = I
-1 ′ = B ′ A′
A is the inverse of matrix A AB A−1 −1 = A
′
𝐈 is the identity matrix ABC = C′B ′ A′ AB −1 = B −1 A−1
x is a real number ABC −1 = C −1 B −1 A−1
A−1 −1 = A−1 −1
9 −5
6 −1 10
𝐀 = 2 1 𝐁=
−2 7 5
−3 4
6 −2
9 2 −3
𝐀′ = 𝐁 ′ = −1 7
−5 1 4
10 5
9 −5
6 −1 10
𝐀𝐁 = 2 1
−2 7 5
−3 4
64 −44 65
𝐀𝐁 = 10 5 25
−26 31 −10
64 10 −26
(𝐀𝐁)′ = −44 5 31
65 25 −10
6 −2
9 2 −3
𝐁 ′ 𝐀′ = −1 7
−5 1 4
10 5
Properties of a Matrix (cont’d)
6 −2
9 2 −3
𝐁 ′ 𝐀′ = −1 7
−5 1 4
10 5
64 10 −26
𝐁 ′ 𝐀′ = −44 5 31
65 25 −10
Determinants
Determinants are mathematical objects that are very useful in the analysis
and solution of systems of linear equations. It is a quantity obtained by the
addition of products of the elements of a square matrix according to a given
rule.
The determinant of 3 x 3 matrix is the sum of the first three triple products
minus the sum of the last three triple products.
𝑎11 𝑎12 𝑎13 𝑎11 𝑎12
A = 𝑎21 𝑎22 𝑎23 𝑎21 𝑎22
𝑎31 𝑎32 𝑎33 𝑎31 𝑎32
𝐝𝐞𝐭 𝐀 = A = 𝑎11 𝑎22 𝑎33 + 𝑎12 𝑎23 𝑎31 + 𝑎13 𝑎21 𝑎32 −
*𝑎13 𝑎22 𝑎31 + 𝑎11 𝑎23 𝑎32 + 𝑎12 𝑎21 𝑎33 +
𝐝𝐞𝐭 𝐀 = A = −1 i+j a
i,j Mij
i=1
Determinants by Co-factor Method
80 −20 −20
A = −20 40 −20
−20 −20 130
det A = A
= 400,000 − 100,000
= 300,000
Determinant by Co-factor Method (3x3 Matrix)
80 −20 −20
A = −20 40 −20
−20 −20 130
𝐝𝐞𝐭 𝐀 = A
= 300,000
Determinant by Co-factor Method (4x4 Matrix)
1 4 2 3
𝐀= 0 1 4 4
−1 0 1 0
2 0 4 1
1 4 4 0 4 4 0 1 4 0 1 4
𝑨=1 0 1 0 − 4 −1 1 0 + 2 −1 0 0 − 3 −1 0 1
0 4 1 2 4 1 2 0 1 2 0 4
1 4 4 0 4 4 0 1 4 0 1 4
𝐀=1 0 1 0 − 4 −1 1 0 + 2 −1 0 0 − 3 −1 0 1
0 4 1 2 4 1 2 0 1 2 0 4
det A = A
=1 1 1 1 − 0 4 − 4 0 1 − 0 0 + 4 0 4 − 1 0 −
4 0 1 1 − 0 4 − 4 −1 1 − 0 2 + 4 −1 4 − 1 2 +
2 0 0 1 − 0 0 − 1 −1 1 − 0 2 + 4 −1 0 − 0 2 −
3 0 0 4 − 1 0 − 1 −1 4 − 1 2 + 4 −1 0 − 0 2
= 1 − −80 + 2 − 18
= 𝟔𝟓
Notes on Determinant
Cramer’s Rule
Gauss Elimination
Gauss-Jordan Method
Substitution and Elimination
x + y + z = 0 (Eq. 1)
2x − y + z = −1 (Eq. 2)
− x + 3y − z = −8 (Eq. 3)
x + y + z = 0
+ (−x + 3y − z = −8)
4y = −8
𝐲 = −𝟐
Substitution and Elimination
x + y + z = 0
− (2x − y + z = −1)
−x + 2y = 1
−x + 2(−2) = 0
𝐱 = −𝟓
−5 + (−2) + z = 0
𝐳 = 𝟕
Cramer’s Rule for Systems in two Variables
a1 x + b1 y = L
a2 x + b2 y = M
a1 b1
D= = a1 b2 − b1 a2
a2 b2
L b1
Dx = = Lb2 − Mb1
M b2
a1 L
Dy = = a1 M − La2
a2 M
3x − 2y = 9 3 −2 𝑥 9
=
−x + 3y = 3 −1 3 𝑦 3
3 −2
D= = 3 3 − , −2 −1 - = 𝟕
−1 3
9 −2
Dx = = 9 3 − −2 3 = 𝟑𝟑
3 3
3 9
Dy = = 3 3 − 9 −1 = 𝟏𝟖
−1 3
Dx 𝟑𝟑 Dy 𝟏𝟖
x= = y= =
D 𝟕 D 𝟕
Cramer’s Rule for Systems in Three Variables
a1 x + b1 y + c1 z = K
a2 x + b2 y + c2 z = L
a3 x + b3 y + c3 z = M
Let:
a1 b1 c1 K b1 c1
D = a2 b2 c2 Dx = L b2 c2
a3 b3 c3 M b3 c3
a1 K c1 a1 b1 K
Dy = a2 L c2 Dz = a2 b2 L
a3 M c3 a3 b3 M
Dx Dy Dz
x= y= z=
D D D
Cramer’s Rule for Systems in Three Variables
x + y + z = 0 1 1 1 𝑥 0
2x − y + z = −1 2 −1 1 𝑦 = −1
−x + 3y − z = −8 −1 3 −1 𝑧 −8
1 1 1 1 1
D = 2 −1 1 2 −1
−1 3 −1 −1 3
D = * 1 −1 −1 + (1) 1 −1 + 1 2 3 + −
* 1 −1 −1 + (1) 1 3 + 1 2 −1 +
𝐃=𝟒
Cramer’s Rule for Systems in Three Variables
0 1 1 0 1
Dx = −1 −1 1 −1 −1
−8 3 −1 −8 3
Dx = * 0 −1 −1 + (1) 1 −8 + 1 −1 3 + −
* 1 −1 −8 + (0) 1 3 + 1 −1 −1 +
𝐃𝐱 = −𝟐𝟎
1 0 1 1 0
Dy = 2 −1 1 2 −1
−1 −8 −1 −1 −8
Dy = * 1 −1 −1 + (0) 1 −1 + 1 2 −8 + −
* 1 −1 −1 + (1) 1 −8 + 0 2 −1 +
𝐃𝐲 = −𝟖
Cramer’s Rule for Systems in Three Variables
1 1 0 1 1
Dz = 2 −1 −1 2 −1
−1 3 −8 −1 3
Dz = * 1 −1 −8 + (1) −1 −1 + 0 2 3 + −
* 0 −1 −1 + (1) −1 3 + 1 2 −8 +
𝐃𝐳 = 𝟐𝟖
Dx −20
x= = = −𝟓
D 4
Dy −8
y= = = −𝟐
D 4
Dz 28
z= = = 𝟕
D 4
Gauss Elimination and Substitution
Gauss Elimination
x + y + z = 0
2x − y + z = −1
−x + 3y − z = −8
In matrix form:
1 1 1 𝑥 0 → R1
2 −1 1 𝑦 = −1 → R2
−1 3 −1 𝑧 −8 → R3
Gauss Elimination (cont’d)
Forward Elimination
1 1 1 = 𝑥 = 0 a1 1 1 1 = 𝑥 = 0
− R 2 + R1
a2
2 −1 1 = 𝑦 = −1 0 3/2 1/2 = 𝑦 = 1/2
a1
− R 3 + R1
a3
−1 3 −1 = 𝑧 = −8 0 4 0 = 𝑧 = −8
Step 2: Make b3 = 0
1 1 1 = 𝑥 = 0 1 1 1 = 𝑥 = 0
Backward Substitution
3 1 1
1 7 𝑦 + 𝑧 = 𝑥+𝑦+𝑧 =0
𝑧= 2 2 2 𝑥 = −𝑦 − 𝑧
2 2 3 1 1
𝒛=𝟕 𝑦 + 7 = 𝑥 = −(−2) − (7)
2 2 2
𝒚 = −𝟐 𝒙 = −𝟓
Gauss-Jordan Method
Gauss-Jordan Method
x + y + z = 0
2x − y + z = −1
−x + 3y − z = −8
In matrix form:
1 1 1 𝑥 0 → R1
2 −1 1 𝑦 = −1 → R2
−1 3 −1 𝑧 −8 → R3
Gauss-Jordan Method (cont’d)
1 1 1 = 𝑥 = 0 a1 1 1 1 = 𝑥 = 0
− R 2 + R1
a2
2 −1 1 = 𝑦 = −1 0 3/2 1/2 = 𝑦 = 1/2
a1
− R 3 + R1
a3
−1 3 −1 = 𝑧 = −8 0 4 0 = 𝑧 = −8
Step 2: Make b3 = 0
1 1 1 = 𝑥 = 0 1 1 1 = 𝑥 = 0
1 1 1 = 𝑥 = 0 R2 1 1 1 = 𝑥 = 0
b2
0 3/2 1/2 = 𝑦 = 1/2 0 1 1/3 = 𝑦 = 1/3
R3
c3
0 0 1/2 = 𝑧 = 7/2 0 0 1 = 𝑧 = 7
c1
− R 3 + R1
c3
1 1 1 = 𝑥 = 0 1 1 0 = 𝑥 = −7
0 1 1/3 = 𝑦 = 1/3 c2 0 1 0 = 𝑦 = −2
− R3 + R2
c3
0 0 1 = 𝑧 = 7 0 0 1 = 𝑧 = 7
Gauss-Jordan Method (cont’d)
Step 5: Make b1 =0
b1
− R + R1
b2 2
1 1 0 = 𝑥 = −7 1 0 0 = 𝑥 = −𝟓
0 1 0 = 𝑦 = −2 0 1 0 = 𝑦 = −𝟐
0 0 1 = 𝑧 = 7 0 0 1 = 𝑧 = 𝟕
Inverse of a Matrix
1 2 3
M= 0 1 4
5 6 0
1 0 5
MT = 2 1 6
3 4 0
1 0 5 1 0
𝐝𝐞𝐭(𝐌 𝐓 ) = 2 1 6 2 1
3 4 0 3 4
𝐝𝐞𝐭(𝐌 𝐓 ) = * 1 1 0 + (0) 6 3 + 5 2 4 + −
* 5 1 3 + (1) 6 4 + 0 2 0 +
𝐝𝐞𝐭(𝐌 𝐓 ) = 𝟏
Inverse of a Matrix (cont’d)
1 2 3
M= 0 1 4
5 6 0
1 4 2 3 2 3
M11 = = −24 M21 = = −18 M31 = =5
6 0 6 0 1 4
0 4 1 3 1 3
M12 = = −20 M22 = = −15 M32 = =4
5 0 5 0 0 4
0 1 1 2 1 2
M13 = = −5 M23 = = −4 M33 = =1
5 6 5 6 0 1
http://www.wikihow.com/Find-the-Inverse-of-a-3x3-Matrix
Inverse of a Matrix (cont’d)
1
M −1 = ∙ adj(M 𝑇)
det(M 𝑇 )
1 −24 18 5
M −1 = ∙ 20 −15 −4
1
−5 4 1
−24 18 5
M −1 = 20 −15 −4
−5 4 1
Inverse of a Matrix (cont’d)
1 2 3 1 0 0 1 2 3 1 0 0
0 1 4 0 1 0 0 1 4 0 1 0
a1
− R + R1
5 6 0 0 0 1 a3 3 0 0.8 3 1 0 −0.2
Step 2: Make b3 = 0
1 2 3 1 0 0 1 2 3 1 0 0
0 1 4 0 1 0 0 1 4 0 1 0
b2
− R3 + R2
b3
0 0.8 3 1 0 −0.2 0 0 1/4 −5/4 1 1/4
Inverse of a Matrix (cont’d)
Step 3: Make c3 = 0
1 2 3 1 0 0 1 2 3 1 0 0
0 1 4 0 1 0 0 1 4 0 1 0
R3
0 0 1/4 −5/4 1 1/4 c3
0 0 1 −5 4 1
c1
− R 3 + R1
c3
1 2 3 1 0 0 1 2 0 16 −12 −3
0 1 4 0 1 0 c2 0 1 0 20 −15 −4
− R3 + R2
c3
0 0 1 −5 4 1 0 0 1 −5 4 1
Inverse of a Matrix (cont’d)
Step 5: Make b1 =0
b1
− R + R1
b2 2
1 2 0 16 −12 −3 1 0 0 −24 18 5
0 1 0 20 −15 −4 0 1 0 20 −15 −4
0 0 1 −5 4 1 0 0 1 −5 4 1
REFERENCES
http://www.tutor-homework.com/Math_Help/college_algebra/m5l6notes.pdf
http://www.wikihow.com/Find-the-Inverse-of-a-3x3-Matrix