Math Review - Vanderbilt University Medical Center€¦ · Math Review Complex numbers, Fourier...
Transcript of Math Review - Vanderbilt University Medical Center€¦ · Math Review Complex numbers, Fourier...
Math Review
Complex numbers, Fourier transforms, basic differential equations and matrices
Basic Math Needed to Understand MRI (In This Course)
• Complex numbers – Real and imaginary numbers – Magnitude and phase
• Fourier transforms – Frequency – Time: 1D Fourier transforms – Space: 2D Fourier transforms
• Differential equations – Linear homogeneous and inhomogeneous
• Basic calculus – Will not cover here, if necessary brush up on basic
derivates and integrals from introductory text book
Complex Numbers
• Consider: – What is the value of √-1 ?
• Answer: It doesn’t exist
• There is no real number with this value • This value can never come from any real
physical measurement • Number is imaginary
Complex Numbers
• Consider: – What is the value of √-1 ?
• Answer: It doesn’t exist
• Answer #2: i=√-1 – Seems silly? We just define i to be our desired
value. There is no real number.
Complex Numbers
• Where did i come from?
• Solve for x: X2 + 1 = 0 Answer: X = √-1
No real number with this value No physical measurement will ever yield i BUT: equation can describe a real physical system e.g., circuit design, fluid dynamics, and MRI
The Power of i
i = √-1 i0=1 i1=√-1 i2=-1 i3=√-1
Rewrite: i0= +1 + 0i i1= 0 + 1i i2= -1 + 0i i3= +0 - 1i
Complex Numbers • Complex numbers don’t lie on real number line – they
have their own axis. • Real and imaginary numbers taken together define the
complex plane
Real (x)
Imaginary (y)
1 + 2i
1
1
2
2
-1 -2
-1
-2
The Power of i
i0 = +1 + 0i i1 = +0 + 1i i2 = -1 + 0i i3 = +0 - 1i i4 = +1 + 0i i5 = +0 +1i i6 = -1 + 0i i7 =+0 – 1i
Real Imaginary Powers of i correspond to sinusoidal patterns.
Imaginary part lags real part by ¼ cycle
Example: Precession and Detection
B0
Movie courtesy of William Overall
Visualizing Complex Numbers
• Visualize complex numbers in 2D “complex plane” – x = real part ; y = imaginary part
• Increasing powers of i rotate in complex plane
Real (x)
Imaginary (y)
1
1 -1
-1
i0
i1
Phase
• Phase is simply the angle in the complex plane – Phase is determined by the power of i
Real (x)
Imaginary (y)
1
1 -1
-1
i0
i1
Magnitude
• Complex numbers so far have all been of magnitude 1 – distance from center in complex plane = 1
Real (x)
Imaginary (y)
1
1 -1
-1
i0
i1
Magnitude
• A x ip
• Full set of complex numbers can have any length A – Can be anywhere on complex plane
Real (x)
Imaginary (y)
1
1 -1
-1
Real (x)
Imaginary (y)
1
1 -1
-1
0.3 x i0.5
0.9 x i2.2
Magnitude/Phase vs Real/Imaginary
• Two ways to represent complex numbers – Real (x) and imaginary (y) – Magnitude (length) and phase (angle)
• One is usually easier to work with
Real (x)
Imaginary (y)
1
1 -1
-1
0 + 0.5i
Magnitude = 0.5 Phase = 90 degrees
OR
Complex Numbers: Why?
• Many problems can’t be solved by “real” numbers – “Unsolvable” basic algebra: x2+1=0 – But, equation may describe physical system
(e.g., oscillating behavior)
• Describe 2D coordinate with a single number – (real, imaginary) OR (magnitude, phase)
Euler’s Formula
• eix = cos x + i sin x – Describes relationship between trigonometric
functions and complex exponential functions
Leonhard Euler Swiss mathema3cian 1707-‐1783
Euler’s Formula
• eix = cos x + i sin x – Trigonometric vs. exponential form may be
more useful depending on specific problem:
– [cos(4ωt)+isin(4ωt)] x [cos(7ωt) + isin(7ωt)] • Yuck!
– ei4ωt x ei7ωt = ei11ωt
• Nice!
Basic Math Needed to Understand MRI (In This Course)
• Complex numbers – Real and imaginary numbers – Magnitude and phase
• Fourier transforms – Frequency – Time: 1D Fourier transforms – Space: 2D Fourier transforms
• Differential equations – Linear homogeneous and inhomogeneous
• Basic calculus – Will not cover here, if necessary brush up on basic
derivates and integrals from introductory text book
Frequency
• Frequencies are measured in inverse time – often Hertz (Hz) = 1/second, or s-1
Frequency (Hz)
Magnitude
Time (s) Time (s)
Magnitude Magnitude 1/f 1/f
f = 4 f = 2
Amplitude
Time (s) Time (s)
Magnitude Magnitude
Frequency (Hz)
Magnitude f = 2
f = 2
What is the Frequency Content?
• The waveform is a summation of two waveforms (f=1, f=1)
Frequency (Hz)
Magnitude f = 1
f = 1
How About This One?
Frequency (Hz)
Magnitude f = 1 f = 2
Two More
Frequency (Hz)
Magnitude f = 1
f = 1
Frequency (Hz)
Magnitude f = 1
f = 1
• Summation differs for same frequencies/amplitudes. Phases of f differ!
What is Frequency Content? • To describe all possible sums of sinusoids, each
frequency is associated with a magnitude and phase
Real (x)
Imaginary (y) 3
3 -3
-3
Real (x)
Imaginary (y) 3
3 -3
-3
Generalizing Frequencies
• Need frequency, phase and amplitude information to describe system completely
• Any shifted sinusoid can be thought of as a summation of sine and cosine contributions (or real and imaginary contributions)
Complex Numbers: Why?
• Many problems can’t be solved by “real” numbers – “Unsolvable” basic algebra: x2+1=0 – Elegant description of oscillating behavior
• Describe 2D coordinate with a single number – (real, imaginary) OR (magnitude, phase)
• Natural pairings of quantities – Each frequency component of a signal has a
magnitude and phase
Basic Math Needed to Understand MRI (In This Course)
• Complex numbers – Real and imaginary numbers – Magnitude and phase
• Fourier transforms – Frequency – Time: 1D Fourier transforms – Space: 2D Fourier transforms
• Differential equations – Linear homogeneous and inhomogeneous
• Basic calculus – Will not cover here, if necessary brush up on basic
derivates and integrals from introductory text book
Any Signal can be Decomposed into a Sum of Frequencies
Fourier Math
• Think about listening to an orchestra: you differentiate between instruments based on their frequency
Think about Music
• Audio Signal – Many frequencies
• Fourier transform of audio signal – Identify distinct frequencies
(and magnitudes)
Image courtesy of Karla Miller
Think about MRI Signal
Fourier Transform
Image courtesy of Karla Miller
Basic Idea of Fourier Transforms
• Any signal can be decomposed into contributions from different frequencies
• This decomposition is described mathematically by a Fourier transform
• The Fourier transform is a complete description: you can exactly recover the original signal from its spectrum with an inverse Fourier transform.
Fourier Transform
• For each frequency, find the magnitude and phase that best fit the signal
Image courtesy of Karla Miller
Fourier Transform • Synthesize arbitrary phase shift from sum of sine
and cosine • Fit each frequency using regression of sines and
cosines
Image courtesy of Karla Miller
Mathematical Equation for Fourier Transform
X(ω) = Fourier transform of x(t) Some examples to follow on board (and in homework)
In MRI, We Also Need to Understand Spatial Frequencies
• Spatial frequencies are central to the concept of k-space
• Also important for understanding basic image processing
• How do we extend frequencies to multiple dimensions (e.g., spatial frequencies?)
Consider a Spatial Frequency
Consider a Spatial Frequency
Consider a Spatial Frequency
Each of These Represents One 2D Frequency: Denote (fx,fy)
f = (2,0) f = (0,2)
f = (0,4)
f = (4,0) f = (0,4) f = (1.8,1.8)
f = (1.8,1.8)
f = (1.8,1.8) f = (1.8,1.8)
2D Spectrum Plots Contribution From Each Spatial Frequency
Next Time: Making an Image
Summary Points
• Any signal can be completely characterized in terms of frequency components
• The Fourier transform calculates the amount of signal described by each frequency
• This holds for signals of any dimensionality (1D=time; 2D=space; 3D=volume)
Differential Equations • Differential equation: equation that relates the values of a function
and its derivates (of one or more order)
• dy/dx + y(x) = 4 sin (3x)
• Notation often used: dy/dx = y’
• Differential equations are interesting and important because they express relationships involving rates of change
• Order of differential equation: order of the highest derivative: – 1st order: y’ + y = ex
– 2nd order: y’’ + y = ex
• Solution of differential equation: any function that satisfies it