If I have a function space defined by the basis {$sin(x), cos(x)$}. And you have the vectors $v = (2,2)$ and $u = (-1,1)$.
So $v$ reperesent a point, on the plane define by the basis, the function $2sin(x) + 2cos(x)$ and $u$ represents $-sin(x) + cos(x)$.
The vectors $v$ and $u$ are orthogonal on the plane where first axis represents multiples of $sin(x)$ and the second multiplies of $cos(x)$. So since the vectors themselves are orthogonal, then it should be the case that the functions they represent need to be orthogonal. And if I take the inner product of the function on the interval $[-\pi, \pi]$, that is
$\int_{-\pi}^{\pi} (2sin(x) + 2cos(x)) * (-sin(x)+ cos(x)) dx = 0$
But this is not the case for another interval, forexample $[-3\pi/2, 3\pi/2]$.
So then does this mean the functions are only orthogonal for certain intervals only? Can they be considered orthogonal?
This is all of course if I havent misinterpreted the concept of inner product of functions, which I'm still struggling to understand.
Orthogonality of vectors (in this case functions residing in a vector space) requires knowledge of an inner product, $\langle\cdot ,\cdot\rangle$, and two vectors $u$ and $v$ are said to be orthogonal (with respect to our specific inner product) when it is true that $\langle u,v\rangle=0$
It is possible that the same vectors, and even the same choice of vector space, have multiple choices for inner products where although $u$ might be orthogonal to $v$ with respect to the first inner product, they need not be orthogonal with respect to a different inner product.
Your example is a perfectly good one and shows that $(2\sin(x)+2\cos(x))\perp (-\sin(x)+\cos(x))$ with respect to the inner product $\langle u,v\rangle_1=\int\limits_{-\pi}^\pi u\cdot v ~dx$, but not with respect to the inner product $\langle u,v\rangle_2=\int\limits_{-\frac{3\pi}{2}}^{\frac{3\pi}{2}}u\cdot v~dx$.
Context is very important when discussing things like orthogonality, and so whenever we say "two vectors are orthogonal", unless it is completely obvious what setting we are working in, you should always include a reminder as to what inner product you are using.