This statement has been given as an example in the book "Introductory real analysis" written by Kolmogorov and Fomin:
The set of all points $x=(x_1,x_2,\cdots,x_n,\cdots)$ with only finitely many non-zero coordinates, each a rational number, is dense in the space $\ell_2$.
and $\ell_2$ is defined this way:
$$\ell_2 = \{ (x_1,x_2, \cdots, x_n, \cdots): \sum_{n=1}^\infty x_n^2 <\infty \text{ and } x_n \in \mathbb{R} \} $$
Analysis is one of my weak subjects in math. So, please bear with me.
I know what I need to show. Suppose that I define: $$A = \{ (x_1,x_2, \cdots, x_n, \cdots): \text{only finitely many terms are non-zero and } x_i \in \mathbb{Q} \}$$
I need to show that if $(x_n)_{n \in\mathbb{N}}$ is in $l_2$ then one can find a "sequence of sequences in $A$" such that the limit approaches to $(x_n)_{n \in \mathbb{N}}$.
So, if I was allowed to use sequences like $(x_1,x_2, \cdots, x_n, \cdots)$ where only finitely many terms are non-zero but the terms were allowed to be in $\mathbb{R}$ I was done because for any sequence $(x_n)$ the sequence $(y_k)$ where $y_k = (x_1, x_2, \cdots, x_k, 0, 0, 0, \cdots, 0, \cdots)$ works. Am I right?
Now the problem is that I should find a sequence like $y_k$ where this time all terms must be chosen from rational numbers.
This is my solution for this:
Since $\mathbb{Q}$ is dense in $\mathbb{R}$ I can find a sequence of rational numbers that approaches any given real number $x_i$. therefore:
$$x_1 = \lim (q_{11},q_{12},q_{13}, \cdots, q_{1n}, \cdots)$$ $$x_2 = \lim (q_{21},q_{22},q_{23}, \cdots, q_{2n}, \cdots)$$ $$\vdots$$ $$x_i = \lim (q_{i1},q_{i2},q_{i3}, \cdots, q_{in}, \cdots)$$ $$\vdots$$
Now I create my new sequence this way:
$$y_1 = (q_{11},0,0,0,0,0,0,\cdots)$$ $$y_2 = (q_{12},q_{22},0,0,0,0,\cdots)$$ $$y_3 = (q_{13},q_{23},q_{33},0,0,\cdots)$$
and $y_k$ is formed the similar way. I mean you go the $k$-th column and choose $q_{1k},q_{2k},\cdots,q_{kk}$ on the rows and put zero for all other entries beyond the $k$-th coordinate.
I want to claim that given any $x=(x_1,x_2, \cdots, x_n, \cdots)$ in $\ell_2$, the sequence $(y_k)_{n \in \mathbb{N}}$ constructed in the way just explained approaches $x \in \ell_2$. I think it is obvious that this is true because:
$$\lim_{k \to \infty} y_k = (\lim_{k \to \infty} q_{nk})_{n \in \mathbb{N}} = (x_n)_{n \in \mathbb{N}}$$
Does what I'm saying makes sense? Is my solution correct or it needs to be modified?
Your ideas are essentially correct. However, the devil is in the details. You have to be careful about the values of $q_{i,j}$, and choose them correctly.
For example, if in your sequence, $|q_{i,i} - x_i|> 1 \quad \forall i$, then you will never converge to the sequence (since we are always at least distance 1 away), even though you have pointwise convergence.
You can verify that the choice of variables $q_{i,j}$ such that for $i<j$, $|q_{i,j} - x_j| < \frac{1}{2^n}$ would work.