Is infinity a real or complex quantity? Since I was interested in maths, I have a question.  Is infinity a real or complex quantity?  Or it isn't real or complex?
 A: There are many different things that could be called "the infinite" in mathematics.  None of them is a real number or a complex number, but some are used in discussing functions or real or complex numbers.


*

*There are things called $+\infty$ and $-\infty$.  Those appear in such expressions as
$$
\lim_{x\to-\infty}\frac{1}{1+2^x} = 1 \text{ and }\lim_{x\to+\infty}\frac{1}{1+2^x}=0.
$$

*There is also an $\infty$ that is approached as $x$ goes in either direction along the line.  That occurs in
$$
\lim_{x\to\infty} \frac{x}{1-x} = -1\text{ and }\lim_{x\to1} \frac{x}{1-x}=\infty.
$$
The second limit above could be said to approach $+\infty$ as $x$ approaches $1$ from one direction and $-\infty$ if from the other direction, but if one has just one $\infty$ at both ends of the line, then one makes the rational function a continuous function at the point where it has a vertical asymptote.  This may be regarded as the same $\infty$ that appears in the theory of complex variables.

*There are "points at infinity" in projective geometry.  This is similar to the "infinity" in the bullet point immediately preceding this one.  Two parallel lines meet at infinity, and it's the same point at infinity regardless of which of the two directions you take along the lines.  But two non-parallel lines pass through different points at infinity rather than the same point at infinity.  Thus any two lines in the projective plane intersect exactly once.

*There are cardinalities of infinite sets such as $\{1,2,3,\ldots\}$ (which is countably infinite) or $\mathbb R$ (which is uncountably infinite).  When it is said that Euclid proved there are infinitely many prime numbers, this sort of "infinity" is referred to.

*One regards an integral $\int_a^b f(x)\,dx$ as a sum of infinitely many infinitely small quantities, and a derivative $dy/dx$ as a quotient of two infinitely small quantities.  This is a different idea from all of the above.

*Consider the step function $x\mapsto\begin{cases} 0 & \text{if }x<0, \\  1 & \text{if }x\ge 0. \end{cases}$  One can say that its rate of change is infinite at $x=0$.  This "infinity" admits multiplication by real numbers, so that for example, the rate of change at $0$ of the function that is $3.2$ times this function, is just $3.2$ times the "infinity" that is the rate of change of the original step function at $0$.  This is made precise is the very useful theory of Dirac's delta function.

*There is the "infinite" of Robinson's nonstandard analysis.  In that theory, we learn that if $n$ is an infinite positive integer, then evern "internal" one-to-one function that maps $\{1,2,3,\ldots,n-3\}$ into $\{1,2,3,\ldots,n\}$ omits exactly three elements of the latter set from its image.  Nothing like that holds for cardinalities of infinite sets discussed above.

*I'm sure there are other examples that I'm missing here.
A: The question is a bit meaningless. "The infinite" is a philosophical concept. There are a wide variety of very different mathematical objects that are used to represent "the infinite", and now that we're in the realm of mathematics and not philosophy, I can make the concrete mathematical claim that no, those objects are neither real numbers nor complex numbers.
For a rundown on what different mathematical objects can represent infinity, I think the linked questions in Asaf's comment under your question are a fine place to start.
