$\begingroup$

No, mathematics is not a universal language. It is, however, the study of universal truths.

As long as both parties have studied the same truths, differences in language can quickly be figured out by both sides. For instance if we met a race of aliens that use the octal number system we could very quickly figure it out and share discoveries with each other.

But mathematics is infinitely big; we've only explored some universal truths. How do we know aliens would be attracted to the same areas of mathematics? Well, we use mathematics for reasoning about the world around us, so beings from other planets will almost certainly have discovered a lot of what we have, by studying objects, movement, heat, and time. But beings that inhabit quite different environments may have studied mathematics quite different to ours. For instance, energy-beings that exist outside time (or in 2-dimensional time?) or intelligent microbes that can teleport using quantum tunnelling. It is hard to imagine technologically advanced beings that don't know how to count, but beings that exist outside of space and time, where it doesn't make sense to ask "how many things are within <blah>", may have had no reason to study counting!

As to whether we could communicate about practical matters ("we come in peace"), the language(s) of mathematics are not designed for this sort of thing. However, the language of mathematical logic would be a good starting point: thing A has property B; provided C and D are true then E is true; for every F there must be at least one G. We could ensure that the aliens have the same understanding of these terms to us by applying them to mathematical examples. Then we could apply the same terms to real-world entities, and the properties they may have (e.g. "We" have the property "wanting-spaceships").

If the aliens are reasonably similar to us (social species with physical form) then it will probably be easier to just learn each other's language through immersion, like we do when we meet an unfamiliar human culture. But if the aliens do not really have a language and thus are poorly adapted to learning languages (e.g. they communicate using hive mind or telepathy, or we meet one individual from an asocial species) then mathematics could be a good way to establish a frame of reference. If they are not good at language but they are good at reasoning about the world around them, they will realise how our mathematical terms correspond to elements of their reasoning system. Adding in a few important concepts ("I", "you", "good", "bad", "hour", ...) allows some basic practical statements to be made about the real world. This is essentially the approach taken by Lincos, however Lincos is designed for broadcasting messages that may take millennia to reach their destination. If we actually met aliens it would be much easier to "explain by showing", even if their senses are considerably different to ours.

Do we have any guarantee it will work? No, but if it does work, it will be clear, because they will be able to respond to us with valid mathematical statements. Their understanding of our terms will either be correct and very precise, or obviously incorrect. And once they grasp the basics, expanding with more concepts will become much easier. So it is definitely a worthwhile approach to try.

tl;dr