Lecture 26 · Complex matrices and fast Fourier transform
Understand the structure of complex matrices, Hermitian matrices and FFTs.
On this page
Complex matrices; fast fourier transform | Gilbert Strang | MIT 18.06 Linear Algebra
Lecture 26 / Total 35 Lectures |Part 3 · Eigenvalues, positive definiteness and linear transformation
Video of this lecture: Bilibili p27 · Complex matrix and fast Fourier transform ↗(47:52)| MIT OCW official page ↗
Illustration: MIT OCW 18.06SC official lecture summary (CC BY-NC-SA 4.0) and Bilibili classroom video frames (time stamped), about 10 frames per lecture.
Introduction to this lecture
Complex numbers have actually entered this course for a long time: a real matrix may also have complex eigenvalues and complex eigenvectors. But so far, most of the discussion has been in the realm of real numbers. Which definitions need to be modified when the elements of vectors and matrices themselves become complex numbers? There is only one answer, but it runs throughout the lecture: Whenever you do a transpose, you also take the conjugate. This rule translates the concepts of length, inner product, symmetry, and orthogonality into complex space. Real symmetric matrices become Hermitian matrices, and orthogonal matrices become unitary matrices.
After the translation is completed, the most important complex matrix can be introduced——Fourier matrix(Fourier matrix). Its elements are all the same unit root The power of , the structure is extremely neat: each column has the same length, and any two columns are perpendicular to each other under the conjugate inner product. Just because the columns are orthogonal to each other, its inverse matrix almost does not need to be calculated, it is just the conjugate transpose and then divided by ;Forward transformation and inverse transformation look almost the same, but it is easy to get confused when writing programs.
The most practical results in complex matrices also fall in on. Generally, use a Matrix multiplication by vector requires times multiplication because the matrix is full and does not have a zero element. Fast Fourier Transform (fast Fourier transform, FFT) but Decompose it into the product of several sparse matrices, so that the number of multiplications is reduced to . time is Yes ; time More than one million, while the new algorithm only requires times, soon about times. It is this acceleration that has changed the computing methods of the entire industry and is also one of the most critical links in modern scientific computing.

MIT OCW Official Lecture Notes Summary Page 1/4 (18.06SC Lecture 26 Summary, CC BY-NC-SA 4.0).
1. Complex vectors: why length and inner product must be conjugated
Set Each component of is a complex number, it belongs to the complex dimensional space . To define its length, the first idea is to copy the case of real numbers , but this approach immediately fails. length squared must be positive (except for zero vectors), while
What appears here is the square of each component, not the module length. take : , but this vector is obviously not a zero vector, and its length cannot be . So Not the length.
The correct approach is to multiply each component by its own complex conjugate (complex conjugate), that is, changing the signs of all imaginary parts:
Yes , the first item is , the second item is , which adds up to , so the length of this vector is , instead of given . Pay attention to each item are all non-negative real numbers, which is exactly the required property of length square: the sum is zero if and only if each component is zero.
Notation combines “first transpose, then take conjugate” into one action, written as
where H is taken from the name Hermite, called conjugate transpose (conjugate transpose). So the square of the length is . From real numbers to complex numbers, there is only one rule: When transposing, take the conjugate incidentally.
The inner product is modified accordingly. The inner product of real vectors is , the inner product of a complex vector must be , the first factor is to be conjugated. This definition is not chosen casually, but is forced by the length: when the two factors are the same, the inner product must degenerate into , which is the length squared. The cost is that the inner product is generally no longer a real number, but a complex number; only taking Only then will it be true.
In addition to the definitions of length and inner product, with There are no other differences: the addition of vectors is still performed component by component, the coefficients of linear combinations are now allowed to be complex numbers, and the axiom remains unchanged, so it is also a vector space. The translation work to be done in this lecture is to change each formula from the real number version to the conjugate version; the real number case automatically becomes a special case.

