0% found this document useful (0 votes)
4 views

Lecture 4 Matrices

The document provides an overview of matrices, including definitions, types, operations, and methods for solving systems of equations using matrices. It covers matrix dimensions, elements, special types of matrices (like row, column, zero, square, diagonal, scalar, upper and lower triangular, and unit matrices), and operations such as addition, subtraction, and multiplication. Additionally, it discusses determinants, inverses, and methods like Cramer’s Rule and Gaussian elimination for solving linear systems.

Uploaded by

yeojaaleumdaum
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Lecture 4 Matrices

The document provides an overview of matrices, including definitions, types, operations, and methods for solving systems of equations using matrices. It covers matrix dimensions, elements, special types of matrices (like row, column, zero, square, diagonal, scalar, upper and lower triangular, and unit matrices), and operations such as addition, subtraction, and multiplication. Additionally, it discusses determinants, inverses, and methods like Cramer’s Rule and Gaussian elimination for solving linear systems.

Uploaded by

yeojaaleumdaum
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Matrices

A matrix is a rectangular arrangement of numbers into rows and columns.


It is an array of numbers.
It is a rectangular array of numbers, variables, symbols, or expressions that are
defined for the operations like subtraction, addition, and multiplications.
Can be represented by an upper-case letter such A, B and C or with subscript
such as Amxn, Bmxn and Cmxn
( ), [ ] or { } can be used to represent matrix

For example, matrix A has two rows and three columns.

Matrix Dimensions
The dimensions of a matrix tell its size: the number of rows and columns of the
matrix, in that order.

Since matrix A has two rows and three columns, we write its dimensions as 2 x 3,
pronounced “two by three”.

In contrast, matrix B has three rows and two columns, so it is 3 x 2 matrix.

When working with matrix dimensions, remember rows x columns.


Matrix Elements
A matrix element is simply a matrix entry. Each element in a matrix is identified by
naming the row and column in which it appears.

For example, consider matrix G

The element is the entry in the second row and the first column.

In this case = 18

In general the element in row i and column j of matrix A is denoted as .

Two matrices are EQUAL if all three of the following conditions are met:
Each matrix has the same number of rows
Each matrix has the same number of columns
Corresponding elements within each matrix are equal
Special Types of Matrices

What Are The Types Of Matrices?

A matrix may be classified by types. It is possible for a matrix to belong to more than
one type.

A row matrix is a matrix with only one row


Example: E is a row matrix of order 1 × 1

Example: B is a row matrix of order 1 × 3


A column matrix is a matrix with only one column.
Example: C is a column matrix of order 1 × 1

A column matrix of order 2 ×1 is also called a vector matrix.


Example: D is a column matrix of order 2 × 1

A zero matrix or a null matrix is a matrix that has all its elements zero.
Example: O is a zero matrix of order 2 × 3

A square matrix is a matrix with an equal number of rows and columns.


Example: T is a square matrix of order 2 × 2

Example: V is a square matrix of order 3 × 3

A diagonal matrix is a square matrix that has all its elements zero except for those in
the diagonal from top left to bottom right; which is known as the leading diagonal of the
matrix.
Example: B is a diagonal matrix.
A scalar matrix is a diagonal matrix where all the diagonal elements are equal.

Example:

An upper triangular matrix is a square matrix where all the elements located below the
diagonals are zeros.

Example:

A lower triangular matrix is a square matrix where all the elements located above the
diagonal are zeros.

Example:

A unit matrix is a diagonal matrix whose elements in the diagonal are all ones.
Example: P is a unit matrix.
Representing A Linear System With Matrices
A system of equations can be represented by an augmented matrix.

System of Equations:

Augmented matrix:

In an augmented matrix, each row represents one equation in the system and each
column represents a variable or the constant terms.

In this way, we can see that augmented matrices are a shorthand way of writing
systems of equations. The organization of the numbers into the matrix makes it
unnecessary to write various symbols like x, y, and =, yet all of the information is still
there!

Example
Write the following system of equations as an augmented matrix.
Solution
To make things easier, let's rewrite the system to show each of the coefficients clearly.
If a variable term is not written in an equation, it means that the coefficient is 0.

This corresponds to the following augmented matrix.

