Maths is first invented by people of India. They used numbers to count how much of things they have. Soon, there have been problems like 'if you have 3 buckets of oil and people give you 2 buckets of oil how much buckets of oil will you have' Then addition and subtraction is created to calculate. Then, people thought of a good way to calculate problems with addition faster, then there exists multiplication, that's the way you learn maths right like you learn addition, then subtraction, then multiplication ......
Long ago in Greek(Greek? I am not sure) a student of the Great Pythagoras(which is Hippasus)(XDDDDD) found a number that cannot be represented by a simple fraction but at that time people always believed every number can be represented by a fraction which is said by Pythagoras. Soon Pythagoras killed Hippasus because he discovered the number that cannot be represented by a fraction. But the number that was found by Hippasus was quickly known by all people. That's how irrational number existed. Soon, Greek mathematician and engineer wondered what sqrt(-1) is. He can't find any solutions for the equation x = sqrt(-1). So as the number is imaginary, the mathematician set that sqrt(-1) = i. That's how imaginary numbers existed.
Long long time later in Europe, Issac Newton wondered how could he solve a physics question so that he invented calculus.