I learned that the full Lorentz group $O(1,3)$ is the set of transformations that preserve the spacetime length $$\textbf{x} \cdot \textbf{x}=x_0^2-x_1^2-x_2^2-x_3^2$$ where the vector $\textbf{x}=(x_0,x_1,x_2,x_3)$.
It was then said that $O(1,3)$ preserves the dot product $$\textbf{x}\cdot\textbf{y}=x_0y_0-x_1y_1-x_2y_2-x_3y_3$$ where the vectors $\textbf{x}=(x_0,x_1,x_2,x_3)$ and $\textbf{y}=(y_0,y_1,y_2,y_3)$.
Why is this true?