In this work we study arrangements of $k$-dimensional subspaces $V_1,ldots,V_n subset mathbb{C}^ell$. Our main result shows that, if every pair $V_{a},V_b$ of subspaces is contained in a dependent triple (a triple $V_{a},V_b,V_c$ contained in a $2k$-dimensional space), then the entire arrangement must be contained in a subspace whose dimension depends only on $k$ (and not on $n$). The theorem holds under the assumption that $V_a cap V_b = {0}$ for every pair (otherwise it is false). This generalizes the Sylvester-Gallai theorem (or Kellys theorem for complex numbers), which proves the $k=1$ case. Our proof also handles arrangements in which we have many pairs (instead of all) appearing in dependent triples, generalizing the quantitative results of Barak et. al. [BDWY-pnas]. One of the main ingredients in the proof is a strengthening of a Theorem of Barthe [Bar98] (from the $k=1$ to $k>1$ case) proving the existence of a linear map that makes the angles between pairs of subspaces large on average. Such a mapping can be found, unless there is an obstruction in the form of a low dimensional subspace intersecting many of the spaces in the arrangement (in which case one can use a different argument to prove the main theorem).