













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














Ramani Duraiswami, Dept. of Computer Science
Matlab code
-^
How many operations andmemory does this take?
-^
Vectorized operations
-^
Matrix may be sparse, i.e. most elements are zero.
-^
How many operations/memory?
-^
Answer still
2
unless we avoid
referring to the zero elementsaltogether
Matrix-vector multiplication applies a lineartransformation to a vector:
-^
Recall how to do matrix multiplication
-^
How many operations does a matrix vectorproduct take?
⎤ ⎥ ⎥ ⎥⎦ ⎡⎤ ⎢⎥ ⎢⎥ ⎢⎥⎣⎦
x v y v^ z v
M
M
M
M
M
M
M
M
M
v
M
33
32
31
23
22
21
13
12
11
Access matrix– Element-by-element
along rows
along columns
Discuss advantages
Can be defined usingcorresponding vectornorms– Two norm– One norm– Infinity norm
-^
Two norm is hard todefine … need to findmaximum singular value– related to idea that matrix
acting on unit sphere convertsit in to an ellipsoid
Frobenius norm is definedjust using matrix elements
One idea compute inverse
-^
Not usually a good idea– (unless inverse is computable
easily and accurately using somematrix property)
Leads to increased errors, and ismore expensive usually
Represent it as a matrix-vector equation (linear system)
-^
We will apply the familiar elimination technique, andthen see its matrix equivalent
Zero elements offirst column below 1
st^
row
st^
row
by 0.3 and add to 2
nd
row
st^
row
by -0.5 and add to 3
rd
row
Zero elements offirst column below 2
nd
row
nd
row by
0.04 and add to 3
rd
It turns out that Gaussian elimination corresponds to aparticular matrix decomposition …– Product of permutation, lower triangular and upper triangular
matrices
What is a permutation matrix?– It rearranges a system of equations
and changes the order.
of rows in a matrix
the identity
inverse:
PP
T=I
What is an upper triangularmatrix?– Elements below diagonal are zero
-^
Lower triangular matrix
-^
Elements above diagonal are zero
-^
Unit lower triangular matrix
-^
Elements along diagonal are one
-^
Upper triangular part of GaussElimination is clear …–
final matrix we end up with
What about lower triangular and permutation?