# Definition of dimension of a projective variety

The title is quite self-explanatory: I'm an undergraduate maths student who hasn't attended (yet) a course in Algebraic Geometry (but I did a course on commutative algebra), however I have to write a short essay on projective varieties for a -difficult to explain- exam.

I'm struggling with the definition of dimension of a projective variety $X \subset \mathbb{P}^n(k)$: I don't have any recommended textbook and all the material I found (which obviously doesn't involve more advanced tools like schemes) is quite confusing.

I'd be very glad if someone could spend a minute writing the correct definition (or the definitions, if there are many equivalent), and maybe where to find some material about this subject.

I apologize for this question, I know it's a bit vague, but I hope someone will be so kind as to help me. Thanks in advance.

I assume you know what is the dimension of an affine variety. You don't need to know more : if $X$ is irreducible and projective, define $\dim X = \dim U$ where $U \subset X$ is an affine open. If $X$ is projective and not irreducible, define $\dim X = \sup_i \dim X_i$ where $X_i$ are the irreducible components.
If you want to do calculations, then Nicolas Hemelsoet's answer works perfectly well. I think though that maybe the "right" definition is simply to define the Krull dimension of a topological space. Namely, the the Krull dimension of a topological space $X$ is the supremum of the length of chains $X_0\subset\dots\subset X_n$ of irreducible closed subsets of $X$. The chain that I wrote down has length $n$. You can prove now that if you have a nonempty open subset $U$ in an irreducible space $X$, then $\dim U=\dim X$. From this, you recover Nicolas Hemelsoet's definition.