Given a positive integer $u$, how many $k$-dimensional vectors whose coordinates are all in $\lbrace 1, 2, 3, ..., u\rbrace$ can you choose so that any $k$ of them are linearly independent? Equivalently, what is the size of the largest subset of $\lbrace 1, 2, 3, ... u \rbrace^k$ so that each hyperplane through the origin contains at most $k-1$ of them?


If $k=2$, two vectors are linearly dependent iff they have the same slope, so the maximum number of pairwise independent vectors is the number of distinct slopes $y/x$ with $1\le x,y \le u$, 


$$ -1 + 2\sum\_{n=1}^u \phi(n),$$


since the number of slopes up to $1$ with reduced denominator $n$ is $\phi(n)$, and slopes other than $1$ come in reciprocal pairs.



Maximum size of $k$-wise linearly independent set within $\lbrace 1, 2, 3, ..., u \rbrace^k$
Tony already mentioned that the maximum size of a set of vectors that are $k$-wise linearly independent over a finite field $\mathbb F\_q$ grows linearly with $q$. 


In our situation, however, this is no longer true, and the right order of asymptotics is $O(u^{k/(k-1)})$. That is, if you keep $k$ fixed, the maximum number of $k$-wise linearly independent vectors from $\lbrace 1,2,\dots, u\rbrace ^k$ is $\sim u^{k/(k-1)}$. One has the same order of magnitude for the minimal number of linear subspaces needed to cover the points $\lbrace 1,2,\dots, u\rbrace ^k$. These statements are proved in 



> 
> I. Barany, G. Harcos, J. Pach and G. Tardos, "Covering Lattice Points by Subspaces",
>  Per. Math. Hung. 43, 2001, 93-103. 
> 
> 
> 


[Here](http://arxiv.org/abs/math.NT/0102030) is the arxiv link. I think that the right order of magnitude for the maximum number of such $k$-dimensional vectors so that any $r$ are linearly independent is not known for $r < k$. See [this artcle](http://www.tu-chemnitz.de/informatik/ThIS/downloads/publications/lefmann_no_three_submitted.pdf) for references on such generalizations.


