Consider a line $r$ in a projective space $\mathbb{P}^{n-1}$. I'd like to understand what is the dimension of the set of hypersurfaces containing $r$, that is $$\dim(M_r)=\dim\{H\subset \mathbb{P}^{n-1}\mid \dim(H)=n-2 \text{, and} H\supset r\}.$$ This question arises from my research, but I'm new to these kind of probelms and I'd like to understand if I'm correct.
In order to familiarize with it, I tried the case $n=4$, that is $\mathbb{P}^3$: wlog I assumed $r=Z(x_2,x_3)$. But if $H$ contains the line, I must impose only another condition to describe the plane, hence I obtain $M_r\simeq \mathbb{C}\simeq \mathbb{P}^0$.
Thus I suspect that in general, for a line in $\mathbb{P}^{n-1}$ I obtain $M_r\simeq \mathbb{C}^{n-3}\simeq \mathbb{P}^{n-2}$.
I apologize in advance if my reasoning was quite rude, but I did not know how to approach it. Moreover, does there exists a general strategy?
If I have a line $L\subset\mathbb P^3$, a plane $H_p \supset L$ is determined by picking a point $p\in\mathbb P^3 \setminus L$, but for any $p$ there is a $\mathbb P^2 \setminus L$ worth of points $q$ such that $H_p = H_q$. In other words, there is a surjective map $\mathbb P^3 \setminus L \to M_r$ with $2$-dimensional fibers, so $\dim (M_L) = 1$.
If you have $L \subset \mathbb P^4$, you need to pick a general line to get a hyperplane. The Grassmannian $G(2,5)$ of lines in $\mathbb P^4$ has dimension $2(5-2) = 6$, while the Grassmannian $G(2,4)$ of lines in a $3$-plane has dimension $4$. Thus we have a surjective map from an open subset of the first Grassmannian onto $M_L$ with $4$-dimensional fibers, hence $\dim (M_L) = 2$.
In general, this setup produces a surjection from an open subset of $G(n-3,n)$ onto $M_L$ whose fibers are isomorphic to an open subset of $G(n-3,n-1)$, so the target has dimension $(n-3)(n-(n-3)) - (n-3)(n-1 - (n-3)) = (n-3)(3) - (n-3)(2) = n-3$.