Video 00:04:47|Approximately corresponding to Section 1 “1. Complex vectors: why length and inner product must be conjugate”.
2. Hermitian matrix and unitary matrix
With conjugate inner products, real symmetric matrices and orthogonal matrices have complex versions.
Real symmetric matrix requirements . After the matrix becomes complex, transposition alone is not enough: the transposition swaps the elements on both sides of the diagonal, and the swapped complex elements must be conjugated again to be equal to the original one. So the correct promotion is
The matrix that satisfies it is called Hermitian matrix(Hermitian matrix).
Look at the diagonal first. When transposing, the elements on the diagonal remain in place, and then taking the conjugate requires it to be equal to its own conjugate, so The diagonal elements of the Hermitian matrix must be real numbers. Let’s look at the off-diagonal elements again: If The location is , it transposes and runs to , then taking the conjugate must still equal , therefore The location can only be . For example
is the Hermitian matrix: diagonal element with are real numbers, and the two off-diagonal elements are conjugate to each other. The two conclusions about real symmetric matrices in the previous lecture are true here - the eigenvalues of the Hermitian matrix are real numbers, and the eigenvectors are perpendicular to each other; it is just that “perpendicularity” must be judged according to the inner product of the lower conjugate.
The concept of orthogonal is also copied. Let unitary matrix The columns are , orthogonal (orthonormal) means that the complex inner product of any two different columns is zero, and the inner product of each column with itself is one:
Writing this entire set of equations in matrix language is . In the case of real numbers, such a square matrix is called an orthogonal matrix, but in the case of complex numbers, it is renamed: unitary matrix (unitary matrix), that is, a complex square matrix with orthogonal columns. Changing the name itself is a signal - as long as you see the word “unitary”, you should think that the elements of this matrix may be complex numbers, and conjugation must be included when judging orthogonality. The corresponding relationship between the two spaces can be listed as a comparison table:
| real numbers | plural |
|---|---|
| Transpose | conjugate transpose |
| Symmetry | Hermit |
| Orthogonal matrix | unitary matrix |
| length square | length square |
The whole table reflects only one thing: every transpose in the complex case is followed by a conjugate.

Video 00:11:19 | Approximately corresponding to Section 2 “2. Hermitian Matrix and Unitary Matrix”.

MIT OCW Official Lecture Notes Summary Page 2/4 (18.06SC Lecture 26 Summary, CC BY-NC-SA 4.0).
3. Fourier matrix with unit root
The Fourier matrix is the most important of the complex matrices. In order to write it, first change the subscript habit into the caliber of electrical engineering: from Count to . The advantage is that all the following formulas are based on as a starting point.
Fixed , order
This number lies on the unit circle in the complex plane, and the angle rotated is the circumference of the circle , therefore , which is the equation one of the roots. A total of such roots , all made of to a power gives:
They are evenly arranged on the unit circle, called Origin subunit root(primitive -th root of unity). When calculating powers, do not use the real part and the imaginary part. It is fastest to use the exponential form: , the angle is directly multiplied by . time turn around , each power is turned in turn , the sixth power returns to , these six points are The six sixth roots of .
These powers can never escape the unit circle: given a module of length The square of the complex number is the square of the absolute value Take it again and the result is still ;The same is true for taking any power. So The entire power sequence of is sliding on the circle, but the angles are constantly accumulating, and the rotation is full Just go back .
dimensional Fourier matrix of the The elements are , among which All from get :
The reading method is very regular: the first column is , the second column is to various powers of , the third column is to various powers of , the last column is For each power of , the row direction is the same. due to , this matrix is symmetric, . But when When it is, it is not a Hermitian matrix: non-real complex numbers appear in the elements, and they have to be conjugated after transposition, and Not equal to its own conjugate.
take . At this time , its powers are , exactly of four fourth-order unit roots. Arrange it according to the formula:
Check line by line: Chapter OK () elements are , that is ;No. OK () is , use Simplified into . The entire matrix does not have a single zero element and is full - which is why direct multiplication is expensive.

