18.06.08: ‘Inverting matrices’ Lecturer: Barwick Monday 22 February 2016

advertisement
18.06.08: ‘Inverting
matrices’
Lecturer: Barwick
Monday 22 February 2016
18.06.08: ‘Inverting matrices’
Suppose
๐‘Ž11 ๐‘Ž12
๐‘Ž
๐‘Ž22
๐ด = ( 21
โ‹ฎ โ‹ฎ
๐‘Ž๐‘›1 ๐‘Ž๐‘›2
โ‹ฏ ๐‘Ž1๐‘›
โ‹ฏ ๐‘Ž2๐‘›
)
โ‹ฑ โ‹ฎ
โ‹ฏ ๐‘Ž๐‘›๐‘›
an ๐‘› × ๐‘› (square!!) matrix. We contemplate ๐ด via the map ๐‘‡๐ด โˆถ R๐‘›
R๐‘› .
18.06.08: ‘Inverting matrices’
Recall that ๐‘‡๐ด is defined by the rule
๐‘ฃ1
๐ดโƒ— 1 ⋅ ๐‘ฃ1โƒ—
∑๐‘›๐‘–=1 ๐‘Ž1๐‘– ๐‘ฃ๐‘–
๐‘›
๐‘›
๐‘ฃ
๐ดโƒ— ⋅ ๐‘ฃ โƒ—
∑ ๐‘Ž ๐‘ฃ
๐‘‡๐ด (๐‘ฃ)โƒ— = ๐ด ( 2 ) = ∑ ๐‘ฃ๐‘– ๐ด๐‘–โƒ— = ( ๐‘–=1 2๐‘– ๐‘– ) = ( 2 2 ) .
โ‹ฎ
โ‹ฎ
โ‹ฎ
๐‘–=1
๐‘›
โƒ—
๐‘ฃ๐‘›
๐ด ๐‘› ⋅ ๐‘ฃ๐‘›โƒ—
∑๐‘–=1 ๐‘Ž๐‘›๐‘– ๐‘ฃ๐‘–
We’re interested in inverting ๐‘‡๐ด ; that is, we’re interested in finding, for each
vector ๐‘คโƒ— ∈ R๐‘› , a vector ๐‘ฅโƒ— ∈ R๐‘› such that ๐‘คโƒ— = ๐ด๐‘ฅ.โƒ— When we can do this, we
write
๐‘ฅโƒ— = ๐‘‡๐ด−1 (๐‘ค).
โƒ—
18.06.08: ‘Inverting matrices’
In other words, we want to have a way of solving uniquely any system of linear
equations that looks like
๐‘›
๐‘ค1
=
∑ ๐‘Ž1๐‘– ๐‘ฅ๐‘– ;
๐‘–=1
๐‘›
๐‘ค2
=
∑ ๐‘Ž2๐‘– ๐‘ฅ๐‘– ;
๐‘–=1
โ‹ฎ
๐‘›
๐‘ค๐‘›
=
∑ ๐‘Ž๐‘›๐‘– ๐‘ฅ๐‘– ,
๐‘–=1
regardless of what numbers ๐‘ค1 , … , ๐‘ค๐‘› are!
Note that we can’t always do this …
18.06.08: ‘Inverting matrices’
Here’s a 5 × 5 matrix:
1 1 1 1 1
2 3 4 5 6
(
๐ด=
3 5 7 9 11 )
4 7 10 13 16
10
16 22 28 34 )
(
I know straightaway that I won’t be able to solve just any old equation ๐‘คโƒ— = ๐ด๐‘ฅ.โƒ—
(How?)
18.06.08: ‘Inverting matrices’
Here’s the bit that is genuinely surprising: suppose ๐ด is invertible – that is,
suppose we can find, for each vector ๐‘คโƒ— ∈ R๐‘› , a vector ๐‘ฅโƒ— ∈ R๐‘› such that
๐‘คโƒ— = ๐ด๐‘ฅ.โƒ— Then there’s a matrix ๐ด−1 such that
๐‘ฅโƒ— = ๐ด−1 ๐‘ค.โƒ—
Let us reflect upon this miracle!
18.06.08: ‘Inverting matrices’
What we’re saying is that if ๐ด is invertible, then any system of linear equations
๐‘›
๐‘ค1
=
∑ ๐‘Ž1๐‘– ๐‘ฅ๐‘– ;
๐‘–=1
๐‘›
๐‘ค2
=
∑ ๐‘Ž2๐‘– ๐‘ฅ๐‘– ;
๐‘–=1
โ‹ฎ
๐‘›
๐‘ค๐‘›
=
∑ ๐‘Ž๐‘›๐‘– ๐‘ฅ๐‘–
๐‘–=1
18.06.08: ‘Inverting matrices’
admits a unique solution, and moreover that there’s some matrix
๐ด−1
๐‘11 ๐‘12
๐‘
๐‘
= ( 21 22
โ‹ฎ โ‹ฎ
๐‘๐‘›1 ๐‘๐‘›2
such that for any ๐‘–,
โ‹ฏ ๐‘1๐‘›
โ‹ฏ ๐‘2๐‘›
)
โ‹ฑ โ‹ฎ
โ‹ฏ ๐‘๐‘›๐‘›
๐‘›
๐‘ฅ๐‘– = ∑ ๐‘๐‘–๐‘— ๐‘ค๐‘— .
๐‘—=1
What are the columns of this matrix?
18.06.08: ‘Inverting matrices’
When ๐‘› = 1, this is familiar. A 1 × 1 matrix ๐ด is just a number. When is ๐ด
invertible? What’s the inverse matrix ๐ด−1 ?
18.06.08: ‘Inverting matrices’
When ๐‘› = 2, the action gets a bit more interesting:
๐ด=(
๐‘Ž ๐‘
)
๐‘ ๐‘‘
In order for ๐ด to be invertible, I need to know that any time I have a couple
of numbers ๐‘ข and ๐‘ฃ, I can solve the system of linear equations
๐‘ข = ๐‘Ž๐‘ฅ + ๐‘๐‘ฆ;
๐‘ฃ = ๐‘๐‘ฅ + ๐‘‘๐‘ฆ
for ๐‘ฅ and ๐‘ฆ. Let’s work our way through the computation.
18.06.08: ‘Inverting matrices’
So our 2 × 2 matrix ๐ด is invertible if and only if ๐‘Ž๐‘‘ − ๐‘๐‘ ≠ 0, in which case we
have
๐‘‘
−๐‘
๐‘‘ −๐‘
1
๐‘Ž๐‘‘−๐‘๐‘ ) .
๐ด−1 =
(
) = ( ๐‘Ž๐‘‘−๐‘๐‘
−๐‘
๐‘Ž
๐‘Ž๐‘‘ − ๐‘๐‘ −๐‘ ๐‘Ž
๐‘Ž๐‘‘−๐‘๐‘
๐‘Ž๐‘‘−๐‘๐‘
The number ๐‘Ž๐‘‘ − ๐‘๐‘ is called the determinant of ๐ด.
18.06.08: ‘Inverting matrices’
The 2 × 2 case is, sadly, a bit misleading. General formulæ are not always so
pleasant, or so useful. The problem is that the complexity of these formulæ
increases like ๐‘›3 ๐‘›!. So the 3 × 3 case isn’t so bad: the matrix
๐‘Ž ๐‘ ๐‘
๐ด=( ๐‘‘ ๐‘’ ๐‘“ )
๐‘” โ„Ž ๐‘–
is invertible if and only if
๐‘Ž(๐‘’๐‘– − ๐‘“โ„Ž) − ๐‘(๐‘‘๐‘– − ๐‘“๐‘”) + ๐‘(๐‘‘โ„Ž − ๐‘’๐‘”) ≠ 0,
18.06.08: ‘Inverting matrices’
and in that case,
−1
๐ด
๐‘’๐‘– − ๐‘“โ„Ž ๐‘โ„Ž − ๐‘๐‘– ๐‘๐‘“ − ๐‘๐‘’
1
=
( ๐‘“๐‘” − ๐‘‘๐‘– ๐‘Ž๐‘– − ๐‘๐‘” ๐‘๐‘‘ − ๐‘Ž๐‘“ ) .
๐‘Ž(๐‘’๐‘– − ๐‘“โ„Ž) − ๐‘(๐‘‘๐‘– − ๐‘“๐‘”) + ๐‘(๐‘‘โ„Ž − ๐‘’๐‘”)
๐‘‘โ„Ž − ๐‘’๐‘” ๐‘๐‘” − ๐‘Žโ„Ž ๐‘Ž๐‘’ − ๐‘๐‘‘
18.06.08: ‘Inverting matrices’
However, the 4 × 4 case already pushes the utility of general formulæ to their
breaking point: consider the matrix
๐‘Ž11
๐‘Ž
๐ด = ( 21
๐‘Ž31
๐‘Ž41
๐‘Ž12
๐‘Ž22
๐‘Ž32
๐‘Ž42
๐‘Ž13
๐‘Ž23
๐‘Ž33
๐‘Ž43
๐‘Ž14
๐‘Ž24
).
๐‘Ž34
๐‘Ž44
18.06.08: ‘Inverting matrices’
Now ๐ด is invertible if and only if
det(๐ด) = ๐‘Ž14 ๐‘Ž23 ๐‘Ž32 ๐‘Ž41 − ๐‘Ž13 ๐‘Ž24 ๐‘Ž32 ๐‘Ž41 − ๐‘Ž14 ๐‘Ž22 ๐‘Ž33 ๐‘Ž41 + ๐‘Ž12 ๐‘Ž24 ๐‘Ž33 ๐‘Ž41
+ ๐‘Ž13 ๐‘Ž22 ๐‘Ž34 ๐‘Ž41 − ๐‘Ž12 ๐‘Ž23 ๐‘Ž34 ๐‘Ž41 − ๐‘Ž14 ๐‘Ž23 ๐‘Ž31 ๐‘Ž42 + ๐‘Ž13 ๐‘Ž24 ๐‘Ž31 ๐‘Ž42
+ ๐‘Ž14 ๐‘Ž21 ๐‘Ž33 ๐‘Ž42 − ๐‘Ž11 ๐‘Ž24 ๐‘Ž33 ๐‘Ž42 − ๐‘Ž13 ๐‘Ž21 ๐‘Ž34 ๐‘Ž42 + ๐‘Ž11 ๐‘Ž23 ๐‘Ž34 ๐‘Ž42
+ ๐‘Ž14 ๐‘Ž22 ๐‘Ž31 ๐‘Ž43 − ๐‘Ž12 ๐‘Ž24 ๐‘Ž31 ๐‘Ž43 − ๐‘Ž14 ๐‘Ž21 ๐‘Ž32 ๐‘Ž43 + ๐‘Ž11 ๐‘Ž24 ๐‘Ž32 ๐‘Ž43
+ ๐‘Ž12 ๐‘Ž21 ๐‘Ž34 ๐‘Ž43 − ๐‘Ž11 ๐‘Ž22 ๐‘Ž34 ๐‘Ž43 − ๐‘Ž13 ๐‘Ž22 ๐‘Ž31 ๐‘Ž44 + ๐‘Ž12 ๐‘Ž23 ๐‘Ž31 ๐‘Ž44
+ ๐‘Ž13 ๐‘Ž21 ๐‘Ž32 ๐‘Ž44 − ๐‘Ž11 ๐‘Ž23 ๐‘Ž32 ๐‘Ž44 − ๐‘Ž12 ๐‘Ž21 ๐‘Ž33 ๐‘Ž44 + ๐‘Ž11 ๐‘Ž22 ๐‘Ž33 ๐‘Ž44 ≠ 0.
And I just refuse to write down the formula for the inverse. Ain’t nobody got
time for that.
18.06.08: ‘Inverting matrices’
Still, the idea of inversion has conceptual value. Recall that the following are
logically equivalent for an ๐‘› × ๐‘› matrix ๐ด:
โƒ— are linearly independent;
1. the column vectors ๐ด1โƒ— , ๐ด2โƒ— , … , ๐ด๐‘š
2. the row vectors ๐ดโƒ— 1 , ๐ดโƒ— 2 , … , ๐ดโƒ— ๐‘š are linearly independent;
18.06.08: ‘Inverting matrices’
3. the system of linear equations
0
=
๐‘Ž11 ๐‘ฅ1 + ๐‘Ž12 ๐‘ฅ2 + โ‹ฏ + ๐‘Ž1๐‘› ๐‘ฅ๐‘› ;
0
=
๐‘Ž21 ๐‘ฅ1 + ๐‘Ž22 ๐‘ฅ2 + โ‹ฏ + ๐‘Ž2๐‘› ๐‘ฅ๐‘› ;
โ‹ฎ
0
=
๐‘Ž๐‘›1 ๐‘ฅ1 + ๐‘Ž๐‘›2 ๐‘ฅ2 + โ‹ฏ + ๐‘Ž๐‘›๐‘› ๐‘ฅ๐‘› ;
has exactly one solution (namely 0).
18.06.08: ‘Inverting matrices’
We have more:
4. for any real numbers ๐‘ค1 , … , ๐‘ค๐‘› , the system of linear equations
๐‘ค1
=
๐‘Ž11 ๐‘ฅ1 + ๐‘Ž12 ๐‘ฅ2 + โ‹ฏ + ๐‘Ž1๐‘› ๐‘ฅ๐‘› ;
๐‘ค2
=
๐‘Ž21 ๐‘ฅ1 + ๐‘Ž22 ๐‘ฅ2 + โ‹ฏ + ๐‘Ž2๐‘› ๐‘ฅ๐‘› ;
โ‹ฎ
๐‘ค๐‘›
=
๐‘Ž๐‘›1 ๐‘ฅ1 + ๐‘Ž๐‘›2 ๐‘ฅ2 + โ‹ฏ + ๐‘Ž๐‘›๐‘› ๐‘ฅ๐‘› ;
has exactly one solution;
5. the matrix ๐ด in invertible;
6. there exists an ๐‘› × ๐‘› matrix ๐ด−1 such that ๐ด−1 ๐ด = ๐ด๐ด−1 = ๐ผ.
18.06.08: ‘Inverting matrices’
There’s even one more:
7. the determinant of ๐ด is nonzero.
(We’ll talk more about determinants later in the course.)
The point is, we have a notion that’s conceptually convenient, but not so very
computable. How do we manage?
18.06.08: ‘Inverting matrices’
Figure 1: Mother Mathematics. Artist’s rendition.
When Mother Mathematics gives you a problem that’s too hard to solve in general,
you solve it in an easy special case, and you try to reduce to that case.
18.06.08: ‘Inverting matrices’
So …which matrices can we invert easily?
18.06.08: ‘Inverting matrices’
Diagonal matrices are pretty easy: the matrix ๐ด = diag(๐œ†1 , … , ๐œ†๐‘› ) is invertible
if and only if none of the ๐œ†๐‘– s are zero, in which case
−1
๐ด−1 = diag(๐œ†−1
1 , … , ๐œ†๐‘› ).
18.06.08: ‘Inverting matrices’
More generally, if I’ve got myself an upper triangular matrix, we should be
able to work out whether it’s invertible:
๐‘Ž11 ๐‘Ž12
0 ๐‘Ž22
๐ด=(
โ‹ฎ โ‹ฎ
0
0
When does that happen?
โ‹ฏ ๐‘Ž1๐‘›
โ‹ฏ ๐‘Ž2๐‘›
).
โ‹ฑ โ‹ฎ
โ‹ฏ ๐‘Ž๐‘›๐‘›
18.06.08: ‘Inverting matrices’
So, what about something that isn’t quite upper triangluar? Is
2
0
๐ด=(
0
0
invertible?
1
3
0
0
8
8
8
8
5
2
)
5
1
18.06.08: ‘Inverting matrices’
Is
(
๐ด=(
(
(
2
1
0
0
0
0
1
3
0
0
0
0
๐‘Ž
๐‘’
8
8
0
0
๐‘
๐‘“
5
1
0
0
๐‘ ๐‘‘
๐‘” โ„Ž
๐‘– ๐‘— )
)
๐‘˜ ๐‘™ )
5 −7
9 1 )
invertible? (Does it matter what ๐‘Ž, ๐‘, ๐‘, ๐‘‘, ๐‘’, ๐‘“, ๐‘”, โ„Ž, ๐‘–, ๐‘—, ๐‘˜, or ๐‘™ are?)
18.06.08: ‘Inverting matrices’
Is
(
(
(
๐ด=(
(
(
(
(
(
invertible?
2
1
1
0
0
0
0
0
1
2
1
0
0
0
0
0
1 ๐‘Ž ๐‘ ๐‘ ๐‘‘ ๐‘’
1 ๐‘“ ๐‘” โ„Ž ๐‘– ๐‘—
2 ๐‘˜ ๐‘™ ๐‘š ๐‘› ๐‘œ )
)
0 5 6 ๐‘ ๐‘ž ๐‘Ÿ )
)
)
0 −4 9 ๐‘  ๐‘ก ๐‘ข )
)
0 0 0 3 1 1 )
0 0 0 1 1 3
0 0 0 1 3 1 )
Download