References: Griffiths, David J. (2007), Introduction to Electrodynamics, 3rd Edition; Pearson Education – Chapter 12, Post 18.
The Lorentz transformations can be written in matrix form as
where the 0 () component is the first row and first column, followed by the 1, 2, and 3 directions in order. This matrix is for relative motion along the 1 axis.
The Galilean transformations can be written as a matrix as well, where the first coordinate is just rather than :
or if we want to use the same symbols as in the Lorentz case, where the top row of is a coordinate, we can write
The Lorentz transformation along the 2 () axis is obtained by putting the transformation terms in row and column 2:
If we apply a Lorentz transformation first in the and then in the direction (with different relative velocities), we get the compound matrix:
Note that although and are both symmetric, their product is not. This means that applying the transformations in the opposite order gives a different result.