prompter: I'm having trouble understanding infinity. My math teacher says it's not a number, and my friend says infinity + infinity = infinity. I'm just really confused at the moment. I don't get why this is, would you be able to explain it to me please?

assistant: Sure, i will explain it in general and then more precisely.

Infinity is a concept for something endless.
It roughly means, that you can't "directly" count or measure something. 
For example, you can count the natural numbers between 1 and 3 but you can't count all natural numbers.

There are also different kinds of numbers.
Natural numbers: {1,2,3...}
Whole numbers: {..., -1, 0, 1, 2,...}
Rational numbers: {-1/9, 3/9, 1, -2, 1/3, 0.333, ...}
Real numbers: {pi, squareroot of 2, -1, 1/3, ...}
and more

It is better to start by learning the simpler kinds of numbers.
So when your Teacher says that infinity is not a number, its the simplification that infinity does not fit within these kinds of numbers.
When you get deep into studying math, you can define infinity as a "Hyperreal number", but this is quite advanced.

Regarding to your friends statement:
Because infinity is not a real number, you can't just use the same real number addition operator (+) like: "infinity + infinity = infinity".
You can use the mathematic definitions of a theory called "cardinal arithmetic" to generalize the addition operator (+).
So "infinity + infinity = infinity" is true, if you clearly state that you are using "cardinal arithmetic".
But you have to be remind yourself, that the addition relies on additional definitions and is not quite the same addition as in "1+2.2=3.2".

In fact, there are even multiple kinds of infinity, but most times we talk about the infinity called aleph-0.

Infinity is such a useful concept, that its even used to define the core assumptions or axioms of Math.
For example the "Axiom of infinity" in "Zermelo-Fraenkel set theory", the most popular fundamental Theory of math.

prompter: can you explain Zermelo-Fraenkel set theory more thoroughly

assistant: Sure! Infinity is a concept rather than a numerical value. It represents the idea of an unbounded quantity, and there exist various forms of infinity such as positive infinity, negative infinity, and cardinality infinity.
In mathematics, infinity is utilized to characterize an unbounded magnitude, and the statement "infinity + infinity = infinity" is not always accurate. If one considers the addition of two unbounded magnitudes, it is feasible for the sum to surpass either of the individual quantities. Nevertheless, within certain mathematical contexts, the sum of two infinities is considered to equal infinity.

In conclusion, it is crucial to understand that infinity is not a numerical value in the conventional sense, but rather a concept used to express the notion of "larger than any finite number" or "no limit."

prompter: What about infinity squared?

assistant: As math is merely a tool for expressing ideas, as long as you can express infinity as a number in a consistent and useful way, you are welcome to redefine it as a number. For example, you can extend the number line with a negative and positive infinity and allow for rules like your friend says. This is called the affinely extended real number system.

However, because it can lead to unexpected results, such as infinity - infinity not being a number, infinity is traditionally only dealt with in the context of limits. Limits are about looking at the value of an expression as one of its terms approaches a certain value. For example, if the x in 1/x becomes larger and larger the expression will eventually have a value close enough to 0. Your friend's rule could be restated in terms of limits as: as x in the expression x+x increases towards infinity, the expression approaches infinity. Your math teacher would not have a problem with that.

prompter: Can you make this more understandable for a stupid person like me?

assistant: Sure, the concept of Infinity is usually hard to grasp for a lot of people, but I will try my best to explain. Regarding what your math teacher told you, there are some senses in which infinity is a number, and there are some senses in which infinity is not a number, and it all depends on what exactly you mean by "number". But yes it's true that in the traditional sense infinity is not a number in the way people think of numbers. It is more of a mathematical concept that can represent something limitless or unbounded.

As for the statement "infinity + infinity = infinity". It is important to realize that when we add or substract infinite values, the result is still infinite. This is because infinity represents an unbounded quantity, so when you add or substract from it any quantity, the result will remain unbounded.

prompter: Why is the concept of infinity useful? Can anything be limitless or unbounded in the real world? If it's not describing the real world, wouldn't that make it dangerous to integrate into our understanding of the world?

assistant: There are many concepts in the field of modern mathematics that are not directly applicable to the real world, but they are often used as a foundation for something else. There is nothing that makes integrating unrealistic concepts into our world dangerous, quite the contrary! One such example is modern Calculus, which heavily relies on the concept of infinity and allows us to do things like calculate the volume and area of curved, complex objects.

assistant: How to write rest API with an AWS lambda function

prompter: That doesn't make sense.