Prove that $\mathbb{Q}^n$is dense subset of $\mathbb{R^n}$ using the fact that $\mathbb{Q}$ is dense subset of $\mathbb{R}$
I know that $\mathbb{Q}$ is dense subset of $\mathbb{R}$ That is, between any two real numbers, there exists a rational number
then how to prove that $\mathbb{Q}^n$is dense subset of $\mathbb{R^n}$
Let $(x_1,\ldots,x_n)\in\mathbb{R}^n$ and let $r>0$. For each $k\in\{1,2,\ldots,n\}$, let $q_k\in\mathbb Q$ be such that$$x_n<q_n<x_n+\frac r{\sqrt n}.$$Then\begin{align}\bigl\|(x_1,\ldots,x_n)-(q_1,\ldots,q_n)\bigr\|&=\sqrt{\sum_{k=1}^n(x_k-q_k)^2}\\&<\sqrt{\sum_{k=1}^n\left(\frac r{\sqrt n}\right)^2}\\&=r.\end{align}