The vanishing ideal I of a subspace arrangement is an intersection of linear ideals. We give a formula for the Hilbert polynomial of I if the subspaces meet transversally. We also give a formula for the Hilbert series of a product J of the linear ideals without any assumptions on the subspace arrangement. It turns out that the Hilbert series of J is a combinatorial invariant of the subspace arrangement: it only depends on the intersection lattice and the dimension function. The graded Betti numbers of J are determined by the Hilbert series, so they are combinatorial invariants as well. The results can be applied to Generalized Principal Component Analysis (GPCA), a tool that is useful for computer vision and image processing.