Documente Academic
Documente Profesional
Documente Cultură
1 2 0
9 1 2
1 3 4
; M =
1 2 5 7
4 1 0 8
; v =
1
3
2
6
Order of a matrix
A matrix has order n m if it has n rows and m columns.
Vectors
Denition
A (1 m) matrix is called as a row vector
v =
1 3 2 6
A (m1) matrix is called as a column vector
v =
1
3
2
6
1 2 0
9 1 2
1 3 4
a
11
a
12
a
13
a
21
a
22
a
23
a
31
a
32
a
33
Matrices
A general mn matrix will often be written
A =
a
11
a
12
a
1n
a
21
a
22
a
2n
.
.
.
.
.
.
.
.
.
.
.
.
a
m1
a
m2
a
mn
Notations
Square or round brackets. Dierent notations... same meaning.
A =
1 2 0
9 1 2
1 3 4
A =
1 2 0
9 1 2
1 3 4
Recall
the following notation has a dierent meaning (determinant):
det(A) =
1 2 0
9 1 2
1 3 4
Matrices
An obvious fact: Two matrices are said to be equal if they have
the same order and all their elements are equal.
A =
1 2 0
9 1 2
1 3 4
; B =
1 2 0
9 1 2
1 5 4
; C =
1 2 0 1
9 1 2 3
1 3 4 6
A = B and A = C.
Types of Matrices
An upper triangular matrix has the form
a
11
a
12
a
1n
0 a
22
a
2n
.
.
.
.
.
.
.
.
.
.
.
.
0 0 a
nn
b
11
0 0
b
21
b
22
0
.
.
.
.
.
.
.
.
.
.
.
.
b
n1
b
n2
b
nn
d
11
0 0
0 d
22
0
.
.
.
.
.
.
.
.
.
.
.
.
0 0 d
nn
2 1
1 0
1 3
1 0
2 1
3 1
3 1
3 1
2 4
1 3 6 1
1 1 2 1
1 1 1 1
1 1 1 1
0 2 5 0
2 0 1 0
2 1
1 0
1 3
1 3 6 1
1 1 2 1
not dened
Matrix addition and subtraction
Matrices are commutative and associative under addition:
A + B = B + A; A + (B + C) = (A + B) + C
A zero matrix is any matrix with all elements equal to zero,and is
usually written 0:
0 0
0 0
0 0
0 0 0
0 0 0
0 0 0
A + 0 = 0 + A = A
Matrix Multiplication
It is straightforward to multiply matrices by a number k:
k
1 2 0
9 1 2
1 3 4
k 2k 0
9k k 2k
k 3k 4k
1 2 0
0 1 2
1 3 4
1 0 1
1 1 3
2 0 2
=?
Matrix Multiplication
We dene the product of a row vector and a column vector as
being the sum of the products of their components. e.g:
1 2 0
1
1
2
= 1 1 +2 1 + 0 2 = 1
To multiply two matrices we multiply the rows of the rst one by
the columns of the second one.
Matrix Multiplication
1 2 0
0 1 2
1 3 4
1 0 1
1 1 3
2 0 2
Matrix Multiplication
1 2 0
0 1 2
1 3 4
1 0 1
1 1 3
2 0 2
1 2
Matrix Multiplication
1 2 0
0 1 2
1 3 4
1 0 1
1 1 3
2 0 2
1 2 5
Matrix Multiplication
1 2 0
0 1 2
1 3 4
1 0 1
1 1 3
2 0 2
1 2 5
5
and so forth. . .
Matrix Multiplication
1 2 0
0 1 2
1 3 4
1 0 1
1 1 3
2 0 2
1 2 5
5 1 7
12 3 18
2 0
1 1
A =
1 0
3 1
1 0
3 1
2 0
1 1
2 0
5 1
2 0
1 1
1 0
3 1
2 0
4 1
Matrix Multiplication
Matrix multiplication has some other strange properties:
AB = 0 does not necessarily mean that A = 0 or B = 0
1 1
0 0
2 0
2 0
0 0
0 0
k=1
a
ik
b
kj
where N is the number of columns of A and the number of rows
of B.
Identity Matrix
The identity matrix I is the matrix with the property
AI = IA = A
I =
1 0
0 1
for 2 2 matrices
I =
1 0 0
0 1 0
0 0 1
for 3 3 matrices
Inverse of a Matrix
The inverse of a square matrix A is written A
1
and has the
property
A
1
A = AA
1
= I
A matrix only has one inverse
This means that if it exists, the inverse of a matrix is unique.
Inverse of a Matrix
Inverse of a 2 2 matrix.
if A =
a b
c d
, A
1
=
1
ad bc
d b
c a
Remarks:
ad bc is the determinant of the matrix.
The inverse is dened only if det(A) = ad bc = 0.
If det(A) = 0, A is said to be a singular matrix.
For larger square matrices there is a more general way to
compute inverses. Well see that shortly.
The sum of the diagonal elements of A is called the trace of
A: tr(A) = a + d.
Transpose of a Matrix
The transpose of a matrix is obtained by interchanging the rows
and the columns:
If A =
1 3 6 1
1 1 2 1
, A
T
=
1 1
3 1
6 2
1 1
1 0
2 1
; B =
1 2
2 1
; C =
0 0
0 1
1 2
2 1
B
1
=
1
1 4
1 2
2 1
=
1
5
1 2
2 1
C A =
1 0
2 0
X =
1
10
1 2
2 1
1 0
2 0
=
1
10
3 0
4 0
Matrix Algebra
Example
Given
B =
1 1
1 1
; C =
4 2
0 1
2 1
1 2
(I + B)
1
=
1
3
2 1
1 2
X =
1
3
4 2
0 1
2 1
1 2
=
1
3
6 0
1 2
Linear Systems
Linear system of equations
A system of equations is a set of mathematical statements
containing several unknown quantities.
If unknowns can be found so that all the statements are
satised then we say that the system has a solution.
There are three possibilities when trying to nd the solution:
1
There is too little information to nd the unknowns.
2
There is too much information to nd the unknowns.
3
There is exactly the right amount of information.
Linear system of equations
Example
From the two statements
1
There are twice as many sheep as people in Australia.
2
There are 20 million more sheep than people in Australia.
we can construct the system of equations
s = 2p
s = p + 20
p = 20, s = 40 (in millions)
Unique solution
Linear system of equations
Example
From the two statements
1
There are 20 million more sheep than people in Australia
2
There is the same number of sheep as people in Australia
we can construct the system of equations
s = p + 20
s = p
No solution The two statements are inconsistent
Linear system of equations Graphical interpretation
Linear system of equations
An equation for several unknowns x
1
, x
2
. . . x
n
is linear if it can be
put in the form
a
1
x
1
+ a
2
x
2
+ + a
n
x
n
= b
where the coecients a
1
. . . a
n
and b are constants.
A set of linear equations is known as a linear system.
Linear system of equations
A linear system of m equations in n unknowns is a set of equations
of the form
a
11
x
1
+ a
12
x
2
+ + a
1n
x
n
= b
1
a
21
x
1
+ a
22
x
2
+ + a
2n
x
n
= b
2
.
.
.
a
m1
x
1
+ a
m2
x
2
+ + a
mn
x
n
= b
m
A solution is a set of numbers (x
1
, x
2
, . . . , x
n
) that satises
all m equations.
This set of numbers can be gathered into a vector.
Linear system of equations
The augmented matrix associated with the system is
a
11
a
12
a
1n
b
1
a
21
a
22
a
2n
b
2
.
.
.
.
.
.
.
.
.
.
.
.
a
m1
a
m2
a
mn
b
m
1 2 1 11
0 3 1 25
0 0 2 70
x
1
+ 2x
2
+ x
3
= 11
3x
2
+ x
3
= 25
2x
3
= 70
From the third row we get: 2x
3
= 70 x
3
= 35
From row 2 we get: 3x
2
+ x
3
= 25 x
2
=
10
3
Finally we get: x
1
+ 2x
2
+ x
3
= 11
x
1
+
20
3
+ 35 = 11 x
1
=
92
3
Row-echelon form
A matrix is in row echelon form if
All rows that contain only zeros are grouped at the bottom of
the matrix.
In any two consecutive non-zero rows, the leftmost non-zero
entry in the lower row occurs farther to the right than the
leftmost nonzero entry in the upper row.
We call a row (column) nonzero if it contains at least one nonzero
entry.
Row-echelon form
A matrix in row-echelon form has a staircase pattern like the
following matrix:
0
0 0 0 0
0 0 0 0 0 0 0
where the greek letters correspond to non-zero values and the stars
may or may not be zero.
For the augmented matrix in row echelon form, each leftmost
nonzero entry corresponds to a basic variable.
For instance, for the matrix above the basic variables are x
1
,
x
2
and x
5
.
Row-echelon form
The row-echelon form can give us some important information
about a system. If a system is consistent (i.e., if it has a solution)
if all variables are basic variables the solution is unique.
if there is at least one non-basic variable there are innitely
many solutions.
Row-echelon form
The number of solutions (unique, none, innitely many) can be
found by looking at the augmented matrix in row-echelon form:
a
11
a
12
a
1n
b
1
a
21
a
22
a
2n
b
2
.
.
.
.
.
.
.
.
.
.
.
.
0 0 a
mn
b
m
unique solution if a
11
, a
22
, . . . , a
mn
= 0
a
11
a
12
a
1n
b
1
a
21
a
22
a
2n
b
2
.
.
.
.
.
.
.
.
.
.
.
.
0 0 0 b
m
no solution if b
m
= 0
a
11
a
12
a
1n
b
1
a
21
a
22
a
2n
b
2
.
.
.
.
.
.
.
.
.
.
.
.
0 0 0 0
1 1 2 2
3 1 1 6
1 3 4 4
1 1 2 2
3 1 1 6
1 3 4 4
1 2 2
1 2 1
3 2 1
2
Augment the matrix with the identity matrix.
1 2 2 1 0 0
1 2 1 0 1 0
3 2 1 0 0 1
3
Use row operations to transform the left half into the identity.
The right half will then be the inverse.
Inverse of a 3 3 Matrix. Method 1: row operations
Example
Solve
x
1
2x
2
+ 2x
3
= 1
x
1
2x
2
+ x
3
= 1
3x
1
2x
2
+ x
3
= 1
by computing the inverse of the matrix associated with the linear
system.
Inverse of a 3 3 Matrix. Method 1: row operations
The augmented matrix is
1 2 2 1 0 0
1 2 1 0 1 0
3 2 1 0 0 1
R
1
R
1
2R
3
R
3
R
1
R
2
5 2 0 1 0 2
1 2 1 0 1 0
0 0 1 1 1 0
R
2
R
2
R
3
5 2 0 1 0 2
1 2 0 1 2 0
0 0 1 1 1 0
R
1
R
1
+ R
2
R
2
5R
2
+ R
1
4 0 0 0 2 2
0 8 0 4 10 2
0 0 1 1 1 0
R
1
R
1
/4
R
2
R
2
/8
1 0 0 0 1/2 1/2
0 1 0 1/2 5/4 1/4
0 0 1 1 1 0
0 1/2 1/2
1/2 5/4 1/4
1 1 0
x
1
x
2
x
3
0 1/2 1/2
1/2 5/4 1/4
1 1 0
1
1
1
0
1/2
0
a
11
a
12
a
21
a
22
x
1
x
2
b
1
b
2
b
1
a
12
b
2
a
22
a
11
a
12
a
21
a
22
; x
2
=
a
11
b
1
a
21
b
2
a
11
a
12
a
21
a
22
a
11
a
12
a
13
a
21
a
22
a
23
a
31
a
32
a
33
x
1
x
2
x
3
b
1
b
2
b
3
x
1
=
b
1
a
12
a
13
b
2
a
22
a
23
b
3
a
32
a
33
a
11
a
12
a
13
a
21
a
22
a
23
a
31
a
32
a
33
; x
2
=
a
11
b
1
a
13
a
21
b
2
a
23
a
31
b
3
a
33
a
11
a
12
a
13
a
21
a
22
a
23
a
31
a
32
a
33
; x
3
=
a
11
a
12
b
1
a
21
a
22
b
2
a
31
a
32
b
3
a
11
a
12
a
13
a
21
a
22
a
23
a
31
a
32
a
33
a
11
a
12
a
13
a
21
a
22
a
23
a
31
a
32
a
33
= a
11
a
22
a
23
a
32
a
33
a
12
a
21
a
23
a
31
a
33
+ a
13
a
21
a
22
a
31
a
32
1 2 2
1 2 1
3 2 1
1 2 3
0 5 2
0 0 1
= 1 5 1 = 5
General properties of determinant
det(A + B) = det(A)+det(B).
det(AB) = det(A)det(B).
det(A)det(A
1
)=1.
A has an inverse if and only if det(A) = 0.
Steps to evaluate determinants using row reduction:
1
Reduce the determinant to row-echelon form (keeping track of
row-swaps and multiplication by numbers).
2
Multiply the coecients along the diagonal.
Linear Systems Summary
We have seen 3 methods to solve a linear system
1
Gauss elimination.
2
Using the inverse matrix.
3
Cramers rule.