Matrix

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Matrix

-Rectangular array consisting of elements written in arrows of column.

1-9 elements of matrix A

1 4 7
A= 2 5 8 rows – horizontal lines
3 6 9

columns- vertical lines

Type of Matrices

1.) Square matrix- matrix in which the number of rows equals the number of columns.

1 0 2
A= 0 4 5
3 7 9

2.) Identity matrix- square matrix which the diagonal elements are “one” and all off

diagonal elements are “zero”.

1 0 0
A= 0 1 0 (important in Gaussian & Gauss Jordan elimination)
0 0 1

3.) Row matrix- matrix having only row and “n” columns.

A= { 1 2 3 }

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 1
4.) Column matrix- matrix having only one column and “n” rows.

1
A= 2
3

5.) Diagonal matrix- square matrix which every term off main diagonal is “zero”.

3 0 0
A= 0 1 0
0 0 2

6.) Scalar matrix- square matrix for which all terms on the main diagonal are equal.

3 3 0
A= 7 3 2
5 0 3

7.) Zero or Null matrix- matrix whose elements are equal to zero.

A= { 0 0 0 }

8.) Triangular matrix- square matrix whose elements above of below the principal

diagonal are zero.

4 1 2 5 0 0
A= 0 3 5 A= 8 2 0
0 0 8 9 3 4

9.) Transpose of a matrix (AT) (important in Inverse of a matrix)

1 2 3 1 4 7
A= 4 5 6 A T= 2 5 8
7 6 9 3 6 9

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 2
Operation of Matrix

1.) Addition and subtraction

- 2 matrices A and B can be added or subtracted if they are of same order. The

sum or difference is obtained by adding or subtracting their elements.

Example 1: consider the following matrices

1 2 0−3 −1 0 4 5
A= 4 5 71 B= 1 2 −3 4
3 2 10 0 5 6 7

0 2 4 2 2 2 −4 −8
A+B= 5 7 4 5 A-B= 3 3 10 −3
3 7 7 7 3 −3 −5 −7

Example 2: consider the following matrices

Since only matrices of the same size can be added, only the sum F + H is defined

(G cannot be added to either F or H).

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 3
2.) Multiplication – The matrices A and B can be multiplied if A and B are conformable

with each other

Example 1: consider the following matrices

3 6 7 2 1
A= 4 −3 8 B= 3 2
5 4 −7 5 3

3x3 conformable (3x3) 3x2

( 3x2 ) product

3(2) + 6(3) + 7 (5) 3(1) + 6(2) + 7( 3) 59 36


AB= 4(2) + −3(3) + 8(5) 4(1) + −3(2) + 8(3) AB= 34 22
5(2) + 4(3) + −7(5) 5(1) + 4(2) + −7(3) 13 −6

Example 2: Consider the matrices

If A is multiplied on the right by B, the result is

but if A is multiplied on the left by B, the result is

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 4
PROBLEM SET NO. 3. Matrix Operation

1. Perform the indicated operation for A + C.

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 5
2. Perform the indicated operation for ( A + C ) + ( C − A )

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 6
3. Perform the indicated operation for F − D.

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 7
4. Calculate, if possible, the product of B and E.

• Matrix B

• Matrix E

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 8
5. What is the product of matrix C when multiplied by itself?

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 9
Determinants

1.) Basket Method (limited only to 3x3 matrix order)

2.) Minors and Co- factors

4 0 5
D= −1 2 3 (-1)rxc positioning
3 1 2

2 3 0 5 0 5
D = 4 (-1)1+1( ) + (-1)(-1)2+1( ) + 3(-1)3+1( )
1 2 1 2 2 3

D= 4 (-1)1+1 (4-3) + (-1)(-1)2+1 (0-5) + 3(-1)3+1(0-10)

D= -31

3.) Pivotal Element Method (positioning)

2 3 7 9
3 𝟏 8 0
−5 2 3 5
6 −4 5 − 6

2 − (3)(3) 7 − (8)(3) − 9 − (0)(3)


D= 1(-1)2+2 −5 − (3)(2) 3 − (8)(2) 5 − (0)(2)
6 − (3)(−4) 5 − (8)(−4) − 6 − (0)(−4)

−7 −17 9
D= −11 −13 5 = - 1216
18 37 −6

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 10
4.) Special Case Pivotal Element

5 2 3 4 5 1 3 4

D= 2 2 4 3 = 2(-1)2+2 2 1 4 3

3 3 5 8 3 3/2 5 8

0 6 7 7 0 3 7 7

5 − (2)(1) 3 − (4)(1) 4 − (3)(1) 3 −1 1


