↑↓ move↵ open[] previous / next lesson? all shortcuts
Appearance
Theme
Type size
Reading

Focus mode hides the sidebars. Press f to toggle it anywhere.

Keyboard shortcuts
/
Search
[ ]
Previous / next lesson
t
Jump to the table of contents
r
Review queue
f
Focus mode
?
This panel
ThreadAlongside the phases

The math track

Linear algebra, then signals and systems, then probability and Bayesian estimation, then control, then enough electromagnetism to reason about dipoles in conductors. In that order, each attached to the phase that needs it.

SpineDecoding / signal processing / MLComputational neuroscienceAnalog / mixed-signal hardware
On this pageAlongside the phases
  1. Linear algebra, first and most
  2. Signals and systems, with Phase 2
  3. Probability and estimation, with Phase 3
  4. Control, alongside
  5. Electromagnetism, for Phase 4
  6. Differential equations, throughout
  7. Numerical methods, as needed

The math this field uses is not exotic, but it has to be there when the phase needs it. Linear algebra is everything (every , , , and is a matrix). Signals and systems is Phase 2. Probability and is Phase 3. Control theory is the driven-right-leg loop and every closed-loop device. Electromagnetism is Phase 4’s head model. Here is the order, what each is for, and where to learn it fast.

Linear algebra, first and most

Figure 1. Six subjects, in the order the phases need them. Each one is far easier taken next to the project that makes it concrete, which is the only real argument this page is making.

Vectors as signals; matrices as transformations; the dot product as correlation; projection as filtering; eigenvectors and the singular value decomposition as the axes along which data vary. Covariance matrices, which are where Phase 3’s live. The pseudoinverse, which is the minimum-norm solution of Phase 4.

A output is usually a dot product of weights and data:

y=w⊤x=∑iwixiy = \mathbf{w}^\top \mathbf{x} = \sum_i w_i x_i

Here yy is one number out, w\mathbf{w} holds the weights, and x\mathbf{x} holds the measurements.

Learn it from Gilbert Strang’s MIT lectures (free, and the textbook is good) or from 3Blue1Brown’s Essence of Linear Algebra for the geometric intuition first. Take the university’s course as early as the prerequisites allow. Every week of this site after Phase 2 uses it.

Signals and systems, with Phase 2

Convolution, the Fourier transform, sampling, the Laplace and z transforms, as systems, frequency response. Oppenheim’s Signals and Systems is the standard text; the MIT OpenCourseWare lectures are free. Everything in the filters and conversion explainers is this course applied. Take it the semester you build the board and the two will teach each other.

Convolution says each output sample is a sum of scaled echoes of the input through the :

(x∗h)[n]=∑kx[k] h[n−k](x * h)[n] = \sum_k x[k], h[n-k]

Here xx is the signal, hh is the ’s impulse response, and nn and kk count samples.

Probability and estimation, with Phase 3

Random variables, distributions, expectation and variance, Bayes’ rule, maximum likelihood, the Gaussian and why it appears everywhere, the binomial (your chance bound), hypothesis tests and their limits, and linear regression as estimation. Then as belief updating, which makes the obvious. A university statistics course for engineers covers the first half; Kalman comes from a controls or estimation course or from reading the Phase 3 explainer’s equations with a linear algebra background.

Bayes’ rule turns a likelihood into a belief about the world:

P(θ∣x)=P(x∣θ) P(θ)P(x)P(\theta \mid x) = \frac{P(x \mid \theta), P(\theta)}{P(x)}

Here θ\theta is the thing estimated (a movement direction, a stimulus), xx is the measurement, P(x∣θ)P(x \mid \theta) is how likely the measurement is under each candidate, and P(θ)P(\theta) is what was believed before.

Control, alongside

Feedback, stability, and phase margin. The is a feedback loop that can oscillate; the ’s cousin is the controller; closed-loop stimulation is a control problem; and co-adaptive are two controllers learning each other. One controls course, taken in the second or third year, reframes half of this site.

Closing a loop with forward GG and feedback KK gives the closed-loop map from command to output:

T=KG1+KGT = \frac{KG}{1 + KG}

When the denominator goes small, small disturbances grow: that is instability, and the driven-right-leg loop is analyzed exactly this way.

Electromagnetism, for Phase 4

Enough to reason about a in a conducting medium: Ohm’s law in its field form, the quasi-static approximation (why has no wave propagation), Poisson’s equation for the potential, boundary conditions at interfaces of different conductivity. The physics department’s second electromagnetism course has it; Nunez and Srinivasan’s Electric Fields of the Brain applies it. This is also the background for understanding why sees what cannot.

The potential in the head obeys Poisson’s equation for a conductive medium:

∇⋅(σ∇ϕ)=−s\nabla \cdot (\sigma \nabla \phi) = -s

Here ϕ\phi is the electric potential, σ\sigma is the conductivity (different in brain, skull, and scalp), and ss is the source current density from neural activity.

Differential equations, throughout

, the cable equation, the leaky integrator, the Kalman prediction step: all differential equations, mostly first and second order, some nonlinear. The engineering differential equations course plus the habit of integrating things numerically in Python (which Phase 4 forces) is enough.

The leaky integrator of Phase 4 fits on one line:

τdVdt=−(V−Vrest)+RI\tau \frac{dV}{dt} = -(V - V_{rest}) + RI

Here VV is the membrane voltage, τ\tau is the membrane time constant, VrestV_{rest} is the resting voltage, and RIR I is the input current times the membrane resistance.

Numerical methods, as needed

Forward Euler and when it fails (stiff systems, big steps), Runge-Kutta, linear solvers and conditioning, optimization as gradient descent. Picked up in the projects; a numerical methods course makes it systematic.

Recall
Why is linear algebra the first and most important math for this field?
Montages, filters, classifiers, decoders, and source localization are all matrices acting on vectors; covariance eigenvectors, projections, and the pseudoinverse appear in every phase after the second.
Recall
Which two courses should be taken alongside which phases?
Signals and systems with Phase 2 (filters, sampling, frequency response) and probability and estimation with Phase 3 (classifiers, chance bounds, Bayesian decoding).