Given an endomorphism u of a finite-dimensional vector space (over an
arbitrary field), we give necessary and sufficient conditions for the existence
of a regular quadratic form (resp. a symplectic form) for which u is orthogonal
(resp. symplectic). When the field of scalars has characteristic 2, we also
give necessary and sufficient conditions for the existence of a regular
symmetric bilinear form for which u is orthogonal. For the field of real
numbers and for finite fields, we characterize the existence of a regular
quadratic form in a given equivalence class for which u is orthogonal. In
particular, this yields the possible Jordan canonical forms of the matrices in
the real orthogonal group O_{r,s}(R).