Professional Documents
Culture Documents
Ma1506chap5 PDF
Ma1506chap5 PDF
Ma1506chap5 PDF
5.1
What is a Matrix?
A system of linear algebraic equations in two variables might look like this:
2x + 7y = 3
4x + 8y = 11
LINEAR because it just involves constant
multiples of x and y, no x2 , no sin(y), etc.
ALGEBRAIC because no dierentiation.
Its cool to write these systems using the following
notation:
][ ] [ ]
2 7
x
3
=
.
4 8
y
11
[ ]
[ ]
x
3
Here
and
are familiar - they are VECy
11
1
2 7
is something new, called a MA4 8
[
]
2 7
TRIX. We say that the PRODUCT of
with
4
8
[ ]
[ ]
x
3
gives you
.
y
11
TORS. But
a11
a21
a31
a12
a22
a32
a13
a23
a33
Matrix Arithmetic
1 2
7 3
8 5
+
=
4 8
6 9
10 17
[
] [
] [
]
7 3
6 1
1 2
=
4 8
6 9
2 1
In general, if aij and bij are matrices (both m by n,
that is, both have m rows and n columns) then the
sum is aij + bij and the dierence is aij bij .
[b] Multiplying By a Number.
Just
as you would for a vector.
]
] [every entry,
[ multiply
2 4
1 2
. The product of the number
=
2
8 16
4 8
c with the matrix aij is c aij .
[c] Transposition.
If you take a matrix and SWITCH THE FIRST
ROW INTO THE FIRST COLUMN, second row
into second column, and so on, the result is called
]T [
]
[
1 4
1 2
=
.
the TRANSPOSE. We write
2 8
4 8
4
1 7
9
1 6 4
6 8
2 = 7 8 10
4 10 12
9 2 12
[
]T
1 6
1 2 4
= 2 8
6 8 9
4 9
[
]T [
]
a11 a12
a11 a21
=
a21 a22
a12 a22
and by looking at this example you can see
aTij = aji the order of the indices is reversed.
Notice that
(
)T
T
T
(aij )
= (aji ) = aij
T
2x + 7y
is a way of saying that the vector
equals
4x
+
8y
[ ]
[
[
][ ]
]
3
2 7
x
2x + 7y
, so
=
. Notice that
11
4
8
y
4x
+
8y
[
]
[ ]
2 7
x
ROWS of
multiply the COLUMN
. We
4 8
y
adopt this as our GENERAL RULE:
ROWS MULTIPLY COLUMNS!
[
][ ] [
] [ ]
2 7
1
2+0
2
=
=
4 8
0
4+0
4
] [ ]
][ ] [
[
7
0+7
0
2 7
=
=
8
0+8
1
4 8
[
][
] [
]
2 7
1 3
16 1
=
4 8
2 1
20 4
[ ]
3
[1 2]
= 11, a 1 by 1 matrix! Also called a
4
NUMBER!
[
][
]
a11 a12
b11 b12
a21 a22
b21 b22
[
]
a11 b11 + a12 b21 a11 b12 + a12 b22
=
a21 b11 + a22 b21 a21 b12 + a22 b22
6
[
=
c11
c21
c12
c22
]
so we have
a1j bj1
a1j bj2
a2j bj1
a2j bj2
amj bjn .
NOTE that
[
][
] [
]
2 7
1 3
16 1
=
4 8
2 1
20 4
][
] [
]
[
2 7
14 31
1 3
=
completely dierent!
4 8
0 6
2 1
So the ORDER OF MATRIX MULTIPLICATION
7
But
[ ]
8
= [8
1
[
1]
][ ] [ ]
2 3
1
8
=
.
1 1
2
1
1] ,
[
2 3
2 1
=
1 1
3 1
]T
[ ]
1
and
= [1
2
2] .
(AB) = B T AT
8
] [
] [
]
1 3
0 16
1 0
,
,
are all symmetric. Any
3 2
16 109
0 1
matrix of the form B + B T , where B is ANY matrix,
is symmetric. [Proof: (B + B T )T = B T + (B T )T =
B T + B.] If A is symmetric, so is BAB T for any
B [Proof: (BAB T )T = (B T )T AT B T = BAT B T =
BAB T .] A matrix is said to be ANTISYMMETRIC
if
AT = A.
[
] [
] [
]
0
16
0 1
0 1
,
,
are all antisymmet1 0
16 0
1 0
ric. Any matrix of the form BB T is antisymmetric,
and BAB T is antisymmetric if A is antisymmetric.
u v = [ u1
u2
v1
u3 ] v2
v3
= u1 v1 + u2 v2 + u3 v3 = u v .
Thus, in particular, the length of a vector can be
expressed as
T
u = u u = u u.
You are also familiar with the VECTOR or CROSS
trix product! To see this, notice that any threedimensional vector can be used to dene an antisymmetric three by three matrix as follows:
u1
0
u3 u2
u = u2 denes u3
0
u1 .
u3
u2 u1
0
Lets call this matrix A. Then you can check that,
u v = Av.
1 0
where I is the IDENTITY MATRIX, I =
in
0
1
1 0 0
two dimensions, 0 1 0 in three, etc. Note that
0 0 1
IA
[ = A = AI for
] any matrix A. In two dimensions,
cos sin
is orthogonal for any . Since
sin
cos
[
][
]
cos sin
cos sin
sin cos
sin cos
]
[
2
2
cos + sin
0
=
0
sin2 + cos2
]
[
1 0
=
0 1
]
[
cos
sin
.
Another example is
sin cos
14
0.6 0.3
0.4 0.7
15
][
0.6 0.3
= M 2.
0.4 0.7
So matrix multiplication actually allows you to compute all of the probabilities in this Markov Chain.
To predict the weather 4 days from now, we need
]
]
[
[
0.43 0.43
RR4 SR4
= M 4 = M 2M 2 =
.
0.57 0.57
RS4 SS4
So if it is rainy today, the probability of rain in 4
days is 0.43=43%. If you want 20 days, just compute
M 20 . A very complicated problem without matrix
multiplication!
pose that the Republic of Macedonia has an economy with only two sectors, agriculture and manufacturing. Now the agricultural sector has to produce vegetables for export, and the government sets
16
Notice from point [a] that, multiplying everything by A, we can say that in order to produce A
denars worth of vegetables, the agricultural workers have to eat 0.3A denars worth of vegetables, so
the agricultural sector has to produce 0.3A denars
worth of vegetables to feed those workers. This 0.3A
is part of the total agricultural output, A.
Similarly, from point [b], multiplying everything
by M, we can say that in order to produce M denars
worth of manufactured goods, the manufacturing workers have to eat 0.4M denars worth of vegetables. So
the agricultural sector has to produce 0.4M denars
worth of vegetables to feed those workers. This 0.4M
is ALSO part of A.
So A breaks up into three parts, and we must
have
A = 0.3A + 0.4M + 150.
Now we turn to manufacturing. Note that mod18
or
A
M
[
=
0.3 0.4
0.5 0.3
][
A
M
[
+
150
100
u =Tu + c
where u =
A
0.3 0.4
150
,T =
, c =
.
M
0.5 0.3
100
The matrix T contains all of the INTERNAL INFORMATION about the economy of Macedonia. It
is called the TECHNOLOGY MATRIX. An easy
way to construct the matrix is as follows: think of
the COLUMNS as the costs of making a unit of
something. For example, in this case the rst column refers to agriculture, so the costs of making one
denar of vegetables go down that column [0.3 to feed
the agricultural workers who MAKE one denar of
vegetables, and 0.5 to pay for the tractor needed to
MAKE one denar of vegetables.] Similarly the costs
of making one denars worth of manufactured goods
go down the second column. In a more complicated
20
(I T ) u = c .
Now if these were NUMBERS, I could easily solve
][
150
70 40
1
S(I T ) u = S c u = 29
50
70
100
[ ] [
]
A
500
u =
=
A = M = 500, both sectors
M
500
should generate 500 million denars worth of their
22