Solution (source code)

= Solution

For the <Minkowski metric> $J=\operatorname{diag}(1,-1)$, preservation means $(Ax)^TJ(Ay)=x^TJy$ for all real <vectors> $x,y$. This is equivalent to $A^TJA=J$, or, entrywise,
$$
a^2-c^2=1,\qquad b^2-d^2=-1,\qquad ab-cd=0.
$$
The restriction $a>0$ puts the first column on the right branch of the unit <hyperbola>, so uniquely $a=\cosh t$, $c=\sinh t$ for a real parameter $t$. The third equation makes the second column a scalar multiple of $(\sinh t,\cosh t)^T$: this also covers $t=0$, when $b=0$. The second equation makes that multiple $\varepsilon=\pm1$. Thus \b[all the required <matrices> are]
$$
\boxed{A=H(t)D_\varepsilon=\begin{pmatrix}\cosh t&\varepsilon\sinh t\\\sinh t&\varepsilon\cosh t\end{pmatrix},\quad t\in\mathbb R,\quad\varepsilon=\pm1.}
$$
The <hyperbolic function> addition formulas give $H(t)H(s)=H(t+s)$, while $D_\varepsilon H(s)=H(\varepsilon s)D_\varepsilon$. Consequently
$$
(H(t)D_\varepsilon)(H(s)D_\eta)=H(t+\varepsilon s)D_{\varepsilon\eta}.
$$
The product remains of the required form and its upper-left entry is positive. The identity is $H(0)D_1$, and the inverse is $H(-\varepsilon t)D_\varepsilon$. Together with associativity of <matrix multiplication>, these identities establish the <group> property. This is the <time-orientation-preserving Lorentz group in one spatial dimension>.