Video 00:18:11|Approximately corresponding to Section 3 “3. Fourier Matrix “near the unit root”.
4. Column orthogonality and inverse matrix
The most important property of the Fourier matrix is that its columns are orthogonal to each other under the conjugate inner product. If this clause is not conjugated, it will be misunderstood.
in Get the first place Column and No. Column:
If we directly use the transpose to do the dot product like real numbers, we get , does not appear to be equal to zero at all. But the first factor of the inner product must first be conjugated, , so
Orthogonality holds, at the cost of having to remember conjugation. If you miss this step, you will misjudge that two vertical columns are not vertical.
The length of each column is also easy to calculate. Each column of has four components, and the module length is , so the length squared is , the length is . So The columns are orthogonal but not orthogonal. Divide the entire matrix by , we get a column orthogonal unitary matrix:
The inverse matrix can therefore be written without any elimination:
to general , the same reason is given with . This is a great convenience for Fourier transform: the forward transform and the inverse transform use the same matrix, only differing by a conjugate and a constant factor, so the most common mistake in engineering is to confuse the two. There is another benefit: since the inverse matrix is just the conjugate transpose, then about Any property learned can be translated into about Properties - both are structurally the same thing. Fourier himself knew this inverse matrix in the days before computers. What he failed to notice, but which later became extremely important, was another thing: the matrix could be decomposed into the product of a large number of zero-element factors, and thus could be multiplied extremely quickly.
5. Fast Fourier Transform: Put Split into two halves
use Multiply a vector, which is done by definition Second multiplication: the matrix has elements, and none of them is zero, it seems that they cannot be omitted. The whole point of the FFT is to decompose this matrix into the product of a number of sparse factors, so that most multiplications become “multiplications by zero” and thus don’t have to be done at all.
The key to splitting is a simple relationship. Set is subunit root, then
i.e. The square of the subunit root is exactly Subunit root: turn in circle Circle, square and then turn circle, exactly . This connects Fourier matrices that are twice the size.
Specifically look at multiplication , its first The components are (here ). Split the subscripts according to odd and even numbers, with :
The two sums are from get . due to , the first sum is exactly Acting on the even subscript component components, the second sum is Act on the odd subscript component and multiply . So
About The period is , so The calculated results of the two halves can be directly moved to the second half, but the sign needs to change: . Therefore
Write these two equations as matrices, with For example:
Among them take . The division of labor between the three areas is very clear. rightmost is permutation matrix (permutation matrix), arrange the components with even subscripts to the front and the components with odd subscripts to the back. ;It’s just renumbering, it’s hardwired in the computer and takes almost no time. For the middle piece, do it once for both halves. Dimensional Fourier Transform - The two halves of the calculation are independent of each other and can be fully parallelized. The leftmost diagonal block adds and subtracts the results of the two halves: the upper half block outputs “even half + Multiply the odd half” and the second half block outputs “even half − “Multiply an odd half”, so the only thing that really needs to be multiplied in this area is , and permutation do not contribute multiplication.
Costs dropped immediately: original times multiplication, now twice Dimension transformation total times, add more diagonal matrix(diagonal matrix) of revisions, total times. This is just one layer removed; two Dimension transformation continues to be dismantled, and only new layers are added at each layer. multiplication without having to pay the square-level price - that’s the whole secret: cut the big matrix in half layer by layer, sandwiching a permutation and a diagonal correction in each layer.

Video 00:31:07|Approximately corresponding to Section 5 “5. Fast Fourier Transform: Split it into two half-sized pieces.”

MIT OCW Official Lecture Notes Summary Page 3/4 (18.06SC Lecture 26 Summary, CC BY-NC-SA 4.0).

