is it always not a function when you have a negative variable?
Perhaps you are thinking of $\displaystyle \sqrt{x}$ or $\displaystyle log(x)$ which are not defined for negative values of x. But those are properties of those particular functions, not functions in general.
Certainly simple functions, like $\displaystyle x^2$ or 3x- 2 are defined for all values of the variables, negative as well as positive.