(Chap 2) Matrix Algebra
(Chap 2) Matrix Algebra
Matrix algebra
Introduction
(3, 5)
A
(2, 3) (4, 3) 0 5 2 4 3
(5, 0)
(0, 0) 0 0 3 3 5
OUR GOAL
• Matrices
• Special matrices
• Operations on matrices:
• Addition
• Difference
• Transposition
• Scalar multiplication
• Matrix multiplication
• Inverse of a square matrix
• Matrices and linear systems of equations
• Matrices and linear transformations
Definition
• An mxn matrix is rectangular array of
numbers
(1,3)-entry
7 -3 1/2 a[1,3] = 1/2
A=
3 -5 0 a13 = 1/2
3 x 3matrix,
3 x 1 matrix
a square matrix
column matrix
Special matrices
Then,
Symmetric matrices
or AT = A
• Square matrix [aij] where aij = aji
operations on matrices
day 1 + day 2?
day 1 – day 2?
[ ]
110 230 280
300 155 389
35 117 201
Properties
1. A + B = B + A // commutative law
2. A + (B + C) = (A + B) + C // associative law
3. k(A + B) = kA + kB // distributive law
4. (A + B)T = AT + BT
Matrix multiplication - introduction
peanuts soda hot dogs
group A 8 5 12
group B 15 7 13
• Am n . Bn p = Cm p //suitable size
1 2 1.1+2.1
3 4 1 2
1 0 1 2
0 1 -1 -2 -1 0
2 0 1 2 1 0 -2 0 2 -4
Properties
Note:
• In general, AB BA Not commutative
• AB = 0 A = 0 or B = 0
• AB =AC B = C
Example
(3, 5)
A
(2, 3) (4, 3) D=
0 5 2 4 3
(5, 0)
(0, 0) 0 0 3 3 5
A
Let A =
0 10 4 8 6
0 0 6 6 10
The inverse of a matrix
2 -3
• A=
1 -4
1 -4 3
• A =
-1
-5 -1 2
-4.2 – 3.(-1) = -5
// determinant of A, denoted by det(A)
The inverse of nxn matrices
-2r2 + r3 -2r3 + r1
3r3+ r2
A-1
Linear equation and matrix
multiplication
A X = B
-2x + y = -1
3x -2y = 5
AX = B
Û X = A-1B
Û X = x = -3, y = -7
Matrix and linear
transformation
• Example of a transformation
T(x, y) = (x, -y) y
T input
(x, y)
x
(x, -y)
output
input output
Matrix of
The transformation
Matrix and linear transformation
• Example of a transformation
y
S(x, y) = ?
input
Find the matrix of S? (x, y)
x
(-x, -y)
output
• Suppose T is a linear transformation given
by the matrix
T(1, 2, -3) = T
The composition of
transformations
Given T(x, y) = (x, y-x)
T
And S(x, y) = (x-y, y)
S
Find the composite transformation
(TS)(x, y) defined by
(TS)(x, y) = T(S(x, y))
Matrix of T S:
=
(T S)
The inverse of a transformation -
introduction
transformation
encode Encoded
Message mess
decode Encoded
Message
mess
Inverse transformation
Theorem
Example in cryptography
Encrypt the message STOP
by the transformation T(x, y) = (x - 3y, -x + 4y)
S T O P
19 20 15 16