Motivated by problems from compressed sensing, we determine the threshold behavior of a random n×d±1 matrix Mn,d with respect to the property "every s columns are linearly independent". In particular, we show that for every 0<δ<1 and s=(1−δ)n, if d≤n1+1/2(1−δ)−o(1) then with high probability every s columns of Mn,d are linearly independent, and if d≥n1+1/2(1−δ)+o(1) then with high probability there are some s linearly dependent columns.