SLIDE 1 Motivation
We do not cover all the math
Just the common basics (yellow triangle)
IVA IllVis Modeling Domain specific vis
SLIDE 2
Vector spaces and linear systems
Julius Parulek
SLIDE 3
Vector spaces
SLIDE 4 Vector Spaces
Linear combination Vector Space
A set for which linear combinations is defined Is closed under those linear combinations Ex:
a set of 2D vectors of real numbers a set of 2D vectors of positive real numbers is not! An arbitrary plane and an arbitrary line
Their union is not! Their intersection is!
SLIDE 5
Vector Spaces
Linear dependence
There exists a linear relationship among vectors
Dimension of a linear space
The largest number of linearly independent vectors
Basis of a linear space
A set of n linearly independent vectors for a linear space of dimension n
SLIDE 6
Vector Spaces
Column Space Null space of A
Which vectors transform to zero vector?
SLIDE 7
Vector Spaces
Null Space examples
Do B-1, C-1 exist?
SLIDE 8 Vector Spaces
Linear map
Defined by a matrix A, v=Au When A has n rows, m columns
A defines a map Vector v is in Rm, vector u is in Rn
A is a linear map when
Inverse matrix (map)
A has to be square! A-1 defines inverse matrix of A A A-1 = I A-1=AT if A is orthonormal
SLIDE 9
Vector Spaces
Rank of a matrix
Number of linear independent vectors (columns) in a matrix A = [a1,a2,…,an], rank(A) = dimensions(a1,a2,…,an) rank(A)≤min(m,n) Non-full-rank matrices are called singular Full-rank matrices are invertible (have inverse matrix)
SLIDE 10 Vector Spaces
Change of basis
v A B
SLIDE 11 Vector Spaces
Example: Transformation to reference frame
10
[Geomcell, parulek et al, 2009]
SLIDE 12
Linear systems
SLIDE 13 Linear Systems
System of equations
#equations = #unknows
Fit 2 points by a line Exact solution
#equations > #unknows
Approximate 3 points by a line Approximative solutions
#equations < #unknows
Fit 3 points by a curve of 4 Free variables
Example
12
SLIDE 14 Linear Systems
A linear system of equations for unknowns u1,…,un
Abbreviated to Au=b
Au=b is solvable if b is in the column space of A
If invertible, then there is only one solution Solution, u = A-1b
u1a1+ u2a2=b b a1 a2
SLIDE 15
Linear Systems
How to solve?
Gauss elimination Iterative solvers
SLIDE 16 Linear Systems
Gauss elimination
Ex: Transforms matrix into an upper triangular matrix
Row exchange can help
SLIDE 17
Linear Systems
Elimination matrix construction
Steps encoded into matrices
SLIDE 18 Linear Systems
Elimination matrix construction
Steps encoded into matrices
C D D*(C*A)=(D*C)*A
SLIDE 19 Linear Systems
Decomposition to lower and upper triangular matrix
A=LU
If A is symmetric
A=LDLT
Diagonal matrix of pivots!
SLIDE 20 Linear Systems
Solution stability issues
Ill-conditioned (unstable) systems
Tiny change of input data results in drastic changes in the solution
SLIDE 21
Linear Systems
Iterative system solver – I. (Gauss-Jacobi iteration) In case of many thousands of equations, Gauss elimination would be slow Often only few non-zero entries per row in the coefficient matrix (sparse)
SLIDE 22 Linear Systems
Iterative system solver – II.
A = D + R, di,i=ai,i, di,j=0 if i!=j Iteration step Convergence
A is diagonally dominant
SLIDE 23 Linear systems
Use-case for Gauss-Jacobi
Fluid Flow
22
SLIDE 24 Linear systems
Data Fitting: Polynomial Interpolation
polynomial fit
f(t) = sqrt(t) (gray), evaluated at 6 points Approximated by p(t) of degree 4 (black)
23
SLIDE 25 Linear Systems
Overdetermined Systems
Au=b, A is not square! Solution
ATA = symmetric matrix Pseudinverse matrix (ATA)-1AT
u=(ATA)-1ATb
… or Gauss elimination
SLIDE 26 Linear systems
Solving the null space
Columns of A must be linearly depended
Otherwise x=[0,…,0]
Solving the inverse matrix
A[u1,…,un]=I
25
SLIDE 27 Linear Systems
Other methods
Conjugate Gradients
For symmetric and positive definite matrices Iterative and fast method
Cramer’s rule
Using determinants Impractical for large matrices
26
SLIDE 28 Linear Systems
Use case: manual registration between two images
27
SLIDE 29 Linear Systems
Use case: manual registration between two images
Find transformation A (3x3)
28
SLIDE 30 Literature
- G. Farin, D. Hansford: Mathematical Principles for Scientific
Computing and Visualization http://www.farinhansford.com/books/scv/teaching.html MIT Open Courses, Linear Algebra http://ocw.mit.edu/courses/mathematics/18-06-linear- algebra-spring-2010/video-lectures/
29