Linear Algebra
Linear Algebra
I The n n identity matrix I has 1s down the main diagonal and 0s elsewhere.
The 2 2 identity matrix, for example, is
" #
1 0
I = ,
0 1
2 2
2 3 2 3
5 1 " # 5 1
6 7 1 0 6 7
4 8 3 5 = 4 8 3 5 .
0 1
1 0 3 2
2 2 1 0 3 2
0 1T
b
A z }| {
Bz }| { C
B 2 3 C 0" # 1T
B " # C
B 1 C 5
B 1 2 0 6 7 C = @ A ,
B 4 2 5 C 4
B 1 1 1 C 2 1
B 2 3 1 C
@ 3 1 A
AT
z }| {
bT
z }| { 2 3
1 1 h i
h i
6 7 = 5 4 .
1 2 1 4 2 1 5 1 2
1 3
0 1 3 2
" # " #
1 2
I The vectors and are linearly independent if an only if (i )
2 3
the linear relationship
x1 = x2 = 0 .
I Stating that one of the vectors is a scaled version of the other is impossible:
" # " #
x1 1 2
= (impossible).
x2 2 3
" # 1 " # !
1 2 3 2
= , see later in the slides
2 3 2 1
such that
" # 1 " # !T
1 2 1 1 2
= " # ! matrix of cofactors of
2 3 1 2 2 3
det
2 3
| {z }
= 1
" #
1 2
I Notice that is invertible if and only if (i ) it is non-singular, that
2 3
is, its determinant is non-zero:
" # !
1 2
det = 1 ( 1)1+1 det (3) +
2 3 | {z }
the 1-1 cofactor
= 1 3 + 2 ( 2) = 1 .
2 3
6 7
6 ( 1)1+1 det (3) ( 1)1+2 det (2) 7
" # 6 | {z } | {z } 7
6 the 1-1 cofactor the 1-2 cofactor 7
1 2 6 7
matrix of cofactors of = 6
6
7
7
2 3 6 7
6 ( 1)2+1 det (2) ( 1)2+2 det (1) 7
6 | {z } | {z } 7
4 the 2-1 cofactor the 2-2 cofactor 5
2 3
3 2
6 7
= 4 5
2 1
" # 1 " #T
1 2 1 3 2
=
2 3 1 2 1
" #
3 2
=
2 1
" #
a b
.
c d
I Its inverse is
" #
1 d b
.
ad cb c a
I An example is
0 " # 1T 0 " #T 1 1
1
@ 2 0 A @ 2 0 A
=
1 3 1 3
2 3
1 1
6 2 6 7
= 6 7
4 5
0 1
3
I Show that
2 3 1 2 3
1 2 3 0 5 5
6 7 6 7
6 7 6 7
6 7 1 6 7
6 2 3 2 7 = 6 2 7 4 7 .
6 7 6 7
6 7 5 6 7
4 5 4 5
3 3 2 3 3 1
I To compute the determinant of a 3 3 matrix, you can use the Sarrus' rule:
2 3
a a12 a13
6 11 7
6 7
6 7
det 6
6 a21 a22 a23 7
7
6 7
4 5
a31 a32 a33
2 3 2 3 2 3
1 2 3
6 7 6 7 6 7
I The vectors 4 2 5, 4 3 5, and 4 2 5 are linearly independent:
3 3 2
2 3 2 3 2 3 2 3
1 2 3 0
6 7 6 7 6 7 6 7
x1 4 2 5 + x2 4 3 5 + x 3 4 2 5 = 4 0 5
3 3 2 0
x1 = x2 = x3 = 0 .
2 3 2 3 2 3
1 2 3
x1 6 7 x2 6 7 6 7
4 2 5 + 4 3 5 = 4 2 5 (impossible).
x3 3 x3 3 2
I Consider the following linear system in the unknowns x1, x2, and x3 :
8
>
> x 1 + 2 x2 + 3 x3 = 6
>
>
>
>
<
2 x 1 + 3 x 2 + 2 x3 = 1
>
>
>
>
>
>
: 3x + 3 x + 2 x = 0
1 2 3
2 32 3 2 3
1 2 3 x1 6
6 76 7 6 7
4 2 3 2 5 4 x2 5 = 4 1 5
3 3 2 x3 0
2 3 2 3 2 3 2 3
1 2 3 6
6 7 6 7 6 7 6 7
x1 4 2 5 + x 2 4 3 5 + x 3 4 2 5 = 4 1 5
3 3 2 0
2 3
6
6 7
4 1 5
0
2 3 2 3 2 3
1 2 3
6 7 6 7 6 7
4 2 5 , 4 3 5 , and 4 2 5
3 3 2
2 3
1 2 3
6 7
the number of independent columns of 4 2 3 2 5
3 3 2
equals
2 3
1 2 3 6
6 7
the number of independent columns of 4 2 3 2 1 5 .
3 3 2 0
| {z }
complete matrix
I The rank of a matrix measures how many indipendent columns the matrix
has.
2 3 2 3
1 2 3 1 2 3 6
6 7 6 7
4 2 3 2 5 is non-singular so that 4 2 3 2 1 5 has maximum rank (3) .
3 3 2 3 3 2 0
| {z }
complete matrix
I We can work out the solution x1, x2, and x3 by means of the Cramer's
Theorem:
02 31
6 2 3 5
B6
x1 = det @4 1 3 27C
5A = ( 5) = =1 ;
0 3 2 5
02 31
1 6 3 19
B6
x2 = det @4 2 1 27C
5A = ( 5) = = 3:8 ;
3 0 2 5
02 31
1 2 6 21
B6
x3 = det @4 2 3 17C
5A = ( 5) = = 4 :2 :
3 3 0 5
I We can work out x1, x2, and x3 also by means of inversion (given non-
singularity):
2 3 1 2 3 2 3 2 3 1 2 3
1 2 3 1 2 3 x1 1 2 3 6
6 7 6 7 6 7 6 7 6 7
4 2 3 2 5 4 2 3 2 5 4 x2 5 = 4 2 3 2 5 4 1 5
3 3 2 3 3 2 x3 3 3 2 0
2 3 2 3 2 3 1 2 3
1 0 0 x1 1 2 3 6
6 7 6 7 6 7 6 7
4 0 1 0 5 4 x2 5 = 4 2 3 2 5 4 1 5 .
0 0 1 x3 3 3 2 0
2 3 2 3 2 3 2 3
x 0 5 5 6 1
6 1 7 6 7 6 7 6 7
6 7 6 7 6 7 6 7
6 7 1 6 7 6 7 6 19 7
6 x 7 = 6 2 7 4 7 6 1 7 = 6 7
6 2 7
6 7 56
6
7
7
6
6
7
7
6
6
5 7
7
4 5 4 5 4 5 4 5
x3 3 3 1 0 21
5
A
|{z} x
|{z} = b
|{z}
m n n 1 m 1
I Discard the m r rows of A not belonging to Ae. Doing so, you discard
m r redundant equations.
I Consider the following linear system in the unknowns x1, x2, x3 and x4 :
8
>
> x1 x2 + 2 x3 x4 = 1
>
>
>
>
<
2 x1 x2 x3 + 2 x4 = 0
>
>
>
>
>
>
: x1 + 2 x2 + 2 x3 + x4 = 1
2 3 2 3 2 3 2 3 2 3
1 1 2 1 1
6 7 6 7 6 7 6 7 6 7
x1 4 2 5 + x2 4 1 5 + x3 4 1 5 + x4 4 2 5 = 4 0 5 .
1 2 2 1 1
02 31
1 1 2
B6 7C
det @4 2 1 1 5A = 9
1 2 2
2 3 2 3 2 3 2 3 2 3
1 1 2 1 1
6 7 6 7 6 7 6 7 6 7
x1 4 2 5 + x2 4 1 5 + x3 4 1 5 = 4 0 5 x4 4 2 5 ,
1 2 2 1 1
2 3 2 3 1 02 3 2 31 2 1 5x 3
x 1 1 2 1 1 3 4
6 1 7 6 7 B6 7 6 7C 6 3 7
6 7 6 7 B6 7 6 7C 6 7
6 7 6 7 B6 7 6 7C 6 2 16 x 7
6 x 7=6 2 1 7 B
1 7 B6 0 7
6 6
x4 6 2 7C = 6 7 .
6 2 7 6 7 7C 6 9 9 4 7
6 7 6 7 B6 7 6 7C 6 7
4 5 4 5 @4 5 4 5A 4 5
x3 1 2 2 1 1 4x + 4
9 4 9
I Consider the following linear system in the unknowns x1, x2, and x3 :
8
>
> 2 x1 + 7 x2 + x3 = 15
>
>
>
>
>
>
>
>
< 5 x1 + 6 x2 + 8 x3 = 3
>
>
>
> 9 x2 = 27
>
>
>
>
>
>
:
7 x1 + 6 x2 + 7 x3 = 3
I We can work out x1, x2, and x3 by focusing on the rst three equations
(given non-singularity):
2 3 2 3 2 3 2 3
2 7 1 15
6 7 6 7 6 7 6 7
x1 4 5 5 + x2 4 6 5 + x3 4 8 5 = 4 3 5
0 9 0 27
2 3 23 12 3 2 3
x1 2 7 1 15 3
6 7 6 7 6 7 6 7
4 x2 5 = 4 5 6 8 5 4 3 5 = 4 3 5 .
x3 0 9 0 27 0
x1 7 + x2 6 + x3 7 = 21 + 18 + 0 = 3 .