Question
Suppose $V$ is a (finite-dimensional) vector space over $F$ ($\operatorname{char }F\neq2$, due to user1551) equipped with a non-degenerate quadratic form $Q$, and $T$ is a distance-preserving operator on $V$, viz. $Q(Tu-Tv)=Q(u-v)$ for each $u,v\in V$. Is it true that $T$ is linear affine (due to user1551)?
Background
I'm thinking about the mathematical derivation of Lorentz transformation from the principles of special relativity. In the context, $F=\mathbb R$, $V=F^4$ and $Q$ is the Lorentz quadratic form. The original problem might be with condition that $T$ acts on the space $\mathbb R^3$ as a translate (since they are inertial frames of reference), but $Q(Tu-Tv)=Q(u-v)$ only when $Q(u-v)=0$, which means that the operator preserves light cones.
On condition that $F=\mathbb R$ and $Q$ is positive definite the answer is true. It follows from a standard derivation: Suppose $\langle x,y\rangle=(Q(x+y)-Q(x)-Q(y))/2$, then by definition $\langle\circ,\circ\rangle$ is a positive definite bilinear form. Note that $\langle Tu,Tv\rangle=\frac12(Q(Tu)+Q(Tv)-Q(Tu-Tv))=\frac12(Q(u)+Q(v)-Q(u-v))=\langle u,v\rangle$, we have $Q(Tcv-cTv)=\langle Tcv-cTv,Tcv-cTv\rangle=0$ and $Q(T(u+v)-Tu-Tv)=\langle T(u+v)-Tu-Tv,T(u+v)-Tu-Tv\rangle=0$ follows, which implies that $T(u+v)=Tu+Tv$ and $Tcv=cTv$.
From the preceding argument, $T(u+v)-Tu-Tv$ and $Tcv-cTv$ are generally isotropic, but I don't know whether they must be zero.
Any idea? Thanks!
I suppose you meant that $T$ is affine rather than merely linear. So, suppose $T(0)=0$ and hence $Q(T(u))=Q(T(u)-T(0))=Q(u-0)=Q(u)$. We want to know if $T$ is linear or not.
As you said that $Q$ is nondegenerate, I also suppose that $\operatorname{char} F\ne2$ and $Q$ is induced by a symmetric bilinear form $b(x,y)=\frac12\left(Q(x+y)-Q(x)-Q(y)\right)$. It follows that $b(T(x),T(y))=b(x,y)$ for all $x,y\in V$.
Since every symmetric bilinear form on a finite dimensional vector space over a field of characteristic $\ne2$ is diagonalisable, we may further assume that $V=F^n$ and $b(x,y)=x^\top Dy$ for some diagonal matrix $D$. As $Q$ is nondegenerate, $D$ is invertible.
Let $\{e_1,\ldots,e_n\}$ be the standard basis of $F^n$ and let $\mathbf{T}=(T(e_1),\ldots,T(e_n))\in M_n(F)$. By assumption, for any $x\in V$, we have $T(e_i)^\top DT(x) = b(T(e_i),T(x)) = b(e_i,x) = e_i^\top Dx$ for each $i\in\{1,2,\ldots,n\}$. Therefore \begin{align*} &\mathbf{T}^\top DT(x)=I_nDx, \textrm{ for all } x\in V,\tag{1}\\ &\mathbf{T}^\top D\mathbf{T}=D.\tag{2} \end{align*} The equality $(2)$ implies that $\mathbf{T}$ is invertible. Hence $(1)$ implies that $T(x)=D^{-1}\mathbf{T}^{-\top}Dx$, i.e. $T$ is linear.