My book states that the set of all continuous functions defined on a closed interval $[a, b]$ where $a ≠ b$ satisfies the axioms of a vector space.
I am understanding that this means that for the axiom of closure under multiplication, any function within that interval that we would multiply by any scalar would still be a function within that interval. I am a little confused about this. For example how does $C[2, 4]$ with scalar $0$ satisfy this? If we would multiply any function by scalar $0$, how would it still be a function within $C[2, 4]$?
Just as a comparison, I have also understood that the set of all quadratic functions is not a vector function because if we would multiply by scalar $0$, it would cease to be a quadratic function. Am I wrong about this as well? If not, what is the difference?