School of Mathematics and Statistics: Topic and Contents Matrices
School of Mathematics and Statistics: Topic and Contents Matrices
School of Mathematics and Statistics: Topic and Contents Matrices
_
a
11
a
12
a
1n
a
21
a
22
a
2n
.
.
.
.
.
.
.
.
.
a
m1
a
m2
a
mn
_
_
m rows
n columns
a
ij
element in row i and column j
total of mn elements a
ij
, each a real number
a
ij
R, i = 1, . . . , m, j = 1, . . . , n
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 2 / 20
Matrices Simple matrices
Simple matrices
Example (Matrices and vector spaces)
A=
2 1
3 0
1 0
M
3,2
(R)
B=
4 3 0 1
6 4 0 7
M
2,4
(R)
C=
4 3 0 1
M
1,4
(R)
D=
4
3
0
1
M
4,1
(R)
0=
0 0
0 0
0 0
M
3,2
(R)
Example (Write out the following zero matrices)
0 M
2,2
(R) 0 =
_
0 0
0 0
_
0 M
1,3
(R) 0 =
_
0 0 0
2
_
, B =
_
2 2 0
0 4
_
, A +B =?
A+B not dened as matrices not the same size
C =
_
2 2
0
_
, A +C =? A +C =
_
1 0
1 +
2
_
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 4 / 20
Matrices Scalar multiplication for matrices
Scalar multiplication for matrices
Denition (Scalar multiplication)
If A M
m,n
(R) and R then B = A M
m,n
(R) is given by
b
ij
= (A)
ij
= a
ij
, i = 1, . . . , m, j = 1, . . . , n
multiply EVERY element by scalar
Example (Scalar multiplication for matrices)
A =
_
2 2 0
0 4
_
, 3A =
_
6 6 0
3 0 12
_
0A =
_
0 0 0
0 0 0
_
M
2,3
(R)
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 5 / 20
Matrices Equality for matrices
Equality for matrices
Denition (Equality for matrices)
Two matrices A, B M
m,n
(R) are equal (A = B) if and only if
a
ij
= b
ij
, i = 1, . . . , m, j = 1, . . . , n
A, B must have same number of rows and same number of columns
ALL corresponding elements must be equal
Example (Equality of matrices)
A =
_
3 2
1
2
_
, B =
_
2 2 0
0 4
_
, A = B?
A = B as matrices of dierent sizes
C =
_
1
3
__
9 6
3
18
_
, A = C? C =
_
3 2
1
2
_
, so A = C
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 6 / 20
Matrices Matrix transpose
Matrix transpose
Denition (Matrix transpose)
Let A M
m,n
(R). The transpose of A is A
T
M
n,m
(R)
_
A
T
_
ij
= a
ji
, i = 1, . . . , m, j = 1, . . . , n
Swap rows and columns
Example (Matrix transpose)
A =
_
_
3 2
1
2
0 1
_
_
M
3,2
(R), A
T
=
_
3 1 0
2
2 1
_
M
2,3
(R)
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 7 / 20
Matrices Column vs Row Vectors
Column vs Row Vectors
Column vector x =
_
_
x
1
x
2
.
.
.
x
n
_
_
M
n,1
(R)
n rows
1 column
Row vector x
T
=
_
x
1
x
2
x
n
M
1,n
(R)
1 row
n columns
x M
n,1
(R), x
T
M
1,n
(R), n > 1 implies
x = x
T
, as not in the same vector space
x + x
T
is not dened
Exception n = 1 =x = x
T
, ie R =
T
=
Every vector a R
n
is really a column vector
To save space often write as a row vector
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 8 / 20
Vector Spaces
Vector Spaces R
n
and M
m,n
(R)
General structure which you will see in MATH1251
Set of vectors (eg R
n
or M
m,n
(R)) and eld of scalars (eg R)
Operations: addition of vectors and scalar multiplication
Denition of equality of vectors
Proposition (R
n
is a vector space)
The set R
n
of vectors with the eld of scalars R, satises the 10 vector
space axioms
1
Closure under Addition a, b R
n
=a +b R
n
2
Associative Law of Addition (a +b) +c = a +(b +c) a, b, c R
n
3
Commutative Law of Addition a + b = b +a a, b R
n
4
Existence of a zero a zero element, 0 = (0, 0, . . . , 0) in R
n
such
that a + 0 = a a R
n
5
Existence of a negative For each a = (a
1
, . . . , a
n
) R
n
there exists a
vector b R
n
,namely b = a = (a
1
, . . . , a
n
), such that a+b = 0
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 9 / 20
Vector Spaces
Vector Spaces R
n
and M
m,n
(R)
Proposition (R
n
is a vector space, Continued)
6
Closure under scalar multiplication R, a R
n
= a R
n
7
Associative law for scalar multiplication
(a) = ()a , R, a R
n
8
Identity for scalar multiplication a R
n
, 1a = a where 1 R
9
Scalar distributive law ( +)a = a +a, , R, a R
n
10
Vector distributive law (a + b) = a +b, R, a, b R
n
Proposition (M
m,n
(R) is a vector space)
The set M
m,n
(R) of matrices with the eld of scalars R, satises the 10
vector space axioms.
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 10 / 20
Linear Equations A Linear Equation
A Linear Equation
Denition (Linear equation)
A linear equation in n variables x
1
, x
2
, . . . , x
n
is an equation
a
1
x
1
+a
2
x
2
+ +a
n
x
n
= b
where a
j
R, j = 1, . . . , n and b R are scalars.
Using
notation
n
j=1
a
j
x
j
= b
Example
3x
1
+x
3
+ 7x
4
12x
5
= 17
j=1
a
ij
x
j
= b
i
i = 1, . . . , m
Example (System of linear equations)
3x
1
+ x
2
4x
3
= 7 m = 2 equations
3x
2
+ 6x
3
= 9 n = 3 variables
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 12 / 20
Linear Equations System of Linear Equations
Equivalent Forms Vector Equation
Let
a
j
=
_
_
a
1j
a
2j
.
.
.
a
mj
_
_
R
m
, j = 1, . . . , n, b =
_
_
b
1
b
2
.
.
.
b
m
_
_
R
m
System of linear equations can be written as
a
1
x
1
+ a
2
x
2
+ + a
n
x
n
= b
n
j=1
a
j
x
j
= b
Example (Vector equation)
a
1
=
_
3
0
_
, a
2
=
_
1
3
_
, a
3
=
_
4
6
_
, b =
_
7
9
_
x
1
_
3
0
_
+x
2
_
1
3
_
+x
3
_
4
6
_
=
_
7
9
_
3x
1
+x
2
4x
3
= 7
3x
2
+ 6x
3
= 9
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 13 / 20
Linear Equations System of Linear Equations
Equivalent Forms Matrix Equation
System of equations in matrix form Ax = b
A =
_
_
a
11
a
12
a
1n
a
21
a
22
a
2n
.
.
.
.
.
.
.
.
.
a
m1
a
m2
a
mn
_
_
, x =
_
_
x
1
x
2
.
.
.
x
n
_
_
, b =
_
_
b
1
b
2
.
.
.
b
m
_
_
A M
mn
(R), x R
n
, b R
m
A =
_
a
1
a
2
a
n
M
mn
(R)
Example (Matrix form for previous example)
A =
_
3 1 4
0 3 6
_
M
23
(R), x =
_
_
x
1
x
2
x
3
_
_
R
3
, b =
_
7
9
_
R
2
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 14 / 20
Linear Equations Augmented Matrix
Equivalent Forms Augmented Matrix
Augmented matrix for system of linear equations Ax = b
[A | b] =
_
_
a
11
a
12
a
1n
b
1
a
21
a
22
a
2n
b
2
.
.
.
.
.
.
.
.
.
.
.
.
a
m1
a
m2
a
mn
b
m
_
_
each row is an equation
rst n columns are coecients of x
1
, . . . , x
n
last column is right-hand-side vector b
Example (Augmented Matrix for previous example)
[A | b] =
_
3 1 4 7
0 3 6 9
_
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 15 / 20
Linear Equations Elementary Row Operations
Elementary Row Operations
Work on Augmented matrix [A | b]
Each row corresponds to an equation: R
i
= ith row/equation
Last column is right-hand-side b
Other columns correspond to variables x
1
, . . . , x
n
Must work with ALL columns, including b
Row operations do not change the solution to a system of linear
equations
1
Swap Rows/Interchange equations
R
i
R
j
2
Add a multiple of one row/equation to another row/equation
R
i
R
i
+R
j
, R
3
Multiply a row/equation by a non-zero scalar
R
i
R
i
, R, = 0
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 16 / 20
Linear Equations Elementary Row Operations
Example Swapping rows
Example (Row swap)
Augmented matrix
[A | b] =
_
_
4 0 2 0
3 1 6 2
1 1 3 2
_
_
Row operation R
1
R
3
swap rows 1 and 3
Solution (New augmented matrix)
[B | c] =
_
_
1 1 3 2
3 1 6 2
4 0 2 0
_
_
Dierent augmented matrices
Equivalent systems of linear equations (same solution)
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 17 / 20
Linear Equations Elementary Row Operations
Example Adding a multiple of one row to another
Augmented matrix
_
_
1 1 3 2
3 1 6 2
4 0 2 0
_
_
R
2
R
2
3R
1
gives
_
_
1 1 3 2
0 2 15 8
4 0 2 0
_
_
R
3
R
3
4R
1
gives
_
_
1 1 3 2
0 2 15 8
0 4 14 8
_
_
R
3
R
3
2R
2
gives
_
_
1 1 3 2
0 2 15 8
0 0 16 8
_
_
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 18 / 20
Linear Equations Elementary Row Operations
Example Multiplying a row by a scalar
Augmented matrix
_
_
1 1 3 2
0 2 15 8
0 0 16 8
_
_
R
3
1
16
R
3
_
_
1 1 3 2
0 2 15 8
0 0 1
1
2
_
_
Last row/equation
0x
1
+ 0x
2
+ 1x
3
=
1
2
=x
3
=
1
2
Second row/equation
2x
2
15x
3
= 8 =2x
2
= 8 + 15
1
2
=
1
2
=x
2
=
1
4
First row/equation
x
1
+x
2
+ 3x
3
= 2 =x
1
= 2
1
4
3
1
2
=
1
4
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 19 / 20
Linear Equations Checking a solution
Checking a solution
Augmented matrix original linear system
[A | b] =
_
_
4 0 2 0
3 1 6 2
1 1 3 2
_
_
4x
1
2x
3
= 0
3x
1
+ x
2
6x
3
= 2
x
1
+ x
2
+ 3x
3
= 2
Solution of linear system is
x =
_
_
1
4
1
4
1
2
_
_
Substitute into original system to check all equations are satised
Eqn 1: 4x
1
2x
3
= 4
1
4
2
1
2
= 0
Eqn 2: 3x
1
+x
2
6x
3
= 3
1
4
+
1
4
6
1
2
= 2
Eqn 3: x
1
+x
2
+ 3x
3
=
1
4
+
1
4
+ 3
1
2
= 2
MATH1151 (Algebra) L05 Matrices and Linear Equations Session 1, 2014 20 / 20