I am currently studying Algebraic Geometry (by Hartshorne), for the first time, and had attended/am attending to some lectures related to it. (Commutative Algebra, Complex manifolds, ...) As I learn more and more about algebraic geometry, It seems to me that the notion of divisors and their usage is a fundamental tool. However, it seems to me a bit confusing because of its diverse usage in different contexts. So, I felt it would be helpful to get some intuition for further progress.
Why do we only consider codim 1 subvarieties, not furthermore? Is it because it's enough? Or rather is it the case that the theory fits in only for codim1 case, but not furthermore? (In cotext of Weil divisors)
My idea is that weil divisor is a classical object, which later developed to cartier divisors in algebraic sense (Which matches when the underlying scheme is "good enough", so in general we use cartier divisors). And the relation between cartier divisor and invertible sheaf is fundamental. Is this viewpoint correct? Or Am I misunderstanding the concepts?
I understand the fact that Linear system gives rational function to projective space which cannot be defined on common base. However, this fact confuses me, because it feels to me the notion of divisor is "Intrinsic" object which relate codim1 subvarieties, But the rational map (or morphism, embedding) defined by the divisor seems to be an "extrinsic" setting. Can I get some intuition as to why these two objects are related?
My current state of knowledge is in Beginner step in AG. But It feels to me that any intuition will be helpful, regardless of its difficulty.
Thank you very much :)