Linear algebra primer
Learning objectives
- Read a matrix as a linear function from vectors to vectors
- Connect determinant, trace, eigenvalues, and singular values to geometric facts about the transformation
- Set up and solve a least-squares problem with the normal equations and explain why regularization is usually needed
- Recognize why migration, tomography, inversion, and FWI all reduce to some flavor of
Beyond filtering, almost every processing step is linear algebra wearing a costume. Migration applies the adjoint of a modelling operator. Tomography is least squares. Inversion is a regularized solve. FWI is nonlinear optimization whose every step is linear algebra: an adjoint-state gradient and, in Gauss-Newton, an inner regularized solve. If you cannot read as a picture, the algorithms will look like black magic.
1. A matrix is a function
Forget rows and columns for a moment. A matrix M = \[\\,v\_1\\;\\, v\_2\\,\] is a rule that takes a vector and returns . The matrix is its two columns; everything else is bookkeeping. In Figure 0.7 you set those two columns by hand and watch the whole plane follow, then run the matrix backwards to solve for noisy data.
The two ringed arrows in (a) are and , the images of and , and they are the columns of the matrix: and . Everything else in (a) follows from them. The pale grid is carried to the darker one, the dashed unit square to the shaded parallelogram, and the dashed unit circle to the solid ellipse. The figure opens on and .
2. Determinant
For M = \\begin{pmatrix} m\_{11} & m\_{12} \\\\ m\_{21} & m\_{22} \\end{pmatrix} the determinant is the signed area of the transformed unit square. For the starting matrix it is , the area of the shaded parallelogram in (a). Consequences:
- is how much the matrix scales areas (in 2D) or volumes (in 3D).
- The sign of is positive if the matrix preserves orientation, negative if it reflects. The small arc at the origin in (a) turns from to : anticlockwise while , clockwise once the plane is flipped.
- means the image collapses to a line (or point). The matrix is singular and cannot be inverted. Lower to 0.20, or choose Singular, rank 1 under Start from: the columns line up and the ellipse in (a) flattens to a segment. Keep going to and the determinant comes back as , the same area with the plane flipped over.
3. Eigenvalues and eigenvectors
An eigenvector of is a nonzero direction that survives the transformation up to scaling: . The scalar is the eigenvalue. The eigenvectors are the directions along which the matrix is pure stretching; the eigenvalues tell you by how much (and a negative also flips the direction). In (a) the real eigen-directions are dotted: the starting matrix has and , and each dotted line is carried onto itself.
For a matrix, the eigenvalues come from the characteristic polynomial:
so . When the discriminant is negative the eigenvalues are a complex pair : no real direction survives, and the matrix acts like a rotation by combined with a scaling by , up to a change of basis. The rotation by 36.9 degrees under Start from has , and no dotted line appears.
4. Singular values and conditioning
The singular values are the square roots of the eigenvalues of . They are the semi-axis lengths of the ellipse the matrix makes from the unit circle: 1.94 and 0.46 for the starting matrix, the two solid half-axes in (a). They are not the eigenvalues unless is symmetric; choose the symmetric matrix under Start from and the dotted lines fall on the ellipse’s axes, with = 3 and 1. The condition number is
If is large, the inverse problem is ill-conditioned: the relative error in the solution can be up to times the relative error in the data . The absolute error is simpler to picture. Running backwards divides each component of a data error by its singular value, so an error of size comes back up to long. Plate (b) shows it: 48 noisy copies of in a disc of radius 0.20 come back as a needle-shaped ellipse whose longest radius is 2.2 times the disc’s, and which is times longer than it is wide. Lower to 0.25 and the columns nearly line up: falls to 0.041, rises to 45 and the noise gain to 25 times. Every inversion we will meet later has a condition number, and regularization is the tool for taming it.
5. Systems of equations:
Given a known mapping and an observation , find the unknown . Three cases:
- Square, invertible. . Rare in the real world; never invert explicitly, solve instead (LU in general, QR for stability, Cholesky when is symmetric positive definite).
- Overdetermined (more equations than unknowns). No exact solution. Use least-squares: minimize . The solution is the normal equation . This is the basic form of tomography, residual statics, and inversion.
- Underdetermined (fewer equations than unknowns). Infinitely many solutions; you must pick one by adding a penalty like (Tikhonov) or (sparsity). Least-squares migration is often underdetermined; conventional migration applies the adjoint instead of an inverse, which acts as an implicit regularization.
6. The least-squares normal equations in one line
That one equation sits underneath residual statics solves, surface-consistent amplitude and deconvolution decomposition, traveltime tomography, model-based inversion, and the inner loop of every iterative imaging algorithm. When is nearly singular, you regularize:
The term adds to every eigenvalue of , lifting the small ones off the floor so the inverse exists. The regularized solve keeps the share of the exact solution’s component along each direction, one half where , so it switches off the weak directions first: that is plate (c). Start from the near-singular matrix and raise from 0.000001 to 0.01. The noise gain falls from 25 times to 3.5 times, but the solution moves 5.87 away from the exact one, toward the origin: less noise, more bias. Tuning is the eternal art of inversion.
7. Why this is the workhorse for processing
- Tomographic velocity inversion. is the ray-path matrix (entry is the length of ray in cell ); is the slowness update; is the traveltime residuals. Least squares with smoothing regularization, solved iteratively (CGLS or LSQR) because is huge but sparse; is never formed.
- Post-stack inversion for impedance. is the wavelet-convolution matrix applied after a derivative, ; is the log-impedance ; is the observed seismic trace. Same equations, different names.
- FWI. Each outer iteration linearizes the misfit: the adjoint-state method gets the gradient from one forward and one adjoint wave simulation, and a Gauss-Newton step solves . Linear algebra is in the hot core; calculus on matrices is the outer shell.
- Migration (LS-migration). Matching observed data to predicted data from a reflectivity model, least-squares on a linear forward operator.
A matrix is a function on vectors; with regularization is the universal template for every inverse problem in processing; the condition number tells you how much noise amplification to expect.
Where this goes next
Section 0.8 brings in the other piece of every inverse problem: a model of what the noise does. You cannot set the right without a probabilistic framing, so random variables and noise statistics come next.
References
- Strang, G. (2016). Introduction to Linear Algebra (5th ed.). Wellesley-Cambridge.
- Claerbout, J. F. (1976). Fundamentals of Geophysical Data Processing. McGraw-Hill.
- Yilmaz, Ö. (2001). Seismic Data Analysis (2 vols.). SEG.
- Tarantola, A. (1984). Inversion of seismic reflection data in the acoustic approximation. Geophysics, 49, 1259.