Lets say you are given a bunch of pairs like (3, 9), (4, 16), (5, 25)
The relation between them is that n^2 = m This one is pretty easy but is there a branch of math that talks about this subject with algorithms to find the simplest relations and theory about the complexity of these relations how much examples you would need to guarantee you found the right one.
I don't know anything except basic algebra and calculus but I am interested in this subject so if you can point me in the right direction I would be eternal grateful.
This is an extremely important fundamental problem, which appears over and over in many contexts. What is the "right" relation depends a lot on the context and on what you are trying to do with the result, so there are many answers to the question.
Some of these include:
Curve fitting or “interpolation” is about assuming that the correct relation is one of a certain family and finding the member of the family that fits the best, although it might not hit all the points exactly:
Kolmogorov complexity is about analyzing the complexity of the simplest possible algorithm that can produce the given outputs (9, 6, and 25 in your example) from the inputs (3,4, and 5).
I expect this list could be extended to at least ten more items.