Solution (source code)

= Solution

Put $Y_p=D(Y)$. Direct <matrix multiplication> gives
$$
Y_p^2=\begin{pmatrix}1&p-p\\0&1\end{pmatrix}=I_2
$$
for every real $p$. Since $D(X)=-I_2$ commutes with all matrices and $D(Z)=-Y_p$, the remaining relations also hold:
$$
D(X)^2=D(Z)^2=I_2,\qquad D(X)D(Y)=D(Z),\qquad D(X)D(Y)D(Z)=I_2.
$$
All matrices are invertible, and the relations reproduce the <multiplication table> of the <Klein four-group>. Therefore
$$
\boxed{p\in\mathbb R\text{ is arbitrary}.}
$$
A <representation> need not be an <orthogonal representation>; imposing orthogonality on the displayed matrices would be an extra condition.

The <characters> are their traces, independent of $p$:
$$
\boxed{\big(\chi(I),\chi(X),\chi(Y),\chi(Z)\big)=(2,-2,0,0).}
$$
In terms of part (b), $\chi=\chi_{-+}+\chi_{--}$, so the representation is reducible. For an explicit <change of basis>, take
$$
S=\begin{pmatrix}1&-p/2\\0&1\end{pmatrix}.
$$
Then $S^{-1}D(Y)S=\operatorname{diag}(-1,1)$ and $S^{-1}D(Z)S=\operatorname{diag}(1,-1)$, while $D(X)$ remains $-I_2$. These are the <equivalent sheared representations of the Klein four-group>; the parameter changes the basis, not the two irreducible constituents.