7. Let the line $l$ passing through the fixed point $M(a, 0)$ intersect the parabola $y^{2}=4 x$ at points $P$ and $Q$. If $\frac{1}{|P M|^{2}}+\frac{1}{|Q M|^{2}}$ is a constant, then the value of $a$ is $\qquad$ .
7. 2 .

Let the parametric equation of line $l$ be
$$
\left\{\begin{array}{l}
x=a+t \cos \alpha, \\
y=t \sin \alpha,
\end{array}\right.
$$

where $t$ is the parameter, $\alpha$ is the inclination angle, and $\alpha \in(0, \pi)$.
Substituting into the parabola equation yields
$$
t^{2} \sin ^{2} \alpha-4 t \cos \alpha-4 a=0 \text {. }
$$

Let the two roots of this equation be $t_{1}$ and $t_{2}$. Then
$$
\begin{array}{l}
t_{1}+t_{2}=\frac{4 \cos \alpha}{\sin ^{2} \alpha}, t_{1} t_{2}=-\frac{4 a}{\sin ^{2} \alpha} . \\
\text { Hence } \frac{1}{|P M|^{2}}+\frac{1}{|Q M|^{2}}=\frac{1}{t_{1}^{2}}+\frac{1}{t_{2}^{2}} \\
=\frac{t_{1}^{2}+t_{2}^{2}}{\left(t_{1} t_{2}\right)^{2}}=\left(\frac{t_{1}+t_{2}}{t_{1} t_{2}}\right)^{2}-\frac{2}{t_{1} t_{2}} \\
=\frac{2 \cos ^{2} \alpha+a \sin ^{2} \alpha}{2 a^{2}} \text { (constant). }
\end{array}
$$

Therefore, $a=2$.