03b MatrixTensor
03b MatrixTensor
Éf
e ca G
Functions and compositeI functions
independent variable
2x KEIR
Eg Lex 5
Ge 506
g
x
fix hea g Lees
35
1 7
2 9 45
3 11 55
H 13 65
if Cox e
fay
co
g o
Gets
f L GO
LG
Scaling
2 d Let 2 13
I Define L as
x fees f is 3
M
Eg
het se
2 y 2 L 3 Y
Xx fi's
Ex
I 2 L 2 819
1819
2
f b
2 2 it
4
It is enough to know
if
to find
I 9
f 9 a be R
can we write
1121 3 9 12
Is stretching a linear transformation
É
Rotation
In general 3 313 a
Shear:
Dy
How about
De nition
Let m n EN A real valued
matrix A is an mn tuple of elements
ai ER I s it m is Jen which
is ordered as m rows d n columns
row
a a 9Heist
Am n nth
amn row
p p
nth Col
gsteal
Network
Adjacency matrix
2 3 4 5 6 7
I T I 0 0 0 1 T
2 I 1 O O O O O
3 0 0 1 0 1 I 0
A s y
5
I
i o o n o f
6 1 0 1 0 1 0
A is a sparse mat
can we store A efficiently
Sparse matrix storage
Ex Compressed
Sparse Row CSR
need two
arrays of
size N where n is
non zeros
not of
Data Matrix
istfeature
921
A
Amn
mthfeature
am Ama
i n person
1stperson nth
Matrix Addition
Amant Bmxn
Let A B E RMN
tb aint bin
At B
icinntion
an tbn
4th F
Matrix-vector multiplication
D
X
I
Ry 3 An 922 923
111 E D'D
that that multi
to L
1
11 11
M M
Shear rotation
f
Ka
and
I T Ts
Ac Ae
where
a a
Gi D Ea
a an
scaleD
Note that
EYE
WA Y Ca
use Column
form find C
AM
Ie II
11 I
I at al's 3
D
Identity matrix Cat He B
j t
The square matrix I is said to be an identity matrix
of
Suppose A AT
A is symmetric
Then where
Transpose of a matrix
ME
- writes Rows of A into Columns of A
Determinant of a matrix:
Al
ÉREY
3 2
How about
How about
A EI
I Al y
LI
s
5 2 51
Suppose
FIRE It
Suppose 1 A1 0
Singual matrix
Inverse of a matrix
Suppose A is a ai clockwise
rotation then A is a go
Counter clockwise rotation
IL A is a leftward shear
then it is a highward shear
Suppose we have
TT
known
Unknown
I known
inverse transformation
Recall Norms of a vector:
Let X E IR ie x x sea
port
then I norm
of x is defined as
110011 is
71 boil
Hy la norm of se is defined as
1101122
Eh boil
Octoc
11041
Fix
How about the norms for matrix?
Column sum norm
Spectral norm
L_p norm
Spectral radius
xd
j Sy
yes
• How to represent in computer?
A JE JE
Tensor Addition / subtraction
element C At B will be
of
Ci ia in Ai ia in t bi ia in
NY
for D A B
di is in Ai iz in bi iz in
Tensor Product: Kronecker Product
Let A B E Rd edna
tensors then the right Kronecker
d x xant
product C AGB E IR
Example
A
I BE
I B 2B
C
B u B
I
D
E's an
Tensor Product: Hardamard Product
Let A B E pdixdax.edu
die withorder tensor then i ninth
element C A OB will be
of
Ci ia in Ai ia in bi ia in
Example
Remark:
Hadamard & Kronecker products are used in back
propagation implementation in Neural network
Recap Poll: