You can derive the Lorentz Transform (LT) purely within 1-dimensional space using the geometry of a space-time diagram for two light transmissions along the x-direction only. The approach below is based on the book Special Relativity by AP French. But whereas French assumes (pg 78) at the outset a relation of form $x = ax' + bt'$, $x' = ax - bt$, for some $a$, $b$, the derivation below does not make any assumptions about the form of the transformation matrix - only that it is some linear transform, ie a general $2 \times 2$ matrix.
French justifies the linearity of the LT by arguing (pg 77) that a non-linear transform would not map a constant velocity to a constant velocity - which would contradict the inertial property of the frames. A non-linear map would be represented by curved $x'$ and $t'$ axes in Fig. 2 below so a straight line in $xt$-space would not in general be a straight line in $x't'$-space.
We use the idea of a 'skew' coordinate system $C'$ in 2D based on two arbitrary (non-parallel) vectors $\underline{\mathbf{a}}$ and $\underline{\mathbf{b}}$ as in Fig 1 below - note these are not necessarily unit vectors. The transform matrix mapping from $C$ coords (the original Cartesian $xy$-coord system) to the $C'$ coord system (ie $x'y'$-coords) is given by $[\begin{array}{cc}
\underline{\mathbf{a}} & \underline{\mathbf{b}}
\end{array}]^{-1}$
ie
\begin{equation}
\left(
\begin{array}{c}
x' \\ y'
\end{array}
\right)
=
\left[
\begin{array}{cc}
\underline{\mathbf{a}} & \underline{\mathbf{b}}
\end{array}
\right]^{-1}
\left(
\begin{array}{c}
x \\ y
\end{array}
\right)
=
A
\left(
\begin{array}{c}
x \\ y
\end{array}
\right)
\tag{1}\label{eq:skew-transform}
\end{equation}
and any $2 \times 2$ non-singular matrix $A$ can be represented this way by choosing $\underline{\mathbf{a}}$ and $\underline{\mathbf{b}}$ as the columns of $A^{-1}$.
In Fig 1, it is easy to visualize the $(x', y')$ coords of a point $P(x,y)$ by making the parallelogram construction shown.

In the space-time diagram in Fig 2 we have a frame $S'$ moving at $v$ wrt a frame $S$ in the standard setup. These are 1-dimensional frames with only an $x/x'$-axis. (Fig 3 depicts the situation with $v < 0$).


$A, B, C$ are at rest in $S'$ and at $t = 0$ light source $B$ sends light signals to $A$ and $C$. The blue world lines in Fig. 2 show how $S$ sees $A, B, C$ moving with time at speed $v$. Events $D, F$ are where the light signals (which have the green world lines) reach $A, C$ respectively.
For $S$, using the $xt$-coord system, event $D$ comes before event $F$, ie light reaches $A$ before it reaches $C$. We require an $x't'$-coord system for $S'$ for which the speed of light is $c$ in all directions, to satisfy Postulate 2. Thus whatever that system is it must consider events $D$ and $F$ to be simultaneous because the distance covered within $S'$ is the same in each direction. Because we are arguing the transform must be linear, it must correspond with some choice of $x't'$-axes in Fig 2, because it must correspond with a non-singular $2 \times 2$ matrix.
We consider constructing such a coord system using the method of Fig 1, using the coord axes $x'$ and $t'$ shown in Fig 2, ie. the basis vectors $\underline{\mathbf{a}}$, $\underline{\mathbf{b}}$ lie along the $x'$, $t'$ axes respectively. (We would shift these axes down so the origin coincided with that of the $xt$-axes). Note the $x'$, $t'$ axes are not physical axes, they are simply being used to represent a general linear transform $(x, t) \mapsto (x', t')$ on $\mathbb{R}^{2}$ as in Fig 1 - the advantage then is that this transform can be easily visualized via a parallelogram type construction as in Fig 1. Then in Fig 2 we can visualize the coordinates of any point event $(x, t)$ in $S$ when seen in the $(x', t')$ space of $S'$. For example, when two point events in S are joined by a straight line parallel to the $x'$ axis then they have the same $t'$ coordinate - when they are joined by a straight line parallel to the $t'$ axis then they have the same $x'$-coordinate.
The directions for the $x'$ and $t'$ axes shown in Fig 2 are suitable choices because :
- $A$ and $D$ must have the same $x'$ coord,
- $C$ and $F$ must have the same $x'$ coord, and
- light arrival events $D$ and $F$ must have the same $t'$ coord, ie be simultaneous in $S'$.
Thus the required transformation from $(x, t) \mapsto (x', t')$ is
$L = [\begin{array}{cc}
\underline{\mathbf{a}} & \underline{\mathbf{b}}
\end{array}]^{-1}$
where $\underline{\mathbf{a}}$ has the gradient $m$ shown in Fig 2, and $\underline{\mathbf{b}}$ has the gradient $1/v$. (Fig 3 shows the case where $v < 0$). Other choices of gradients would not satisfy the conditions 1-3. This only defines the directions of $\underline{\mathbf{a}}$ and $\underline{\mathbf{b}}$ however, so we can write :
\begin{equation}
L = [\begin{array}{cc}
k_{1}\underline{\mathbf{a_{0}}} & k_{2}\underline{\mathbf{b_{0}}}
\end{array}]^{-1} \tag{2}\label{eq:L-general}
\end{equation}
where
$$
\underline{\mathbf{a_{0}}} =
\left(
\begin{array}{c}
1 \\ m
\end{array}
\right),
\underline{\mathbf{b_{0}}} =
\left(
\begin{array}{c}
v \\ 1
\end{array}
\right),
$$
and $k_{1}$ and $k_{2}$ are arbitrary non-zero constants.
Any matrix $L$ of this form will satisfy the condition of making events $D$ and $F$ above simultaneous in $S'$.
The value of $m$ is easily found from the $(x, t)$ coords of $D$ and $F$. D is the intersection of lines $x = vt - l$ and $t = -x/c$ :
\begin{eqnarray*}
-ct & = & vt - l \\
\Rightarrow t & = & \frac{l}{c + v} \\
\Rightarrow x & = & \frac{-cl}{c + v} \\
\Rightarrow D & = & \frac{l}{c + v}(-c, 1).
\end{eqnarray*}
F is the intersection of lines $t = x/c$ and $x = vt + l$ :
\begin{eqnarray*}
ct & = & vt + l \\
\Rightarrow t & = & \frac{l}{c - v} \\
\Rightarrow x & = & \frac{cl}{c - v} \\
\Rightarrow F & = & \frac{l}{c - v}(c, 1).
\end{eqnarray*}
Then
\begin{equation}
m = m_{DF} = \frac{\Delta t}{\Delta x} = \frac{l\left( \frac{1}{c - v} - \frac{1}{c + v} \right)}{l\left( \frac{c}{c - v} + \frac{c}{c + v} \right)} = \frac{2v/(c^{2} - v^{2})}{2c^{2}/(c^{2} - v^{2})} = \frac{v}{c^{2}} \tag{3}\label{eq:calc-m}
\end{equation}
We can determine $k_{1}$ and $k_{2}$ using the following symmetrical property of the relative velocity between two inertial frames $S$ and $S'$ : if $S$ sees $S'$ moving at constant velocity $v$ then $S'$ sees $S$ moving at constant velocity $-v$. (This is obvious under Classical Physics as we have absolute space and time, but under Special Relativity we have to assume it).
Firstly we can show $k_{1} = k_{2}$ :
(i)
Consider space-time coords of $O'$. In $S'$, these are $(0, t')$ and the corresponding coords in $S$ are $(x, t)$. But since $S$ sees $O'$ moving at velocity $v$ we must always have $x/t = v$.
For now writing
$$
L^{-1} =
\left[
\begin{array}{cc}
a & b \\
d & e \\
\end{array}
\right]
$$
we have
\begin{eqnarray}
x & = & ax' + bt' \nonumber \\
t & = & dx' + et' \tag{4}\label{eq:L-inverse}
\end{eqnarray}
and so for $O'$ which has $x' = 0$ for all time :
\begin{eqnarray*}
x & = & bt' \\
t & = & et'
\end{eqnarray*}
and then since also $x/t = v$ for all time, we have $b/e = v$.
(ii)
Consider space-time coords of $O$. In $S$, these are $(0, t)$. And $O$ is moving at velocity $-v$ in $S'$, so $(x', t')$ for $O$ must always satisfy $x'/t' = -v$. Thus from (\ref{eq:L-inverse}), we have :
\begin{eqnarray*}
0 & = & ax' + bt' \\
t & = & dx' + et'
\end{eqnarray*}
the first of which implies $0 = a(-v) + b$, ie. $b/a = v$. Thus $v = b/e = b/a$ and so $a = e$. But from (\ref{eq:L-general}) the diagonal terms $a, e$ are just $k_{1}, k_{2}$, hence $k_{1} = k_{2} = k$, say.
(An alternative method of showing $k_{1} = k_{2}$ is to note the distance travelled by each light signal in $S'$ is represented by $\frac{1}{2}DF$, and its journey time in $S'$ is represented by $BE$, so that the speed of these signals in $S'$ is $c'$ given by :
$$
(c')^{2} = \frac{ \left(\frac{1}{2}DF\right)^2 / (v^{2}/c^{4} + 1)k_{1}^{2} }{ BE^{2} / (v^{2} + 1)k_{2}^{2} },
$$
the scaling factor in the numerator being the length of the $k_{1}\underline{\mathbf{a_{0}}}$ basis vector, and the scaling factor in the denominator being the length of the $k_{2}\underline{\mathbf{b_{0}}}$ basis vector. Then using $DF^{2} = \Delta t^{2} + \Delta x^{2}$ ($\Delta t$ and $\Delta x$ taken from (\ref{eq:calc-m})), and $E = \frac{1}{2}(D + F)$, we can show $c' = c$ iff $k_{1} = k_{2}$, so that the latter follows from Postulate 2).
Next we show $k = \gamma$, where $\gamma$ is the Lorentz factor $1/\sqrt{(1 - v^{2}/c^{2})}$.
From (\ref{eq:L-general}) and (\ref{eq:calc-m}) we have :
$$
L^{-1} = k
\left[
\begin{array}{cc}
1 & v \\
v/c^{2} & 1 \\
\end{array}
\right]
$$
so $\det L^{-1} = k^{2}(1 - v^{2}/c^{2}) = k^{2} / \gamma^{2}$, and thus
$$
L = \frac{\gamma^{2}}{k}
\left[
\begin{array}{cc}
1 & -v \\
-v/c^{2} & 1 \\
\end{array}
\right].
$$
This is the transform from $S$ to $S'$. It follows that since $S'$ observes $S$ moving at a relative velocity of $-v$ in the standard setup the transform $M$ from $S'$ to $S$ is this same matrix but with $v$ substituted by $-v$, ie.
$$
M = \frac{\gamma^{2}}{k}
\left[
\begin{array}{cc}
1 & v \\
v/c^{2} & 1 \\
\end{array}
\right].
$$
But $M$ must equal $L^{-1}$, so now
$$
\frac{\gamma^{2}}{k}
\left[
\begin{array}{cc}
1 & v \\
v/c^{2} & 1 \\
\end{array}
\right]
=
k\left[
\begin{array}{cc}
1 & v \\
v/c^{2} & 1 \\
\end{array}
\right],
$$
and hence $\gamma^{2} / k = k$, ie $\gamma^{2} = k^{2}$, so $k = \pm \gamma$. Choosing $k = -\gamma$ just gives essentially the same transform again but with the basis vectors multiplied by $-1$, so
$$
L = \gamma
\left[
\begin{array}{cc}
1 & -v \\
-v/c^{2} & 1 \\
\end{array}
\right]
$$
is the only possible linear transform that can satisfy Postulate 2 in one dimensional space.
When this is extended into three dimensional space by defining $y' = y$ and $z' = z$ we need to check the speed of light is preserved in all directions, and that speeds of less than $c$ are mapped to speeds of less than $c$ - and the Lorentz Speed Transform can be used to show this - this transform also shows constant speeds are not necessarily mapped to constant speeds. The Lorentz Velocity Transform shows constant velocity maps to constant velocity, but this also holds for any linear transform.
There are various intuitive arguments to justify setting $y' = y$ and $z' = z$, such as those involving rings or sticks passing one another, but in formal terms we can readily show the extension at least cannot be of the form $y' = \alpha y + \beta t$ and $z' = \eta z + \epsilon t$, unless $\alpha = 1, \beta = 0, \eta = 1, \epsilon = 0$ : https://physics.stackexchange.com/a/484294/111652.