Regarding the dimension of irreducible (finite-dimensional) group representations

Ok, I admit it. I'm confused. I'm a physics student attempting to learn some group theory and topology in my spare time. I was reading about group representations. For example I get that the set of spherical harmonics $$Y_{lm}(\theta,\phi)$$ form a set of irreducible representations of $$SO(3)$$. What I don't get is their dimension. For example here (page 144 as it reads on the paper heading) it is stated:

The $$Y_{lm}(\theta,\phi)$$ form a $$(2l+1)$$ -dimensional representation of $$SO(3)$$.

Now, in utilizing the spherical harmonics in physics, I know that I'm working in a three dimensional space. I further know that I can represent any “well behaved” function $$f(\theta ,\phi)$$ on the unit sphere in $$R^3$$ in terms of a series of these spherical harmonics (properly weighted with coefficients) like so:

$$f(\theta,\phi)=\sum_{l=0}^{\infty}\sum_{m=-l}^{m=l}a_{lm}Y_{lm}(\theta,\phi)$$

It's not lost on me that the dimensionality for a given representation is the same as the number of $$m$$ values (ie the second summation). I know the function "lives" in a $$2$$-dimensional space (the unit sphere). So what is going on? Is there a mapping or reference to another space I'm missing? is this a physicist's notational/dictionarial clash with the mathematician's?? Thank you in advance.

• The space of functions on the unit sphere is infinite-dimensional, so the functions do not "live" in a 2-dimensional space (other than in the trivial sense that each individual function spans a 1-dimensional space). Maybe if you include the definition of the various symbols used here. – Tobias Kildetoft Nov 15 '18 at 7:40
• @TobiasKildetoft I suppose I'm just used to two variables=two dimensions. please see my penultimate sentence in the question and elaborate then if willing. – R. Rankin Nov 15 '18 at 7:58
• I don't see any clash, other than most of the notation not being defined. The unit sphere is 2-dimensional (as a manifold), but the space of all (smooth) maps on the unit sphere (presumably with values in the reals) is an infinite-dimensional vector space. – Tobias Kildetoft Nov 15 '18 at 8:00
• @TobiasKildetoft Ok I get it. i'm not sure why but I'd never seen the harmonics for a particular l written as a $(2l+1)x(2l+1)$ array (matrix) but putting the various entries for m into the diagonal of a matrix means that the $a_{lm}$ are similarly written in an array. In that sense I see how they're said to have dimension $(2l+1)$ In that sense, a function does have dimension 1. – R. Rankin Nov 16 '18 at 3:21
• i think the only formal definition of dimension I'd come across was one for defining the dimension of a fractal in an old non-euclidean geometry class i'd had. but that doesn't apply here. – R. Rankin Nov 16 '18 at 3:25