Activity 3 Matrix Operations

You might also like

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

Technological Institute of the Philippines - Manila Course: MATH 022A

Math & Physics Department ONLINE LECTURE

Laboratory Activity No. 3

Matrix Operations

Name: Section:
Date Performed: Date Submitted:
Instructor:
1. Objective(s):

1.1 To add and subtract matrices and multiply a matrix by a scalar.


1.2 To multiply two matrices.
1.3 To use the properties of matrix addition, scalar multiplication, and zero matrices.
1.4 To determine the inverse of a matrix (if it exists).

2. Intended Learning Outcomes (ILOs):

The students shall be able to:


2.1 Demonstrate scientific thinking and the ability to approach scientific resources intelligently.
2.2 Utilize MATLAB software in solving linear algebra problems related to their fields of
specialization.
2.3 Infer appropriate conclusions based upon the results of the activity.
2.4 Reflect on personal transformation along the T.I.P. graduate attributes, specifically, professional
competence and critical thinking skills.

3. Discussion:

Operations on matrices are doing matrix addition, scalar multiplication, and matrix multiplication. By
definition of matrix addition, if A = and B = are matrices of size , then their sum is the
matrix given by A + B = + . For multiplication of real numbers on a matrix or also known
as scalar multiplication, if A = is an matrix and c is a scalar multiple of A by c is the
matrix A given by cA = . However, for matrix multiplication, if A = is an matrix and
B= is an matrix, then the product is an matrix = where
=∑ = + + + …+ .

An n x n matrix A is invertible (or nonsingular) if a n x n matrix B exist such that AB = BA = In

Where In is the identity matrix of order n. The matrix B is called the inverse of A. The inverse of a
matrix A is usually denoted by A-1.

Some properties of an invertible matrix are as follows:


1. (A-1)-1 = A
2. (Ak)-1 = (A-1)k
3. (cA)-1 = A-1/c for c not equal to zero
4. (AT)-1 = (A-1)T
Technological Institute of the Philippines - Manila Course: MATH 022A
Math & Physics Department ONLINE LECTURE

4. Procedure:

Activity 1. Determine the sum/difference of matrix A and matrix B if

1 0 3 3 2 7
= and =
−5 8 4 1 −4 5
Procedure:
1. Open the MATLAB.
2. From the above matrices, type all the entries of A and B on the command window and name
them as matrix A and matrix B respectively.
3. Find the sum of the matrices, type on command window “A + B”.
(Note: Matrices should be of the same size otherwise the sum is undefined.)

answer _____ _____ _____


_____ _____ _____

4. Find the difference of the matrices, type on command window “A – B”.

answer _____ _____ _____


_____ _____ _____

Activity 2. Determine the scalar multiple of matrix A and scalar c if

−4 2 4
= 3 2 −1 c=4
0 1 3
Procedure:
1. Open a new window command for the next example.
2. Enter all the elements of matrix D and scalar c, name the arrangement as matrix D and scalar c
respectively.
3. Find the scalar multiple, type on command window “c*D”.
(Note: dimension is not necessary to determine the scalar multiple of the matrix.)

In MATLAB
>> c = 4
>> c*D

_____ _____ _____


_____ _____ _____
_____ _____ _____
Technological Institute of the Philippines - Manila Course: MATH 022A
Math & Physics Department ONLINE LECTURE

Activity 3. Determine the product of matrix D and matrix E if

7 4 9 8 7 3 8 2
3 1 −3
D= E = 3 −5 F= 6 5 4 G = 1 5 −4
4 0 6
1 2 3 2 1 2 0 1

Procedure:
1. Open a new window command for the next exercise.
2. Enter all the elements of matrix D and matrix E.
(Note: The number of rows in one of the matrix should be equal to the numbers of columns on
another matrix.)
3. Determine the product of the two matrices, type on command window “D*E”.

answer _____ _____


_____ _____

4. Find the product of “E*D”

_____ _____ _____


answer _____ _____ _____
_____ _____ _____

5. Determine the product of “DTE” [ Transpose of matrix D in MATLAB is D apostrophe (D’) ]

answer ( copy the MATLAB answer ) ____________________________________________

Explain why DTE cannot be multiplied ? _________________________________________

Activity 4. Find the inverse of matrix G, type on command window “inv(G)” and “rats(inv(G))”

_____ _____ _____ _____ _____ _____


inv(G) = _____ _____ _____ rats[inv(G)] = _____ _____ _____
_____ _____ _____ _____ _____ _____

What is the difference between the command “inv(G)” and “rats[inv(G)]” ?

_____________________________________________________________

Find the inverse of matrix F and why there is no inverse of matrix F?

_____________________________________________________________
Technological Institute of the Philippines - Manila Course: MATH 022A
Math & Physics Department ONLINE LECTURE

Exercises

Use the following matrices to perform the following operations. Find

3 −2 5 6 2 3 2 4
1 −3 0
= 0 4 −1 = 4 1 8 = −1 5 =
−3 4 −2
2 1 1 −1 2 4 2 7

1. 2A + 3B 2. 3C – DT

3. DB – CTA 4. A–1A

5. CD+ A–1 B–1 6. Show that (AB)–1 = B–1 A–1

(AB)–1 =

B–1 A–1 =
Technological Institute of the Philippines - Manila Course: MATH 022A
Math & Physics Department ONLINE LECTURE

Conclusion

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

Copyright and Privacy

Property of the Technological Institute of the Philippines (T.I.P.). No part of the materials made
and uploaded in this learning management system by T.I.P. may be copied, photographed, printed,
reproduced, shared, transmitted, translated or reduced to any electronic medium or medium-
readable form, in whole or in part, without prior consent of T.I.P.

You might also like