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

LECTURE 01

The document provides an introduction to matrices and vectors, detailing definitions, types of matrices, and fundamental operations such as addition, subtraction, multiplication, and finding inverses. It also explains determinants, Cramer's Rule, and how to solve systems of equations using matrix equations. Key concepts include matrix dimensions, identity matrices, diagonal matrices, and the properties of transposes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

LECTURE 01

The document provides an introduction to matrices and vectors, detailing definitions, types of matrices, and fundamental operations such as addition, subtraction, multiplication, and finding inverses. It also explains determinants, Cramer's Rule, and how to solve systems of equations using matrix equations. Key concepts include matrix dimensions, identity matrices, diagonal matrices, and the properties of transposes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

Introduction to Matrices and

Vectors
MATRIX: AN ALGEBRAIC
DEFINITION

1
Definitions

• Algebraic definition of a matrix: a table of


scalars in square brackets.
• Matrix dimension is the width and height
of the table, w x h.
• Typically we use dimensions 2 x 2 ,3 x 3 ,
4 x4

2
Definitions - vector

Vector: a single row or column of


numbers
– denoted with bold small letters
1 2 3 4 5
– row vector
a=
– column1vector

 2
 3
 4
b = 5
Basic notations of matrices

• Element - each value in a matrix; either a


number, variable or a constant.
• Dimension - number of rows by number of
columns of a matrix.
• A matrix is named by its dimensions.
– 3 rows / 4 columns (this is 3 by 4 matrix)
Square Matrices

• Same number as rows as columns.


• Entries mii are called the diagonal
entries. The others are called
nondiagonal entries

5
Diagonal Matrices

A diagonal matrix is a square matrix


whose nondiagonal elements are zero.

6
The Identity Matrix

The identity matrix of dimension n, denoted


In, is the n x n matrix with 1s on the diagonal
and 0s elsewhere.

7
Zero Matrix

• If all elements are zero we called it as


Zero Matrix

0 0 0
• A= 0 0 0
0 0 0

8
Symmetric Matrix

• If Anxn is a Symmetric Matrix then aij = aji


for all I and j

1 2
• A=
2 1

9
Transpose of a Matrix

• The transpose of an r x c matrix M is a c


x r matrix called MT.
• Take every row and rewrite it as a
column.
• Equivalently, flip about the diagonal

10
Facts About Transpose

• Transpose is its own inverse: (MT)T = M


for all matrices M.
• DT = D for all diagonal matrices D
(including the identity matrix I).

11
What you know

• All about (1x1) matrices

• Operation Example Result

• Addition 2+2 4
• Subtraction 5–1 4
• Multiplication 2x2 4
• Division 12 / 3 4
Matrix Operations

• Addition
• Subtraction
• Multiplication
• Inverse
Addition

1 2 5 6 6 8
3 4
+ 7 8
= 10 12

A + B = C
Addition Conformability

To add two matrices A and B:

• # of rows in A = # of rows in B

• # of columns in A = # of columns in B
Subtraction

5 6 1 2 4 4
7 8
- 3 4
= 4 4

B - A = C
Subtraction Conformability

• To subtract two matrices A and B:

• # of rows in A = # of rows in B

• # of columns in A = # of columns in B
Matrix Multiplication

Matrices A and B have these dimensions:

[r x c] and [s x d]
Matrix Multiplication

Matrices A and B can be multiplied if:

[r x c] and [s x d]

c=s
Matrix Multiplication

The resulting matrix will have the dimensions:

[r x c] and [s x d]

rxd
Computation: A x B = C

a11 a12 
A =  [2 x 2]
a 21 a 22
b11 b12 b13 
B =  [2 x 3]
b 21 b 22 b 23
a11b11 + a12b 21 a11b12 + a12b 22 a11b13 + a12b 23 
C= 
a 21b11 + a 22b 21 a 21b12 + a 22b 22 a 21b13 + a 22b 23
[2 x 3]
Multiplication Conformability

• Regular Multiplication

• To multiply two matrices A and B:

• # of columns in A = # of rows in B
The Determinant of a Matrix

The determinant of a matrix A is denoted


by |A| (or det(A)).
Determinants exist only for square
matrices.
They are a matrix characteristic, and
they are also difficult to compute
The Determinant for a 2x2 matrix

If A =
a11 a12 
a 
 21 a22 
Then

A = a11a22 − a12a21
The Determinant for a 3 x 3 matrix

 a b c
 
detd e f  = a(ei − fh) − b(di − fg) + c(dh − eg)
g h i 
 