Again, notice how each column corresponds to a variable ( x, y, z ) or the constants.


Also notice that the numbers in each row correspond to the coefficients in the same
equation.

In general, before converting a system into an augmented matrix, be sure that the
variables appear in the same order in each equation, and that the constant terms are
isolated on one side.

Matrix Row Operations

Matrix row operation:


Switch any two rows
Multiply a row by a nonzero constant
Add one row to another
Switch Any Two Rows
Example
Perform the row operation on the following matrix.

Solution
means to interchange row 1 and row 2.

Sometimes you will see the following notation used to indicate this change.

Notice how row 1 replaces row 2 and row 2 replaces row 1. The third row is not
changed.
Multiply A Row By A Nonzero Constant
Example
Perform the row operation on the following matrix.

Solution
means to replace the 2nd row with 3 times itself.

To indicate this matrix row operation, we often see the following:

Notice here three times the second row replaces the second row. The other rows
remain the same.
Add One Row to Another
Example

Perform the row operation + on the following matrix.

Solution

+ means to replace the 2nd row with the sum of the 1st and 2nd

rows.

To indicate this matrix row operation, we can write the following:

Notice how the sum of row 1 and 2 replaces row 2. The other row remains the same.
Systems of Equations and Matrix Row Operations
Recall that in an augmented matrix, each row represents one equation in the system
and each column represents a variable or the constant terms.

For example, the system on the left corresponds to the augmented matrix on the right.

When working with augmented matrices, we can perform any of the matrix row
operations to create a new augmented matrix that produces an equivalent system of
equations.

Switching Any Two Rows

The two systems in the above table are equivalent, because the order of the equations
doesn't matter. This means that when using an augmented matrix to solve a system, we
can interchange any two rows.
Multiply a Row by a Nonzero Constant
We can multiply both sides of an equation by the same nonzero constant to obtain an
equivalent equation.

In solving systems of equations, we often do this to eliminate a variable. Because the


two equations are equivalent, we see that the two systems are also equivalent.

This means that when using an augmented matrix to solve a system, we can multiply
any row by a nonzero constant.

Add One Row to Another


We know that we can add two equal quantities to both sides of an equation to obtain an
equivalent equation.
Pairing this new equation with either original equation creates an equivalent system of
equations.

So when using an augmented matrix to solve a system, we can add one row to another.

Operations of Matrices
Adding
To add two matrices: add the numbers in the matching positions:
The two matrices must be the same size, i.e. the rows must match in size, and
the columns must match in size.
Negative
The negative of a matrix is also simple:

Subtracting

To subtract two matrices: subtract the numbers in the matching positions:


Note: subtracting is actually defined as the addition of a negative matrix: A + (−B)
Multiply by a Constant

We can multiply a matrix by a constant (the value 2 in this case):


We call the constant a scalar, so officially this is called "scalar multiplication".

Multiplying a Matrix by Another Matrix


But to multiply a matrix by another matrix we need to do the “dot product” of rows
and columns ... what does that mean?

To work out the answer for the 1st row and 1st column:
Here it is for the 1st row and 2nd column:

We can do the same thing for the 2nd row and 1st column:

And for the 2nd row and 2nd column:

