I have a question about real projective space $\mathbb{R}P^n$. I am studying such an example on construction a vector bundle, but I am not familiar with the projective space at all.
We have $X=\mathbb{R}P^n$ and let $L\subset X\times \mathbb{R}^{n+1}$ denoted by $$L=\left\{(l,v) : l\in X, v\in l\right\}.$$
$L$ is a subfamily of the trivial family and our goal is to show that it is a line bundle over $X$. So we want to produce a local trivialization for any $l\in X$. WLOG we concider the case when $l=<e_1>$. Now it starts be harder for me. Let $U\subset\mathbb{R}P^n$ be the set of lines whose orthogonal projection to $<e_1>$ is nonzero. Such a line contains a unique vector of the form $e_1+u$, such that $e_1\cdot u=0$ (why?). Then define $s:U\rightarrow L$ by sending $l$ to $(l,e_1+u)$ where $e_1+u$ is the unique point on $l$ described above. This section is clearly nonzero everywhere (why?), so it gives a trivialization of $L|_{U}$. Thus, we have proven that $L$ is locally trivial and hence a vector bundle.
If someone could comment the whole construction, specially places which I marked as confusing, I would be greatful.
As mentioned by ziggurism in the comments you probably meant to write that $v\in l $ instead of $v\in \mathbb{R}^{n+1}$. Otherwise the bundle is simply the trivial bundle of rank $n+1$ on $X$ and thus also locally trivial. So let's assume you meant
$$L=\{(l,v)\mid l\in X, v\in l\}.$$
So in words $L$ consists of the pairs of a line in $\mathbb{R}^{n+1}$ and a point on that line. The bundle projection is simply $(l,v)\mapsto l$ and the fiberwise additions and scalar multiplication are $\lambda(l,v)=(l,\lambda v)$ and $(l,v)+(l,w)=(l,v+w)$ where we not that the sum of two vectors on a line through the origin is still on that line through the origin thus the addition is well-defined.
Now for the part that you seem to struggle with, the local trivializations. First note that the fiber of the $L$ over $l\in X$ is given by $l\subset \mathbb{R}^{n+1}$ so that the dimension of the fibers is $1$. Thus a trivialization is given by a non-vanishing section. By changing the basis of $\mathbb{R}^{n+1}$ we obatin a trivialization around any line $l\in X$ if we obtain one around the line $\langle e_1\rangle\in X$ spanned by $e_1$.
Now consider the subset $U\subset X$ of lines $l\in X$ which are not orthogonal to $\langle e_1\rangle$. Another way to characterize $U$ is that $l\in U$ if and only if $v\cdot e_1\neq 0$ for all $0\neq v\in l$. Suppose $l\in U$ and pick some $0\neq v_0\in l$. Note that for all $v\in l$ there is $\lambda_0\in \mathbb{R}$ such that $v=\lambda v_0$ (since $l$ is a line). Set $$w=\frac{v_0}{v_0\cdot e_1}$$ and note that $w$ does not depends on $v_0$, since if we had started with $v_1=\lambda_1v_0$ then $\frac{v_1}{v_1\cdot e_1}=\frac{\lambda_1v_0}{\lambda_1v_0\cdot e_1}=\frac{v_0}{v_0\cdot e_1}$. Note also that $w\cdot e_1=\frac{v_0\cdot e_1}{v_0\cdot e_1}=1$. Now if we write $w$ in the orthogonal basis $(e_1,\ldots, e_{n+1})$ as $$w=\sum_{i=1}^{n+1}a_ie_i$$ we see that $1=w\cdot e_1=a_1$ and so indeed $w=e_1+u$ with $e_1\cdot u=0$ (where $u=\sum_{i=2}^{n+1}a_ie_i$). It is clearly the unique vector of the form $e_1+u'\in l$ with $e_1\cdot u'=0$ since if we set $e_1+u'=v_0$ we find $$w=\frac{v_0}{e_1\cdot v_0}=e_1+u'.$$
Now set $s\colon U\rightarrow L$ to be the map $s(l)=(l,w)$ then this map is clearly a section and $w=0$ implies $1=e_1\cdot w=0$ which is a contradiction. So we see that $s$ is a non-vanishing section and thus trivializes $L$ over $U$.
I hope this clarifies the construction a bit for you, if questions remain please put them in the comments or edit your question above.