We express the cohomology of the complement of a real subspace arrangement of diagonal linear subspaces in terms of the Betti numbers of a minimal free resolution. This leads to formulas for the cohomology in some cases, and also to a cohomology vanishing theorem valid for all arrangements.