Professional Documents
Culture Documents
Lecture3 PDF
Lecture3 PDF
Lecture3 PDF
Algebra
review
(op3onal)
Matrices
and
vectors
Machine
Learning
Andrew
Ng
Matrix:
Rectangular
array
of
numbers:
Andrew
Ng
Vector:
An
n
x
1
matrix.
Andrew
Ng
Linear
Algebra
review
(op3onal)
Addi3on
and
scalar
mul3plica3on
Machine Learning
Andrew
Ng
Matrix
Addi4on
Andrew
Ng
Scalar
Mul4plica4on
Andrew
Ng
Combina4on
of
Operands
Andrew
Ng
Linear
Algebra
review
(op3onal)
Matrix-‐vector
mul3plica3on
Machine
Learning
Andrew
Ng
Example
Andrew
Ng
Details:
m
x
n
matrix
n
x
1
matrix
m-‐dimensional
(m
rows,
(n-‐dimensional
vector
n
columns)
vector)
Andrew
Ng
House
sizes:
Andrew
Ng
Linear
Algebra
review
(op3onal)
Matrix-‐matrix
mul3plica3on
Machine
Learning
Andrew
Ng
Example
Andrew
Ng
Details:
m
x
n
matrix
n
x
o
matrix
m
x
o
(m
rows,
(n
rows,
matrix
n
columns)
o
columns)
2 7
Andrew
Ng
House
sizes:
Have
3
compe3ng
hypotheses:
1.
2.
3.
Matrix
Matrix
Andrew
Ng
Linear
Algebra
review
(op3onal)
Matrix
mul3plica3on
proper3es
Machine Learning
Andrew
Ng
Let
and
be
matrices.
Then
in
general,
(not
commuta3ve.)
E.g.
Andrew
Ng
Let
Compute
Let
Compute
Andrew
Ng
Iden4ty
Matrix
Denoted
(or
).
Examples
of
iden3ty
matrices:
2
x
2
3
x
3
4
x
4
For
any
matrix
,
Andrew
Ng
Linear
Algebra
review
(op3onal)
Inverse
and
transpose
Machine
Learning
Andrew
Ng
Not
all
numbers
have
an
inverse.
Matrix
inverse:
If
A
is
an
m
x
m
matrix,
and
if
it
has
an
inverse,
Matrices
that
don’t
have
an
inverse
are
“singular”
or
“degenerate”
Andrew
Ng
Matrix
Transpose
Example:
Andrew Ng