Docsity

Matrix Algebra for Engineers, Study notes of Linear Algebra

Partial preview of the text

Download Matrix Algebra for Engineers and more Study notes Linear Algebra in PDF only on Docsity!

Matrix Algebra for Engineers

Lecture Notes for

Jeffrey R. Chasnov

The Hong Kong University of Science and Technology Department of Mathematics Clear Water Bay, Kowloon Hong Kong

Copyright c○ 2018, 2019 by Jeffrey Robert Chasnov

This work is licensed under the Creative Commons Attribution 3.0 Hong Kong License. To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/hk/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.

iv

Contents

  • I Matrices
  • 1 Definition of a matrix
  • 2 Addition and multiplication of matrices
  • 3 Special matrices
    • Practice quiz: Matrix definitions
  • 4 Transpose matrix
  • 5 Inner and outer products
  • 6 Inverse matrix
    • Practice quiz: Transpose and inverses
  • 7 Orthogonal matrices
  • 8 Rotation matrices
  • 9 Permutation matrices
    • Practice quiz: Orthogonal matrices
  • II Systems of Linear Equations
  • 10 Gaussian elimination
  • 11 Reduced row echelon form
  • 12 Computing inverses
    • Practice quiz: Gaussian elimination
  • 13 Elementary matrices
  • 14 LU decomposition
  • 15 Solving (LU)x = b vi CONTENTS
    • Practice quiz: LU decomposition
  • III Vector Spaces
  • 16 Vector spaces
  • 17 Linear independence
  • 18 Span, basis and dimension
    • Practice quiz: Vector space definitions
  • 19 Gram-Schmidt process
  • 20 Gram-Schmidt process example
    • Practice quiz: Gram-Schmidt process
  • 21 Null space
  • 22 Application of the null space
  • 23 Column space
  • 24 Row space, left null space and rank
    • Practice quiz: Fundamental subspaces
  • 25 Orthogonal projections
  • 26 The least-squares problem
  • 27 Solution of the least-squares problem
    • Practice quiz: Orthogonal projections
  • IV Eigenvalues and Eigenvectors
  • 28 Two-by-two and three-by-three determinants
  • 29 Laplace expansion
  • 30 Leibniz formula
  • 31 Properties of a determinant
    • Practice quiz: Determinants
  • 32 The eigenvalue problem
  • 33 Finding eigenvalues and eigenvectors (1)
  • 34 Finding eigenvalues and eigenvectors (2) CONTENTS vii
    • Practice quiz: The eigenvalue problem
  • 35 Matrix diagonalization
  • 36 Matrix diagonalization example
  • 37 Powers of a matrix
  • 38 Powers of a matrix example
    • Practice quiz: Matrix diagonalization
  • Appendix
  • A Problem and practice quiz solutions

viii CONTENTS

In this week’s lectures, we learn about matrices. Matrices are rectangular arrays of numbers or other mathematical objects and are fundamental to engineering mathematics. We will define matrices and how to add and multiply them, discuss some special matrices such as the identity and zero matrix, learn about transposes and inverses, and define orthogonal and permutation matrices.

Lecture 1

Definition of a matrix

View this lecture on YouTube

An m-by-n matrix is a rectangular array of numbers (or other mathematical objects) with m rows and n columns. For example, a two-by-two matrix A, with two rows and two columns, looks like

A =

a b c d

The first row has elements a and b, the second row has elements c and d. The first column has elements a and c; the second column has elements b and d. As further examples, two-by-three and three-by-two matrices look like

B =

a b c d e f

, C =

a d b e c f

Of special importance are column matrices and row matrices. These matrices are also called vectors. The column vector is in general n-by-one and the row vector is one-by-n. For example, when n = 3, we would write a column vector as

x =

a b c

and a row vector as y =

a b c

A useful notation for writing a general m-by-n matrix A is

A =

a 11 a 12 · · · a 1 n a 21 a 22 · · · a 2 n ... ...... ... am 1 am 2 · · · amn

Here, the matrix element of A in the ith row and the jth column is denoted as aij.

6 LECTURE 1. DEFINITION OF A MATRIX

Problems for Lecture 1

1. The diagonal of a matrix A are the entries aij where i = j.

a) Write down the three-by-three matrix with ones on the diagonal and zeros elsewhere. b) Write down the three-by-four matrix with ones on the diagonal and zeros elsewhere.

c) Write down the four-by-three matrix with ones on the diagonal and zeros elsewhere.

Solutions to the Problems

8 LECTURE 2. ADDITION AND MULTIPLICATION OF MATRICES

Problems for Lecture 2

1. Define the matrices

A =

, B =

, C =

D =

, E =

Compute if defined: B − 2A, 3C − E, AC, CD, CB.

2. Let A =

, B =

and C =

. Verify that AB = AC and yet B ̸= C. 3. Let A =

 and D =

. Compute AD and DA.

4. Prove the associative law for matrix multiplication. That is, let A be an m-by-n matrix, B an n-by-p matrix, and C a p-by-q matrix. Then prove that A(BC) = (AB)C.

Solutions to the Problems

Lecture 3

Special matrices

View this lecture on YouTube

The zero matrix, denoted by 0, can be any size and is a matrix consisting of all zero elements. Multi- plication by a zero matrix results in a zero matrix. The identity matrix, denoted by I, is a square matrix (number of rows equals number of columns) with ones down the main diagonal. If A and I are the same sized square matrices, then AI = IA = A,

and multiplication by the identity matrix leaves the matrix unchanged. The zero and identity matrices play the role of the numbers zero and one in matrix multiplication. For example, the two-by-two zero and identity matrices are given by

, I =

A diagonal matrix has its only nonzero elements on the diagonal. For example, a two-by-two diagonal matrix is given by

D =

d 1 0 0 d 2

Usually, diagonal matrices refer to square matrices, but they can also be rectangular. A band (or banded) matrix has nonzero elements only on diagonal bands. For example, a three-by- three band matrix with nonzero diagonals one above and one below a nonzero main diagonal (called a tridiagonal matrix) is given by

B =

d 1 a 1 0 b 1 d 2 a 2 0 b 2 d 3

An upper or lower triangular matrix is a square matrix that has zero elements below or above the diagonal. For example, three-by-three upper and lower triangular matrices are given by

U =

a b c 0 d e 0 0 f

 , L =

a 0 0 b d 0 c e f

Practice quiz: Matrix definitions

1. Identify the two-by-two matrix with matrix elements aij = i − j.

a)

b)

c)

d)

2. The matrix product

is equal to

a)

b)

c)

d)

3. Let A and B be n-by-n matrices with (AB)ij =

n

k= 1

aikbkj. If A and B are upper triangular matrices,

then aik = 0 or bkj = 0 when A. k < i B. k > i C. k < j D. k > j

a) A and C only

b) A and D only c) B and C only

d) B and D only

Solutions to the Practice quiz

12 LECTURE 3. SPECIAL MATRICES