Pseudo-dimension of a subset of affine functions
I am using the definition of pseudo-dimension found here, page 10 of the pdf.
Denote $h_1(x) = 2x+1$, $h_2(x) = 4x$, $h_3(x) = x$ and $h_4(x) =3x+4$.
Let's consider $C = (-2, 2)$ a vector. Then $r = (-2.5, 6)$ is a witness that proves that $C$ is pseudo-shattered by $\mathcal{H}$:

$h_1(-2) = -3 &lt;-2.5$, $h_1(2) = 5 &lt;6$;
$h_2(-2) = -8 &lt;-2.5$, $h_2(2) = 8 &gt;6$;
$h_3(-2) =  -2&gt;-2.5$, $h_3(2) = 2&lt;6$;
$h_4(-2) = -2 &gt;-2.5$, $h_4(2) = 10 &gt;6$.

Clearly $\text{Pdim}(\mathcal{H})&lt; 3$ since the pseudo-dimension cannot be greater than $\log_2 |\mathcal{H}|$.
That proves that $\text{Pdim}(\mathcal{H}) = 2$.