# Dimension of a Spline Space

What is the dimension of a given spline space S(k,t)? What does the dimension of spline space refer to? It seems like it might refer to the dimensionality of the control points, but maybe I'm missing something.

I'm reading about geometric modeling with splines and this question came up.

-

If the splines are of order $k$ (degree $k-1$), and you have $n$ knots, then the dimension of the spline space is $n-k$, I think. It's messy because the spline representations that are typically used in geometric modeling have a knot value at each end that's really not used, and could be omitted. For example, to represent a cubic Bezier curve, many people would use a knot sequence of $\{0,0,0,0,1,1,1,1\}$. But $\{a,0,0,0,1,1,1,b\}$ will give you exactly the same curve provided $a\le0$ and $b\ge1$. – bubba Jan 6 '13 at 5:35
I believe this is incorrect. The size is $n+k$. Think about it like this: there are $n$ intervals each with a polynomial of degree $k$. This gives $n(k+1)$ free coefficients. However, we impose continuity in derivatives $0,...,k-1$ at the $n-1$ internal nodes. This is $(n-1)k$ constraints. $n(k+1) - (n-1)k = n+k$. – Chester May 5 '15 at 1:21
Consider a very simple case -- cubic Bezier curves (i.e. cubic splines that have a single segment and 4 control points). The usual knot sequence would be $\{0,0,0,0,1,1,1,1\}$, so $n=8$. Also $k=4$. So $n-k=4$, which is correct. On the other hand, $n+k =12$, which seems obviously wrong, to me. The flaw in your reasoning is that $n$ knots does not imply $n$ intervals. – bubba May 9 '15 at 8:53
@bubba, Sorry I missed your reply. There's no flaw. We're just talking about different things. The definition of a spline according to wiki or according to this text by Quarteroni is a piecewise polynomial of degree $k$ on $n$ subintervals who is $k-1$ times differentiable on the entire interval. The degree of the space of splines of degree $k$ according to these definitions is as I described above (and can also be found in the text by Quarteroni). – Chester Aug 14 '15 at 14:41