Within a segment of numbers I understand how there are more rational numbers than integers, but I don't understand it in the context of infinity. How can there be more rational numbers than integers when in both cases there are infinite amounts? Are there mathematical operations or concepts that depend on this (in the context of infinity, not subsets)?
There are different kinds of infinity. The integers are countable, the real numbers aren't. You can prove that if you try to map each integer to some rational number, there will be some rational numbers that are not on that list --- there are more of them. See https://en.wikipedia.org/wiki/Cantor%27s_diagonal_argument.
> You can prove that if you try to map each integer to some rational number, there will be some rational numbers that are not on that list --- there are more of them.
Did you mean reals here? There _is_ a (bijection) mapping between integers and rationals.
in mathematics, we lose concept of how many and fall back to cardinality, which has a lose correlation with how many. So asking "are there the same number" of integers as rational numbers gets a little iffy until we make some definitions. We just say that we can create a bijection from integers to rationals. They each index the other, and for each thing in one, there is one and only one thing in the other. Does this mean there are the same "many"? Well loosely, and in the context of cardinality, yes. But things get weird because there are the same "many" of the whole as a subset (ie, there are as "many" even numbers as integers, as "many" positive numbers as positive and negative integers, etc).
But most people would disagree with you when you say "how can there be more rational numbers than integers..." because while we don't have a firm grasp of how many, we definitely would say that having the same cardinality means that there isn't some notion of "more".
I'm not sure what you mean by mathematical operations or concepts that depend on this.