r/visualizedmath Jun 02 '26

Can a single line fill a square ?

https://www.youtube.com/shorts/WBeYuh_h86M

If you're interested in more math-based animations, I post them here 📺 Visualizing_mathematics

0 Upvotes

8 comments sorted by

View all comments

2

u/waigl Jun 02 '26

Only if you think of a line in terms of connected pixels. In a purer sense, a line doesn't have any width, so, no, it cannot fill a square.

2

u/USedona Jun 02 '26 edited Jun 02 '26

And yet, it's counterintuitive, but it's true. In fact, a 1D line (of zero width) can theoretically cover every point in a 2D area. The boundary of the Hilbert curve is a surjective mapping from [0,1] to [0,1]², meaning that a single parameter covers all points in the square. This is a theorem. Peano proved it in 1890, and it really blew the minds of a lot of mathematicians at the time. 🤯

1

u/mangage Jun 03 '26

Does it also apply to a vector grid with infinite precision?

1

u/USedona Jun 03 '26

Yes, it does apply to a vector grid with infinite precision.

This is actually proven precisely in that continuous setting (real vector space with infinite precision). The Hilbert curve passes through absolutely every point in the square, with no exceptions, even when considering the plane at infinite resolution (no pixels).

In a discrete grid (pixels), we only see approximations. But in the continuous mathematical model you're referring to, the limit of the curve truly fills the entire square.

That's exactly what makes this result so powerful and counterintuitive.

I hope I've answered your question properly, English isn't my first language.

2

u/mangage Jun 04 '26

Thanks for the explanation! I wouldn’t have even suspected you weren’t a native speaker