You are on page 1of 25

Andrew ng

Llnear Algebra
revlew (opuonal)
MaLrlces and
vecLors
Machlne Learnlng
Andrew ng
ulmenslon of maLrlx: number of rows x number of columns
!"#$%&' 8ecLangular array of numbers:
Andrew ng
!"#$%& )*+,+-#. (enLrles of maLrlx)
, enLry" ln Lhe row, column.
Andrew ng
/+0#1$' An n x 1 maLrlx.
n-dlmenslonal vecLor
1-lndexed vs 0-lndexed:
elemenL
Andrew ng
Llnear Algebra
revlew (opuonal)
Addluon and scalar
mulupllcauon
Machlne Learnlng
Andrew ng
!"#$%& 233%41-
Andrew ng
50"*"$ !6*47*%0"41-
Andrew ng
81,9%-"41- 1: ;7+$"-3.
Andrew ng
Llnear Algebra
revlew (opuonal)
MaLrlx-vecLor
mulupllcauon
Machlne Learnlng
Andrew ng
)&",7*+
Andrew ng
<+#"%*.'
m x n maLrlx
(m rows,
n columns)
n x 1 maLrlx
(n-dlmenslonal
vecLor)
m-dlmenslonal
vecLor
1o geL , muluply 's row wlLh elemenLs
of vecLor , and add Lhem up.
Andrew ng
)&",7*+
Andrew ng
Pouse slzes:
Andrew ng
Llnear Algebra
revlew (opuonal)
MaLrlx-maLrlx
mulupllcauon
Machlne Learnlng
Andrew ng
)&",7*+
Andrew ng
<+#"%*.'
m x n maLrlx
(m rows,
n columns)
n x o maLrlx
(n rows,
o columns)
m x o
maLrlx
1he column of Lhe maLrlx ls obLalned by muluplylng
wlLh Lhe column of . (for = 1,2,.,o)
Andrew ng
)&",7*+
2
7
7
Andrew ng
Pouse slzes:
MaLrlx
MaLrlx
Pave 3 compeung hypoLheses:
1.
2.
3.
Andrew ng
Llnear Algebra
revlew (opuonal)
MaLrlx mulupllcauon
properues
Machlne Learnlng
Andrew ng
LeL and be maLrlces. 1hen ln general,
(noL commuLauve.)
L.g.
Andrew ng
LeL
LeL
CompuLe
CompuLe
Andrew ng
=3+-4#> !"#$%&
lor any maLrlx ,
uenoLed (or ).
Lxamples of ldenuLy maLrlces:
2 x 2
3 x 3
4 x 4
Andrew ng
Llnear Algebra
revlew (opuonal)
lnverse and
Lranspose
Machlne Learnlng
Andrew ng
noL all numbers have an lnverse.
!"#$%& %-?+$.+'
lf A ls an m x m maLrlx, and lf lL has an lnverse,
MaLrlces LhaL don'L have an lnverse are slngular" or degeneraLe"
Andrew ng
!"#$%& @$"-.71.+
Lxample:
LeL be an m x n maLrlx, and leL
1hen ls an n x m maLrlx, and

You might also like