You are on page 1of 14

33 Linear algebra 3

Tuesday, 3 August, 2021 13:55

Syllabus components:
• Matrices
• Linear operations with matrices
○ Power of a square matrix
• Row-column product
• Transpose matrix
• Symmetrical, triangular, diagonal matrices

Matrices

• A matrix is an array containing numbers, Example


arranged in rows and columns.
• The size of a matrix is given as the
number of rows ( ) x number of columns
( ).
• We call the matrix an matrix.

Indexing the matrix entries: Example


• We denote each element of matrix In the matrix
by a double index: :
○ rows ( ) followed by
○ columns ( )
• An arbitrary element/entry in a
matrix will be denoted by .

More generally, we write as


Linear algebra Page 1
More generally, we write as

A row matrix (also called a row vector) will have size .

A column matrix (also called a column vector) will have size .

A matrix can thus be viewed either as


1. a collection of row vectors or
2. as a collection of column vectors.

In the case where , we have a square matrix of order (size) .

The highlighted entries of this square matrix form the main diagonal.

Matrices of the same dimension are collected in sets as follows:


1.
Linear algebra Page 2
1.
2.

Matrix arithmetic: addition

Matrix addition is only defined for matrices of the same size.

Given matrices , we define and the


entries of matrix are the sum of the corresponding entries in and , as
follows:

Example

Find where

Properties of matrix addition

Consider . Then the following properties hold:

Linear algebra Page 3


1. [commutativity]

2. [associativity]

3. such that , [additive


identity]

4. such that [additive


inverse]

Matrix arithmetic: multiplication by a scalar

Given a matrix , and a scalar , we define the


product as a matrix whose entries are all a product of
the original matrix entries with , as follows:

Example

Find where

and

Linear algebra Page 4


Properties of scalar multiplication for matrices
Consider and scalars . Then the following
properties hold:

1. [distributivity of a scalar over a sum]

2. ( [pseudo-distributivity]

3. [pseudo-associativity]

4. [multiplicative identity]

We observe that the set of matrices is closed under addition and


scalar multiplication. Thus, is a vector space.

Matrix arithmetic: matrix multiplication

The product of 2 matrices requires a compatibility condition: we can


only multiply matrices if their ‘inner dimensions’ agree.

Thus is defined and the product will be

whose dimensions are determined by the


‘outer’ dimensions of and and the entries are calculated as
follows:

Linear algebra Page 5


Example

Find where

and

Example
Consider the matrices shown.

Which of the following products


are defined?
□ AB
□ AC
□ BC
□ BA
□ CA
□ CB

Linear algebra Page 6


Practice OYO: Compute the matrix products that are defined.

Example
Given and , find and .

We observe that, in general, . Thus, matrix multiplication is not


commutative in general.

Properties of matrix multiplication


The following properties will hold for matrix multiplication, assuming the
matrices are composable.

1. [associativity]
2. [left distributivity]
3. [right distributivity]

Example

Linear algebra Page 7


Given and composable matrices, calculate the following

Note that in general,

Matrix products as linear combinations


Consider the matrix product

We note that the product can be written as the linear combination of the
column vectors as follows:

The same will apply for any matrix product. In general, if we consider a
matrix and column matrix , as

and ,

the product

Linear algebra Page 8


Can be viewed as the following linear combination:

Given and we see the resultant matrix will be of size .

We have , or just which is a very compact way


of viewing a system of equations in unknowns.

Matrix transpose

Consider , then the Example


transpose of , written is
the matrix that results from
interchanging the rows and columns of
.

Example
Linear algebra Page 9
Example

Find where

Example

ind here

Note: The transpose of a column vector is a row vector (and vice versa).

Properties of the matrix transpose


Consider . Then the following properties hold:

1.

2.

Linear algebra Page 10


3.

4.

Other special matrices

A diagonal matrix is a square matrix Example


whose only non-zero entries are on the
main diagonal. i.e. .

An identity matrix, is a diagonal Example


matrix with ’s along the main
diagonal.

Given a matrix , then we have , and .

Note, that we define , for .

Example (OYO)
Verify that for
Linear algebra Page 11
Verify that for

An upper triangular matrix is a square Example


matrix whose only non-zero entries are
on, or above, the main diagonal. (i.e.
if .)

A lower triangular matrix is a square Example


matrix whose only non-zero entries are
on, or below the main diagonal. (i.e.
.)

A symmetric matrix is a square matrix Example


such that (i.e. ).

Powers of square matrices

Consider (A is an square matrix).

Linear algebra Page 12


Then the following powers are defined:

[for all matrices]

[ times]

Example

Consider .

Calculate the following:

Example

Consider .
Linear algebra Page 13
Consider .

Calculate the following:

Can you make a generalization from the above example?

Observe that powers of square matrices whose only non-zero entries


lie along the main diagonal (called a diagonal matrix) are very easy to
calculate!

Just raise the entries along the diagonal to power.

Linear algebra Page 14

You might also like