As is well known, for every orthogonal transformation of the Euclidean space there exists an orthogonal basis such that the matrix of the transformation is block-diagonal with first order blocks ±1and second order blocks that are rotations of the Euclidean plane. There exists a natural generalization of this theorem for Lorentz transformations of pseudo-Euclidean spaces with signature (1, n −1). In addition to invariant subspaces appearing in the Euclidean case, Lorentz transformations can have invariant subspaces of two new types: invariant plane with the Lorenz rotation and 3-dimensional cyclic subspace with isotropic eigenvector and eigenvalue ±1. In this paper, we present similar results about the structure of isomorphisms of pseudo-Euclidean spaces with signature (p, n −p) for p=2, 3.