Video 00:37:20|Approximately corresponding to Section 5 “5. Fast Fourier Transform: Split it into two half-sized pieces.”
6. Recursion: from Arrive
times is still too many because the same idea can be continued: each reuse split into two , each with an odd-even permutation and a diagonal correction. Judging from the subscripts, the first permutation divides the components into two groups of “even” and “odd”, and the second permutation divides the components into even and odd respectively, so the original vector is divided into four groups: even and even , Odd , odd and even , Qiqi (The former word indicates which half the first layer falls on, and the latter word indicates the second layer.) The four groups do it separately. Dimension transformation, and finally use sign correction to spell it back. So This item is replaced by
The total correction cost for each level is : scale from halved to , …, but the number of blocks in the same layer is doubled, so the total remains the same. The recursion goes all the way until the middle Fourier block becomes Dimensions, until multiplication is no longer needed. What is the number of layers? from down to , , , , , , a total of step, that is . The total number of multiplications is
Generally, use remember The number of multiplications of the dimensional Fourier transform, , the solution is
Take a look at a representative number: . At this time , more than one million; while the new algorithm only needs
times. The original magnitude is multiply , now only multiply , reduced by approx. Times: In the same time, the Fourier transform could be done once before, but now it can be done two hundred times.
The essence of FFT is clear at this point: it does not change the Fourier matrix, it just refactors it. Remove it layer by layer, and a series of permutation matrices are accumulated on the right side, and a series of permutation matrices are accumulated on the left side. with , with Modification of the form, the center getting smaller and smaller until it disappears. Each layer only spends times multiplication, a total of layer. Half of the reason why the Fourier matrix is so special is that its columns are orthonormal and the inverse matrix is almost free; the other half is that its elements are all powers of the same unit root, which allows it to be recursively split in half according to the odd and even subscripts. Only by combining the two properties can we get Reduced .

Video 00:43:05|Approximately corresponding to Section 6 “6. Recursion: from Arrive “Nearby.

MIT OCW Official Lecture Notes Summary Page 4/4 (18.06SC Lecture 26 Summary, CC BY-NC-SA 4.0).
Summary of this lecture
- The square length of a complex vector is , no : when the former is equal to , length , the latter is equal to .
- The basic rule for the complex case is “the transposition must take the conjugate”: , the inner product is changed to , generally takes a complex value.
- The Hermitian matrix is given by Definition, the diagonal elements must be real numbers, and the non-diagonal elements must be conjugate pairs, such as ; Its eigenvalues are real numbers, and the eigenvectors are perpendicular to each other.
- The unitary matrix is a complex square matrix with orthogonal columns. ;It corresponds to the orthogonal matrix for the real number case.
- Fourier matrix , It’s the origin subunit roots; time , The elements are only , and ; when it is not a Hermitian matrix ( time is a real symmetric matrix).
- The columns of are orthogonal to each other, and the length of each column is , so , ; If no conjugation is taken, of the Column and No. Column will calculate instead of .
- The core identity of FFT is , thus obtaining the block decomposition , , It’s an odd-even permutation.
- cost from reduced to , the total number of corrections at each level after recursion , total layers, total ; When reduced to .
- time And FFT only needs times multiplication, fast approximation times.
keywords
| English | Chinese | One sentence explanation |
|---|---|---|
| complex conjugate | complex conjugate | The operation of changing the sign of the imaginary part of a complex number is recorded as |
| conjugate transpose | conjugate transpose | First transpose and then take the conjugate, written as , standard actions in complex space |
| Hermitian matrix | Hermitian matrix | satisfy is a complex square matrix with real diagonal elements and conjugate pairs of non-diagonal elements. |
| unitary matrix | unitary matrix | Column orthogonal complex square matrix, |
| Fourier matrix | Fourier matrix | No. Yuanwei is a complex matrix whose columns are orthogonal |
| root of unity | unit root | satisfy The plural form of |
| fast Fourier transform (FFT) | Fast Fourier Transform | take advantage of put Decomposed into sparse factors, the cost is from down to |
| permutation matrix | permutation matrix | Matrix with swapped component order, used for rearrangement of odd and even subscripts in FFT |
| diagonal matrix | diagonal matrix | A matrix whose off-diagonal elements are all zeros, |
| orthonormal | orthogonal | Pairs are orthogonal and their lengths are all , complex case application Judgment |
Machine-assisted translation · Read Chinese original
