invertible sheaf of a hypersurface

Let $X \hookrightarrow \mathbb{P}^n$ be a hypersurface of degree $d$. I am trying to prove that $\mathcal{O}_{\mathbb{P}^n}(X)=\mathcal{O}(d)$. My idea is the following: if one considers the $d$-uple embedding $$i: \mathbb{P}^n \hookrightarrow \mathbb{P}^{{n+d \choose n}-1}$$ X becomes a hyperplane section, so $\mathcal{O}(X)=\mathcal{O}(1)$ in the big projective space. Then it suffices to show that

$i^\ast \mathcal{O}(1)=\mathcal{O}_{\mathbb{P}^n}(d)$

Is that correct? Is there a more standard way to do it? Anyway, how one verifies this last point?

-
This is off-topic here, as this website as dedicated to question that are relevant in mathematical research. Please read the FAQ, and try posting at math.stackexchange.com . –  Angelo Mar 26 '13 at 12:13
I agree with Angelo. One more point: since there are so many different ways to define "degree" of a (pure-dimensional) closed subscheme (or cycle) in projective space, it makes sense to specify which definition you use, e.g., by specifying which textbook you are using. –  Jason Starr Mar 26 '13 at 12:27
I was using the naive definition. X is the zero set of a homogeneous polynomial of degree $d$. –  hypd2 Mar 26 '13 at 12:28