I am having difficulty determining the dimension of a projective variety in general.
For example, I am confused about the dimension of the projective variety $X-Y=0$ in $\mathbb{P}^3$.
I was thinking that the dimension of this variety is $1$ because it defines a line. However, I am confused because if we also consider the line $Z=0$, then this is also of dimension $1$. But then the co-dimension of each variety is $2$, and $2+2=4>3$, implying that these varieties do not intersect (I'm not sure about this part - I know that when the co-dimensions add to less than or equal to $n$ that we have a non-empty intersection... is the converse true?). On the other hand, I know using common sense that these varieties intersect at the point $[1:1:0]$.
If someone could help me understand this example, I would really appreciate it. Please bear with me if I've made silly mistakes... I was only just introduced to these concepts. Thank you!