Is there a bijective map between $\mathbb{N}^n$ and $\mathbb{N}$ for $n\in\mathbb{N}$?

42 Views Asked by At

I've recently learned that the cardinality of the integers and that of the rationals is the same, as you can map the rationals to the integer grid, draw a spiral that eventually touches every point and label from the centre outwards. If I understand it correctly, this is equivalent to saying that there's a bijective map between $\mathbb{N}^2$ and $\mathbb{N}$.

My question is, is there an extension to this idea that has a bijective map between tuples of integers of any size and single integers? For the 3rd dimension I can envision some kind of system with concentric cubic shells, but I can't visualise anything higher than that.

Please note that I'm not formally trained in math. I enjoy learning math on YouTube recreationally but I'll struggle to read denser notation.