You are on page 1of 32

Instructor

Yoon Yong Jin


Room: N3.2-01-22
Tel: 6790-5033
E-mail: yongjiny@ntu.edu.sg

Linear Algebra
What we will do during the first 3 weeks
Review of matrices
Systems of linear algebraic equations AX=B
Finding solution(s) by row operations

Inverse of a square matrix A


Finding inverse by row operations

Determinant of a square matrix A


Calculating determinant by row operations

Bigger pictures: how are these 3 topics connected together?


In between, we will look at vector space and linearly independent
vectors.

Matrix eigenproblem
Diagonalisation problem

Review: Product of matrices


Let A=(aij) and B=(bij) be MN and PQ matrices
respectively.
If N=P, we can form the product matrix AB.
If AB is denoted by C= (cij) then C is MQ and the
element ckp is calculated using the k-th row of A and p-th
column of B as follows.
b1 p

b2 p

ckp = ( ak1 ak 2 akN ) = ak1b1 p + ak 2b2 p + + akN bNp



N
bNp
=
a b

n =1

What is the condition for forming the product BA?


What is the order of BA if it can be formed?

kn

nj

Example:

1 2
5

3 4
Q
=
3
5 6

32

2 24

We can form PQ but not QP.

1 2

5 1 2 2
PQ =
3 4

3
3
1
2
24
5 6

32

11 7 4 6

27
15
10
14

43 23 16 22

34

Multiplication of matrices is not commutative, that is, even if AB and


BA can be formed, AB may or may not be equal to BA.

Review: Transpose of a matrix


If A is an MN matrix then the transpose of A is the NM matrix
obtained as follows:
The i-th column of the transpose of A (AT) is the i-th row of A.
The transpose of A is denoted by AT.
Examples:

1

A = 2
3

1

=
A T =
2
3

3
4
1 2

BT
B = 5 6
7=
8
9 10 11 12

(1

3)

3
4
1 2

=
5
6
7
8

9 10 11 12

2
3

5 9

6 10
7 11

8 12

Heres a system of N linear algebraic


equations in N unknowns.

a11 x1 + a12 x2 + a13 x3 + ... + a1N xN =


b1
a21 x1 + a22 x2 + a23 x3 + ... + a2 N xN =
b2

aN 1 x1 + aN 2 x2 + aN 3 x3 + ... + aNN xN =
bN

aij

is the (constant) coefficient of the unknown xj in the i-th equation.

bi

is the constant term in the i-th equation.

The system can be written in matrix


form AX =B, where:
a11

a12

A=

aN 1
x1

x2

X=

xN

a12
a22

aN 2

b1

b2

B=


bN

... a1N
... a2 N

aNN

Example:

2x + 3y =
10
x + y =
0
2 3 x 10

=
1 1 y 0

2 x + 3 y 10

=
x + y 0

It is possible that a system of linear


algebraic equations has no solution.
Example:

x+ y =
10
x+ y =
5
Such a system is said to be inconsistent.

It is possible that a consistent system


has more than one solutions.
Example:

x+ y =
10
10
2x + 2 y =
20 x + y =
The system really contains only one linear algebraic
equation in 2 unknowns!
So we can find infinitely many solutions for the system.

If a consistent system of linear algebraic


equations has only one solution, we say
the system has a unique solution.
To summarise, a system of linear algebraic
equations can either be consistent or inconsistent.
If it is consistent, it can have either a unique
solution or infinitely many solutions.

Given a system of linear algebraic


equations AX = B, how do we know
whether it is consistent or not?
If it is consistent, how do we find all
its solutions?

Reduce the system AX = B to a


simpler but equivalent system
UX = C.
AX = B and UX = C are equivalent if they have
exactly the same solution(s).
If we can work out the solution(s) of UX = C,
we would have solved AX = B.
If the square matrix U is an upper triangular
matrix, the system UX = C would be simpler
enough for us to work out its solution(s) (if any).

What is an upper triangular matrix?


E.g.

1 4 5

0
1
6

0 0 2

0 0 0

8
0

To solve AX = B, reduce it to an
equivalent system UX = C, where
U is an upper triangular matrix.
How can this be done?
Write AX = B in tableau form A | B.
E.g.

2x + 3y + 4z =
6

3x + 5 y 2 z =
7
x + 10 y + 5 z =
9

2 3 4 6
3 5 2 7
1 10 5 9

Use legitimate row operations in a systematic


manner to reduce the tableau to become U | C.

There are 2 types of legitimate row


operations.

Ri R j

Interchange i-th and j-th rows.

Use row j to change row i to


Ri Ri + R j become R + R .
i
j
Important. The constant is not allowed to be zero.
Why? Why R1 R3 (say) is not allowed?
A simple rule to observe
In changing a tableau by the second type of row
operation, keep one row fixed. Use the fixed row
to change other row(s).

Example
Solve the system (if it is consistent)

x + y 2 z + 3w =
2
x+ yz+w=
5
2x y + 4z =
1
y+z+w=
8

1 2 3 2

1 2 3 2

1 1 1 1 5
2 1 4 0 1
0 1 1 1 8

-3

8 -6 -3 R3 R3 2 R1

1 1 8

1 -2

3 R2 R2 R1

1 2

1 2

0 0
0 3

1 2 3
8 6 3

0 1
0 3

1 1 8
8 6 3

1 2

1 1

0 1
0 0
0 0

1
1
8
11 3 21
0 -19 12
R4 11R4 R3