= (2) 3 − (2)(3/2) 5 − (4)(3/2) 8 − (3)(3/2) = 2 0 −1 7/2 = 147
0 − (2)(3) 7 − (4)(3) 7 − (3)(3) −6 −5 −2

Inverse of a Matrix (Adjoint)

3 4 2

A= 6 -5 3

2 3 -6

Solution: 1.) |A| ≠ 0

|A| = 287

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 11
3 6 2 R1

2.) AT = 4 -5 3 R2

2 3 -6 R3

+ - +

3.) Adjoint of AT = -5 3 4 3 4 -5

3 -6 2 -6 2 3

- + -

6 2 3 2 3 6

3 -6 2 -6 2 3

+ - +

6 2 3 2 3 6

-5 3 4 3 4 -5

21 30 22

Adjoint of AT = 42 -22 3

28 -1 -39

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 12
21/287 30/287 22/287

4.) Inverse of Matrix A= adj AT / det. |A| = 42/287 -22/287 3/287

28/287 -1/287 -39/287

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 13
PROBSET NO.4 - DETERMINANTS

1.) Minors and Cofactors

A= 3 4 2

6 -5 3

2 3 -6

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 14
2.) Pivotal Element Method

A= 2 3 7 9

3 1 8 0

-5 2 3 5

6 -4 5 -6

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 15
3.Basket Method

1 4 9

7 8 3

2 5 6

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 16
4. Inverse of Matrix ( Adjoint)

2 0 9

0 -7 8

3 6 5

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 17
Systems of Linear Algebraic Equations with “n” unknowns.

1.) Cramer’s Rule

X-y–z=3 x=2

-x – y + z = 5 x=1

X+y+z=1 z=-2

1 -1 1

D= -1 -1 1 |D|= -4

1 1 1

3 -1 -1

D= -5 -1 1 Dx= -8 x= Dx /D= -8/-4 = 2

1 1 1

-1 3 -1

D= -1 -3 1 Dy= -4 y= Dy /D= -4/-4= 1

-1 1 1

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 18
1 -1 3

D= -1 -1 -5 Dz= 8 z= Dz /D= 8/-4= -2

1 1 1

2.) Gaussian Elimination

1 -1 -1 3 x= 2

-1 -1 1 -5 y= 1

1 1 1 1 z= -2

1 -1 -1 3

0 -2 1 -2 (R2 + R1)

0 2 2 -2 (R3 – R1)

1 -1 -1 3

0 1 0 1 (R2/-2)

0 2 2 -2

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 19
1 -1 -1 3

0 1 0 1 (R3-2R2)

0 0 2 4

1 -1 -1 3

0 1 0 1 (R3/2)

0 0 1 -2

1 0 −1 4
0 1 0 1 (R1+R2) z= -2 ; y= 1
0 0 1 −2

X + 0(y) – 1(z) = 4

X + 0(1) – 1(-2) = 4 ; x= 2

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 20
3.) Gauss-Jordan Elimination

1 -1 -1 1 0 0

-1 -1 1 0 1 0

1 1 1 0 0 1

1 -1 -1 1 0 0

0 -2 1 1 1 0 (R2+R1)

0 2 2 -1 0 1 (R3-R1)

1 -1 -1 1 0 0

−1 −1
0 1 0 0 (R2/-2)
2 2

0 2 2 -1 0 1

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 21
1 -1 -1 1 0 0

−1 −1
0 1 0 0
2 2

0 0 2 0 1 1 (R3 x 2R2)

1 -1 -1 1 0 0

−1 −1
0 1 0 0
2 2

11
0 0 1 0 (R3/2)
22

1 −1
1 0 -1 0
2 2

−1 −1
0 1 0 0
2 2

1 1
0 0 1 0 (R1+R2)
2 2

x y z

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 22
x y z

1 0 0 1/2 0 1/2 x

0 1 0 -1/2 -1/2 0 y

0 0 1 0 1/2 1/2 z

x= 1/2 (3) + 0(-5) + 1/2(1) x= 2

y= -1/2(3) – 1/2(-5) + 0(1) y= 1

Z= 0(3) + 1/2(-5) + 1/2(1) z= -2

Recall:

1 0 0 3 x

0 1 0 5 y

0 0 1 1 z

x-y–z=3

-x – y + z = 5

x+y+z=1

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 23
PROBLEM SET NO. 5

Systems of Linear Algebraic Equations ( 3 methods)

1.2x -4y +3z –w =5

-x +y -2z +2w = 1

3x + 2y -4z –w = -8

-2x + 5y +z + 4w = 12

A. Cramer’s rule

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 24
B. Gaussian elimination

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 25
C. Gauss-jordan elimination

PetE 405-Advanced Mathematics for PetE


Engr. Melannie P. Adante Page 26

You might also like