25
Cramer’s Rule for Two
Equations in Two Variables

Given the system a1x + b1y = c1


a2 x + b2 y = c2
if then the system has the unique solution
Dx Dy
x= and y = ,
D D
a1 b1 c1 b1 a1 c1
where D = , Dx = , and Dy = .
a2 b2 c2 b2 a2 c2
Inverse

• A number can be divided by another number -


How do you divide matrices?

• Note that a / b = a x 1 / b

• And that a x 1 / a = 1

• 1 / a is the inverse of a
• Inverse of (2 x 2) matrix
– Find determinant
– Swap a11 and a22
– Change signs of a12 and a21
– Divide each element by determinant
– Check by pre- or post-multiplying by inverse
• Find theInverse
determinant
of 2 x 2 matrix
= (a11 x a22) - (a21 x a12)
For

2 5
A = 1 3

det(A) = (2x3) – (1x5) = 1


Inverse of 2 x 2 matrix

• Swap elements a11 and a22


Thus
2 5
A = 1 3

becomes
3 5
1 2
Inverse of 2 x 2 matrix

• Change sign of a12 and a21


Thus
3 5
A = 1 2

becomes
3 -5
-1 2
Inverse of 2 x 2 matrix

• Divide every element by the determinant


Thus

3 -5
A = -1 2

becomes

3 -5
-1 2

(luckily the determinant was 1)


Inverse of 2 x 2 matrix

-1
• Check results with A A = I
Thus

3 -5 2 5
-1 2
x 1 3

equals
1 0
0 1
Inverse Matrices

▪ Not all matrices have an inverse!


If the determinant = 0, the inverse does not
exist!
3 x 3 inverse

35
36
37
38
39
Solving Systems of Equations
with Matrices
SOLVING SYSTEMS OF
EQUATIONS
WITH MATRICES
A system of equations may be
represented as a matrix equation.
For example, the system of equations
3 x − 5 y = 1

 2 x + y = −2
may be represented by the matrix equation
 3 − 5  x   1 
2 1   y  =  − 2
    
Write the matrix equation that
represents the system:
x + y = 8

2 x + y = 1

1 1  x  8
=
2 1  y  1
    
Write the matrix equation that
represents the system:

 x + 3 y = 13

 2 x − y = −9

1 3   x   13 
=
2 − 1  y  − 9
    
Write the system of equations
represented by the matrix equation
 − 1 5 2   x   − 5
 1 2 0   y  =  − 4
    
 4 0 − 3  z   10 

− x + 5 y + 2 z = −5

 x + 2 y = −4
4 x − 3z = 10

A matrix equation is in the form
AX = B, where A is the coefficient
matrix, X is the variable matrix,
and B is the constant matrix.
 3 − 5  x   1 
=
2 1   y   − 2
    
 3 − 5  x 1 
A=   X =  B= 
2 1   y  − 2
Solving AX=B

Real Numbers
ax=b
(1/a)(ax) = (1/a)b
(๋1/a)(a)x = b/a
1x = b/a
x = b/a

Note: 1/a must exist to solve ax = b


Solving AX=B

Real Numbers Matrices


ax=b AX=B
(1/a)(ax) = (1/a)b A-1(AX)=A-1B
(1/a)(a)x = b/a (A-1A)X=A-1B
1x = b/a IX=A-1B
x = b/a X=A-1B

Note: A-1 must exist to solve AX=B


Solve the system of equations using matrices.
−1
x + y = 8 X=A B
 −1
2 x + y = 1 1 1 8
X =   
2 1 1
x = -7  − 7
X = 
y = 15  15 
Solve the system of equations using matrices.
−1
4 x + 3 y = 1 X=A B
 −1
3x − 2 y = 5 4 3  1
X =   
 3 − 2 5
x=1 1
X = 
y = -1 − 1
Solve the system of equations using matrices.

2 y − z = −7 − 5 x

x − 2 y + 2z = 0
3 y = 17 − z
 x = -2
−1
5 2 −1  −7  y=4
 1 −2 2   0 
    z=5
0 3 1  17 
Now solve these equations:

1. x+y −z = 6
x + 2y − 3z = 11 x = 2, y = 3, z = −1
4x − 3y − 2z = 1

2x + y + z = 4
2. 1 1 5
x + 2y + z = 4
 x = ,y = , z =
3x − y + 2z = 6 2 2 2

x + y − z = −2
3.
3x − 4y − z = −1
 x = 3, y = 1, z = 6
2x − 5y + 2z = 13

You might also like