Linear Algebra Review and NumPy Basics1
Linear Algebra Review and NumPy Basics1
Chris J. Maddison
University of Toronto
1Slides adapted from Ian Goodfellow's Deep Learning textbook lectures
Intro ML (UofT)
STA314-Tut02
1 / 27
About this tutorial
Not a comprehensive survey of all of linear algebra. Focused on the subset most relevant to machine learning. Larger subset: e.g., Linear Algebra by Gilbert Strang
Intro ML (UofT)
STA314-Tut02
2 / 27
Scalars
A scalar is a single number Integers, real numbers, rational numbers, etc. Typically denoted in italic font:
a, n, x
Intro ML (UofT)
STA314-Tut02
3 / 27
Vectors
A vector is an array of d numbers xi be integer, real, binary, etc. Notation to denote type and size:
x Rd
x1
x = x...2 xd
Intro ML (UofT)
STA314-Tut02
4 / 27
Matrices
A matrix is an array of numbers with two indices
Ai,j be integer, real, binary, etc.
Notation to denote type and size:
A Rm?n
A = A1,1 A1,2 A2,1 A2,2
Intro ML (UofT)
STA314-Tut02
5 / 27
be defined, A must have the same number of columns as B has
Matrix (Dot) Product ptheMemmaattrrniixxapn(rdDodBouctt)isjuPosftrsobhydaupplecactning tpw, othoernmCoreismoaftsrihcaespetomgethepr.,
matrix
product
just
by C
placing = AB.
two
or
more
matrices
toget(h2e.4r),
Matrix product AB is the matrix such that ct operation is deCfine=d AbyB.
(2.4)
eration
is
defineCd ib,jy=
X
(AB
Ai,k Bk,j
.)i
,j
=
Xk
k
Ai,k Bk,j .
(2.5)
the
standardCpir,oj d=uct kof
Atwi,ok Bmka,tjr.ices
is
not
just
a
matrix
(2.5) containing
f the individual elements. Such an operation exists and is called the
parnodduacrtdoprrHodaduacmt aorfdtwproodmucatt,riacneds iiss dneontojtuesdtaas mAatrBix. containing
ondduicvtidbumetawl eeelnemtweontvse.ctSourschxaanndopy=eorfamtihoensaemxiestdsimanend?siionsncaaliltlyedistthhee
t xor>yH.aWdaemcarndthpirnokduocf tt,haenmdaitsrixdepnrotdeudctaCs A= ABB.as computing
tbpertowdeuecnt tbweotwveeecntororswxi oafnAd yanodf ctohleumsanmjeodfimBe. nsionality is thep
y. We can think of pthe m34atrix product Cn= AB as coMmusptuting
duct between row i of A and column j of B.
match
34
(Goodfellow 2016)
This also defines matrix-vector products Ax and x A.
Intro ML (UofT)
STA314-Tut02
6 / 27
Identity Matrix
The identity matrix for Rd is the matrix Id such that
x Rd , Id x = x
For example, I3:
100
I3 = 0 1 0
001
Intro ML (UofT)
STA314-Tut02
7 / 27
Matrix Transpose
The transpose of a matrix A is the matrix A such that (A )i,j = Aj,i .
A1,1
A = A2,1 A3,1
A1,2 A2,2 = A A3,2
=
A1,1 A1,2
A2,1 A2,2
A3,1 A3,2
The transpose of a matrix can be thought of as a mirror image across the main diagonal. The transpose switches the order of the matrix product.
(AB) = B A
Intro ML (UofT)
STA314-Tut02
8 / 27
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- the coppersmith winograd matrix multiplication algorithm
- matrix exponentials mit
- numerical computing in python cornell university
- numpy ohio state university
- 100 numpy exercises
- octave tutorial 3 vector and matrix operations
- pointwise operations in numpy
- linear algebra and python basics
- numpy for matlab users github pages
- linear algebra review and numpy basics1
Related searches
- linear algebra matrix solver
- linear algebra matrix pdf
- numpy linear algebra tutorial
- python linear algebra library
- java linear algebra library
- linear algebra library
- eigen linear algebra library
- python linear algebra pdf
- linear algebra determinant calculator
- linear algebra matrix calculator
- matrix linear algebra solver
- linear algebra and its applications pdf 5th