# The DFT is just sampling the DTFT at equally spaced frequencies

Original title: Notes on the discrete Fourier transform (DFT)

> Hacker News story 50596960 · language: en · submitted 2026-11-22
> Web version: https://zeli.app/story/50596960
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 91 · by [kouosi](<https://news.ycombinator.com/user?id=kouosi>) · 💬 13
[original](<https://eli.thegreenplace.net/2026/notes-on-the-discrete-fourier-transform-dft/>) · [HN discussion](<https://news.ycombinator.com/item?id=50596960>)

## Summary

Eli Bendersky explains the Discrete Fourier Transform by treating a finite signal as one period of a periodic sequence, then showing that the DFT coefficients are exactly equally spaced samples of the DTFT. He derives the Fourier matrix from complex roots of unity, proves the inverse via conjugate transpose, and provides Python code for direct computation, matrix multiplication, and NumPy's FFT. A worked triangular-wave example demonstrates perfect reconstruction, and spectral leakage from truncated cycles is discussed.

## Key quote

> In mathematics, it’s always a good sign when we obtain the same result using different methods!

## HN discussion (13 comments)

### [slow_typist](<https://news.ycombinator.com/item?id=50597309>)

> The matrix approach for calculating the DFT also gives us a nice way to proof that the DFT can always be inverted. We just need to show that matrix F is always (for any positive integer N) invertible.
>
> That can be proved in a number of ways. E.g. showing that det(F)!=0 or showing linear independence of the columns of F is sufficient.

### [lefra](<https://news.ycombinator.com/item?id=50597150>)

> I like that this takes care not to conflate the DFT (the computed value), with the FFT (a family of algorithm to compute it).

### [brcmthrowaway](<https://news.ycombinator.com/item?id=50597478>)

> During college, this guy had some banger articles. Had completely forgotten about the blog.
>
> Now I check it and the burning question.. is it full of AI slop/psychosis (i.e. similar to the https://nullprogram.com guy..) Seems to have escaped the scourge.
>
> Likely made enough $ at GOOG to retire.

---

## Cite

- Page: https://zeli.app/story/50596960
- Date: 2026-11-22
- Source: eli.thegreenplace.net (https://eli.thegreenplace.net/2026/notes-on-the-discrete-fourier-transform-dft/)
- Hacker News: https://news.ycombinator.com/item?id=50596960

## Other languages

- zh: https://zeli.app/zh/story/50596960 · markdown: https://zeli.app/zh/story/50596960.md
- ja: https://zeli.app/ja/story/50596960 · markdown: https://zeli.app/ja/story/50596960.md
- ko: https://zeli.app/ko/story/50596960 · markdown: https://zeli.app/ko/story/50596960.md
- de: https://zeli.app/de/story/50596960 · markdown: https://zeli.app/de/story/50596960.md
- es: https://zeli.app/es/story/50596960 · markdown: https://zeli.app/es/story/50596960.md
- ru: https://zeli.app/ru/story/50596960 · markdown: https://zeli.app/ru/story/50596960.md