And we get:
Properties of Matrix Addition
Let A, B and C be matrices. Then, the following properties hold.
Commutative Law of Addition – A+B = B+A
Associative Law of Addition - (A+B)+C = A+( B+C )
Existence of an Additive Identity – ( There exists a zero matrix 0 such that
A+0 = A )
Existence of an Additive Inverse – (There exists a matrix −A such that
A+(−A) = 0

Properties of Scalar Multiplication


Let A, B be matrices, and k,p be scalars. Then, the following properties hold.

Distributive Law over Matrix Addition - k(A+B) = kA+kB


Distributive Law over Scalar Addition - (k+p)A = kA+pA
Associative Law for Scalar Multiplication - k(pA) = (kp)A
Rule for Multiplication by 1 - 1A = A

Determinant of a Matrix
The determinant is a special number that can be calculated from a matrix. The matrix
has to be square (same number of rows and columns) like this one:
Calculating the Determinant
First of all the matrix must be square (i.e. have the same number of rows as columns).

2×2 Matrix
For a 2×2 matrix (2 rows and 2 columns):

The determinant is:

It is easy to remember when you think of a cross:

Example: Find the determinant of

ICI=4x8-6x3
= 32 – 18
= 14

3×3 Matrix
For a 3×3 matrix (3 rows and 3 columns):
The determinant is:

Pattern for 3x3 matrix

Multiply a by the determinant of the 2×2 matrix that is not in a's row or column.
Likewise for b, and for c
Sum them up, but remember the minus in front of the b

Example:

|D| = 6 x (−2 x 7 – 5x 8) – 1 x (4 x 7 – 5 x 2) + 1 x (4 x 8 − (−2 x 2))


= 6 x (−54) – 1 x (18) + 1 x (36)
= −306

4×4 Matrices and Higher


The pattern continues for 4×4 matrices:
plus a times the determinant of the matrix that is not in a's row or column,
minus b times the determinant of the matrix that is not in b's row or column,
plus c times the determinant of the matrix that is not in c's row or column,
minus d times the determinant of the matrix that is not in d's row or column,

As a formula:

Minors and Cofactors


Minors and cofactors can be computed for each of the elements of a matrix.
Minor of an element is equal to the determinant of the remaining elements of the
matrix, after excluding the row and column containing the particular element.
The cofactor of an element can be calculated from the minor of the element. The
cofactor of an element is equal to the product of minor of the element, and -1 to
the power of position values of row and column of the element.

Cofactor of an Element = x Minor of an Element


Note: Here i and j are the positional values of the row and column of the element.
The minor of the first element of the first row of the above matrix A has been obtained
after ignoring the first row and first column of the above matrix and forming a new
matrix.

The cofactor of the element ais obtained by multiplying the minor with (-1) to the power
of the position value row and column of element a.

The minor and cofactor of a matrix are simple numeric values, which are obtained after
taking the determinant of the remaining elements of the given matrix.

Example
Finding the minor and cofactor of 7 in the matrix

Solution
Example
Find the cofactor matrix for the matrix

Solution:
Inverse of Matrices
Identity Matrix
We just mentioned the "Identity Matrix". It is the matrix equivalent of the number "1":

It is "square" (has same number of rows as columns),


It has 1s on the diagonal and 0s everywhere else.
Its symbol is the capital letter I.

The Identity Matrix can be 2×2 in size, or 3×3, 4×4, etc ...
Definition

The inverse of A is only when:

Sometimes there is no inverse at all.

(Note: writing A means A times )

Inverse 2 x 2 Matrix

Swap the positions of a and d, put negatives in front of b and c, and divide everything
by ad−bc.
Note: ad−bc is called the determinant.

Example

Remember it must be true that: A =I


To check, multiply the matrix by it s inverse.

It should also be true that: A =I


Multiply below to see if you also get the Identity Matrix:

The Inverse May Not Exist


First of all, to have an inverse the matrix must be "square" (same number of rows and
columns).
But also the determinant cannot be zero (or we end up dividing by zero)
Submatrices of a given Matrix
Example
A matrix A is given

a. Construct the submatrices used to compute the minors , , and .

b. Find the cofactors , , and .

Solution
a. The submatrices are:

b. , ,

Cramer’s Rule
Is another method to compute the determinant of a matrix.
Example
Use Cramer’s Rule to solve the linear system where

Solution
First compute the determinant of A to see if we can apply Cramer’s Rule.

Since det (A) ≠ 0 , we can apply Cramer’s Rule. Compute


Therefore we can compute x :

Therefore

Example
Use Cramer’s Rule to solve the linear system where

Solution
The determinant of A is −2 , so we can apply Cramer’s Rule.
Therefore

and

Gauss Elimination
Gauss elimination method is used to solve a system of linear equations.
It consists of a sequence of operations performed on the corresponding matrix of
coefficients.

Example
Solve a system of linear equations using the Gaussian elimination method:

First of all, we find the augmented matrix of the system of equations:


It is better if the first number of the first row is 1. Therefore, we are going to change the
order of rows 1 and 2:

The goal of the Gaussian elimination method is to make the numbers below the main
diagonal 0. So, we have to transform the red numbers to 0:

To eliminate these numbers we must do the appropriate elementary rows operations.

For example, the number -1, which is the first element in the second row, is the negative
of 1, the first element in the first row. So if we add the first row to the second row, the -1
will be eliminated:

By adding the rows we obtain the following matrix:

In this way we have transformed the -1 into a 0.


Now we are going to zero the number 2 out. To do so, we add the first row multiplied by
-2 to the third row:

And the following matrix is obtained:

Now we have to convert the -8 to 0. To do this, we multiply the third row by 3 and add
the second row multiplied by 8:

Therefore, we obtain the following matrix:

As you can see, with all these transformations we have made all the numbers below the
main diagonal 0. That is, the matrix is in row echelon form (or triangular form).

Now we must transform the matrix into a system of equations with unknowns. For this,
remember that the first column of the matrix corresponds to the unknown x, the second
column to the unknown y, the third column to the unknown z, and the last column are
the constants of the equations:

And finally, to solve the system we have to find the values of the unknowns from the
bottom up. Since the last equation only has one unknown, and therefore, we can easily
find its value:

Now we back-substitute into the second row to evaluate the unknown y:

And we do the same with the first equation of the system: we back-substitute the values
of the other unknowns and solve for x:
Thus, the solution of the system of equations is:

Gauss-Jordan Elimination

A method of solving a linear system of equations. This is done by transforming


the system's augmented matrix into reduced row-echelon form by means of row
operations.

Example

Solve the system shown below using the Gauss Jordan Elimination method:

Solution

The first step is to write the augmented matrix of the system. We show this below:

Now, our task is to reduce the matrix into the reduced row echelon form (RREF) by
performing the 3 elementary row operations.

Step 1:
We can multiply the first row by - 1 to make the leading entry 1. Shown below:
Step 2:
We can now multiply the first row by 3 and subtract it from the second row. Shown
below:

We have a 0 as the first entry of the second row.

Step 3:

To make the second entry of the second row 1, we can multiply the second row by .
Shown below:

Step 4:
The second entry of the first row should be 0. In order to do that, we multiply the second
row by 2 and add it to the first row. Shown below:
This is the reduced row echelon form. From the augmented matrix, we can write two
equations (solutions):

Thus, the solution of the system of equations is x = 2 and y = -2 .


Practice Activity
1. Write the following system of equations as an augmented matrix.
a. 3x − 2y = 3
5x + y = 0

b. 5x – 6y – 7z = 7
6x – 4y +10z = -34
2x + 4y – 3z = 29

2. Give the matrix dimension for the following:

a. 0 -4 3 1 4
6 7 2 9 -3

b. 0 -4 3
6 7 2
8 10 3
1 9 0

c. 0 1 2 3
3. Perform the operation of matrices.

a. 2 4 3 2 1 3
3 1 + 1 1 + 2 3
4 5 5 3 4 6

b. 2 -1 1 0
1 3 + 2 -1

c. 1 -3 -2 2 1
2 0 1 X -2 -1
3 0

d. 2 -1 1 3
3 2 -- 2 3
7 5 4 6

4. Find the determinant of the matrix.

a. 3 4
0 0

b. 2 -3
4 5
c. 3 1 2
4 8 5
-1 0 -3

5. Find the inverse of the matrix below:

a. 2 -3
4 5

b. 2 -3
4 5

6. Find the cofactor of in the following

2 -3 5
6 0 4
1 5 -7

7. Write the minors and cofactors of the elements in the following

2 -2 3
1 4 5
2 1 -3
8. For the given matrix, construct the submatrices used to compute the minors

and find the cofactors

3 1 2
4 8 5
-1 0 -3

9. Use Cramer’s Rule to solve the below.

1 1 -1 6
A= 3 -2 1 and b -5
1 3 -2 1

10. Use Cramer’s Rule to solve the below.

A= 12 3 and b 15
2 -3 13

11. Solve this system of equations using Gaussian Elimination.


2x + y – 3z = -10
-2y + z = -2
z=6

12. Solve this system of equations using Gaussian Elimination.


3x + 4y – z = -6
-2y + 10z = -8
4y – 2z = -2

13. Solve the following system by the Gauss-Jordan method.


x + 3y = 7
3x + 4y = 11

You might also like