Linearly independence of functions without using Wronskian Problem
Let $g_1,\ldots g_k$ be linearly independent real-valued functions on a set $X$, that is, if for real constants $c_j,\sum^k_{j=1}c_jg_j\equiv0$, then $c_1=c_2=\cdots=0$. Show that for some $x_1,\ldots,x_k$ in $X,g_1,\ldots g_j$ are linearly independent on $\{x_1,\ldots,x_j\}$ for each $j=1,\ldots,k$.
My efforts
We will find the $k$ points one by one. First we will find $x_1$ such that $g_1$ is linearly independent on $\{x_1\}$, i.e., $g_1(x_1)\neq0$. We claim such an $x_1$ must exist. If not, $g_1(x)=0$ for all $x$. We just take $c_1=1$ and $c_i=0$ for $i>1$. Then we have $\sum^k_{j=1}c_jg_j\equiv0$, violating the linear independence of $g_1,\ldots g_k$.
Now assume that we have found $x_1,\ldots,x_n$ in $X$ with $n<k$ such that $g_1,\ldots g_j$ are linearly independent on $\{x_1,\ldots,x_j\}$ for each $j=1,\ldots,n$. Denote the $j\times j$ matrix $M_j:=[g_m(x_l)]_{l,m\leq j}$ with $j\leq n+1$. By assumption, the determinant $|M_j|\neq0$ and $\mathrm{Rank}(M_j)=j$ for each $j=1,\ldots,n$. We need to find $x_{n+1}$ such that $|M_{n+1}|\neq0$ and $\mathrm{Rank}(M_{n+1})=n+1$. Denote the $j$rh row of $M_{n+1}$ as $v_j(x_j):=[g_1(x_j)\; g_2(x_j)\; \ldots\; g_n(x_j)\; g_{n+1}(x_j)]^T$. Assume such an $x_{n+1}$ does not exist. Then for any $x\in X,v_{n+1}(x)$ is linear combination of $v_1(x_1),\ldots,v_n(x_n)$, i.e., for $g_1,\ldots,g_{n+1}$, their values at any $x$ is a linear combination of their values at $x_1,\ldots,x_{n+1}$. If they are not linearly independent on $x_1,\ldots,x_{n+1}$, then they are not not linearly independent on $X$. Now they are not linearly independent on $x_1,\ldots,x_{n+1}$, so this is a contradiction.
Where am I wrong? Please give me a hint on more elegant way of proof.

HINT:
Consider the matrix $(g_j(x))_{1\le j\le k, x\in X}$. The basic fact about matrices over fields is: the largest size of non-zero minors equals the largest number of linearly independent rows(columns). That should do it.
