Let $\mathcal{L}$ be a line bundle on a scheme $X$. Then by definition there exists an open cover $\{U_i\}$ of $X$, such that
$$ g_i: \mathcal{L} \vert_{U_i} \overset{\sim}{\to} \mathcal{O}_X \vert_{U_i} $$
On the intersection $U_{ij}:= U_i \cap U_j$, there then exist two isomorphism,
$g_{ij}, g_{ji} : \mathcal{L}_{U_{ij}} \overset{\sim}{\to} \mathcal{O}_X \vert_{U_{ij}}$
How are these two isomorphisms related?
$$f_{ij}:\mathcal{L} \vert_{U_{ij}} \overset{g_{ij}}{\to} \mathcal{O}_X \vert_{U_{ij}} \overset{ g_{ji}^{-1}}{\to} \mathcal{L} \vert_{U_{ji}}$$ So that $f_{ij}= g_{ji}^{-1} g_{ij}$ is an isomorphism.
Now, from what I have read, it is very common for a book to claim that $f_{ij} \in \mathcal{O}_X^* \vert_{U_{ij}}$. Why is this true?
I don't really see how to relate $f_{ij}$ with a regular invertible function on $U_{ij}$.
The point is that $f_{ij}$ should restricts to a linear isomorphism $\mathcal L_x \to \mathcal L_x$ i.e multiplication by a non-zero scalar $\lambda \in k^*$. Since these scalars vary when $x$ vary we obtain indeed a regular non-vanishing function $f_{ij} \in \mathcal O^*(U_{ij})$ (when $\mathcal O^*$ is the sheaf of non-zero regular functions).