1
0
0
0

R2 R4

1 2 3 2
1 1 1 8
0 11 -3 21 R3 R3 + 3R2
0

1 2

1 1 2
0 1
0 0
0 0

1
1 8
11 3 21
0 19 12

x + y 2 z + 3w =
2
y+z+w=
8
11z 3w = 21 z = (21 + 3w) /11 = 33/19
19 w =
12 w =
12 /19

The only solution of the system is

x 9 /19

y
131/19
=

z 33/19

w 12 /19

Example
Solve the system (if it is consistent):

x + 2 y + 3z =
6
5x + 6 y + 7 z =
8
8 x + 9 y + 10 z =
0

5
8

6
9

7
10

8
0

1
0
0

22

14

48

R2 R2 5 R1
R3 R3 8 R1

1
0
0

2
4
7

3
6
8 22
14 48

1
0
0

2
4
0

3
8

6
22

38

R3 4 R3 7 R2

The last row gives a nonsensical statement!


The system is inconsistent.

Example

x + 2 y + 3z =
8
5x + 6 y + 7 z =
24
8 x + 9 y + 10 z =
36

1
2
3
8
0 4 8 16
0

There is nothing wrong with the last row. It tells that


there are only 2 independent equations. The system
has infinitely many solutions.
Let z = s (s is any arbitrary real number).

4 y 8s =16 y =
4 2s
x + 2(4 2s) + 3s = 8 x = s

x

y=
z

4 2s
s

Example

x + 2 y + 3z + 2w =
1
2 x + 5 y + 6 z + 4w =
0
3x + 7 y + 9 z + 6w =
1
x + 3 y + 3z + 2w =
1

1 2

0 1
0 0

0
0

1
0 2
0 0

0 0

There are only two independent equations here.


We can let two of the unknowns be any values
but second row in the final tableau tells us that
y = 2.
Let z=t1 and w=t2.

x + 2(2) + 3t1 + 2t2 =


1

A homogeneous system of linear


algebraic equation is one of the form
a11 x1 + a12 x2 + + a1(N1) xN 1 + a1N xN = 0
a21 x1 + a22 x2 + + a2(N 1) xN 1 + a2N xN = 0
a31 x1 + a32 x2 + + a3(N 1) xN 1 + a3N xN = 0
aN1 x1 + aN2 x2 + + a(N 1) xN 1 + aNN xN = 0
In matrix form, it can be written as AX = 0

where 0 =

0
.

A homogeneous system AX=0 is


always consistent.
x1

x2

xN

0

= 0 is a solution, no matter what A is.
trivial solution

0

A|0

U|0

Depending on what A is, the homogeneous system


AX=0 has either only one (unique) solution given by
X=0 or infinitely many solutions (one of which is X=0).

Example
Find all solutions of the homogeneous system

x + 2 y + 3z =
0
5x + 6 y + 7 z =
0
8 z + 9 z + 10 z =
0

z =t
y = 2t
x=t
infinitely many
solutions

1
5

2
6

3
7

0
0

10

1
0

2
-4

3
-8

-7

0
0 R2 R2 5 R1
0 R3 R3 8 R1

1
0
0

2
4
0

-14

3
8

0
0

R3 4 R3 7 R2

A|B

U|C

We can make the following general observations:


If all the diagonal elements of U are not zero,
the system AX=B has only one solution.
(For a homogeneous system, this means X=0
is the only solution.)
If at least one diagonal element of U is zero,
the system AX=B has either no solution or
infinitely many solutions.
(For a homogeneous system, this means that
there are infinitely many solutions, one of
which is X=0.)

Vector space
An N-th dimensional vector is a well-ordered set of

x1

x2
N real numbers written in the form .

xN
For example,

and
3

4-th dimensional vectors.

2

8 are two different
4

3

The set of all N-th dimensional vectors


forms a vector space denoted by RN.
For example, R3 is the set of all three-dimensional
1

vectors and 0 is a member of R3, that is, we


2

1

3
0

R
write
.

We can think of solutions of a linear algebraic equation


in N unknowns as vectors in RN.

Linear combination of vectors


Let u and v1, v2, , vK1 and vK be vectors in RN.
We say that u is a linear combination of v1, v2,
, vK1 and vK if we can find real numbers
a1, a2, , aK1 and aK such that
u = a1 v1 + a2 v2 + +aK1 vK1 + aK vK

5
Example:

If possible, express 3 as a linear combination of
4
0


1 3
and 1 .

1, 0
3
0 1

If possible, find a, b and c such that

1
3
0
a + 3b
5
a 1 + b 0 +c 1 = a +c

-3 =

b + 3c
-4
0
1
3


If possible, solve: a + 3b +0c = 5 If this system has no

a + 0b + c = 3
0a + b +3c = 4

solution, it is not possible


to express the first vector
as a linear combination of
the three vectors.

Write the equations in tableau form:

a
1
1
0

b
3
0
1

c
0
5
1 3
3 4

1 3 0 5
0 3 1 8
0 1 3 4

R2 R2 R1

10c = 20 c = 2
3b+(2) = 8 b = 2
a+3(2) = 5 a = 1

1
0
0

3 1 8
0 10 20

R3 3R3 + R2

5
Yes, we can express 3 as a linear combination of

4
0

1
3


and 1 !
1 , 0

Specifically, we find that:

5
1 3
0



3 = (1) 1 + 2 0 + (2) 1
4
0 1
3

You might also like