There is no royal road to math.

There are instead, roughly, between 4 and 50 branches of mathematics which each start and "end" in different places with different goals and philosophies and styles.

What makes this all "math" is that almost inexplicably these branches tread the same ground over and over. Which is to say: learning one branch can dramatically improve your ability to understand another branch. Learning several builds your "mathematical intuition" all together.

In order to learn more math you will most likely want to choose one of these branches and study it intensely. You will not want to start from first principles to begin. Nobody does, it's too complex. Instead, you should seek to understand some set of "introductory core ideas" from that branch.

In order to study any branch you will need to learn the language of mathematics: logic, theorems and proofs. Essentially, this is a language you can think in and speak. Without it, you will be incapable of carefully expressing the kind of sophisticated ideas math is founded upon.

Fortunately, programming is an application in logic. If you can program a computer you're between 1/3rd and 2/3rds of the way to understanding mathematical logic well-enough to begin to understand mathematical argument. That said, you will not yet know enough. There are books which teach this language directly (Velleman's How to Prove It, perhaps) and there is an entire field of study of this language. Usually, however, you just learn by doing. Certain branches are more amenable to this learning of the logical language than others.

One thing to note about the logical language that would be told to you by any teacher but is only mentioned in a few books is that it is not much like English in that you can just listen to or read something in the logical language and have it immediately form a cogent picture in your mind. Mathematical language is a language of action---you MUST complete proofs, often on your own, in order to have grasped what was being said. This doesn't mean there isn't value in skimming a math book and reading the results without doing the proofs. Indeed, that's often a great first pass through a book! But think of doing that like reading the Cliff's Notes for a great work of literature. You might be able to talk about it a little bit, but you certainly haven't understood the material.

One final note with respect to learning any branch—where you start is critical. Often, even the simplest reviews of the material of one branch of mathematics will assume "basic, working knowledge" of many other branches. This is done in order to accelerate learning for those who possess that working knowledge—it takes advantage of the frequent crossover properties from one branch of mathematics to another. Finding resources which do this minimally will be important to begin... but you will probably not succeed entirely. Sometimes, you just have to read a math book and walk away from it without being too much the wiser, but recognizing that there was some technique from another field you could learn to unlock a deeper understanding.

---

Some major fields of mathematics are:

1. Algebra. This is like and unlike what you may call algebra today. It is the study of how things are built and decomposed. Indeed, it notes that many "things" can be described entirely in terms of how they are built and decomposed. It is often a good place to begin for programmers as it espouses a way of thinking about the world not dissimilar to the way we model domains in while programming. Some books include Algebra: Chapter 0 by Aluffi and Algebra by MacLane.

2. Combinatorics. This is the study of "counting", but counting far more complex than anything meant by that word in normal usage. It is often a first field of study for teaching people how to read and speak proofs and theorems and therefore is well recommended. It is also where the subfield of graph theory (mostly) lies which makes it more readily accessible to programmers with an algorithms background. I can recommend West's Introduction to Graph Theory, but only with the caveat that it is incredibly dry and boring---you will get out of it what you put into practicing the proofs and nothing more.

3. Topology. This is the study of what it means for one thing to be "near" another. Similarly, it is the study of what it means to be "smooth". It's a somewhat more abstract topic than the others, but in modern mathematics it holds a privileged role as its theorems tend to have surprising and powerful consequences elsewhere in mathematics. I don't know any good introductory material here---perhaps Munkres' Topology.

4. Calculus and Analysis. This is the study of "smooth things". It is often the culminating point of American high school mathematics curricula because it has strong relationship with basic physics. Due to this interplay, it's a remarkably well-studied field with applications throughout applied mathematics, physics, and engineering. It is also the first "analyst's" field I've mentioned so far. Essentially, there are two broad styles of reasoning in mathematics, the "algebraicist's" and the "analyst's". Some people find that they love one much more than the other. The best intro book I know is Spivak's Calculus.

5. Set Theory. This is, on its surface, the study of "sets" which are, often, the most basic mathematical structure from which all others arise. You should study it eventually at this level to improve your mathematical fluency---it's a bit like learning colloquial English as compared to just formal English. More deeply, it is a historical account of the philosophical effort to figure out what the absolute basis of mathematics is---a study of foundations. To understand Set theory at this level is far more challenging, but instrumental for understanding some pieces of Logic. This can therefore be a very useful branch of study for the computer scientist investigating mathematics. I don't know a good introductory book, unfortunately.

6. Number Theory. This is, unlike the others above excepting "surface" Set theory, a branch which arises from studying the properties of a single, extremely interesting mathematical object: the integers. Probably the most obvious feature of this field is the idea that numbers can be decomposed into "atomic" pieces called prime numbers. That idea is studied generally in algebra, but the properties of prime numbers escape many of the general techniques. I don't know a good introductory book, unfortunately.

7. Measure Theory and Probability Theory. Measure theory is the study of the "substance" of things. It generalizes notions like length, weight, and volume letting you build and compare them in any circumstance. Furthermore, if you bound your measure, e.g. declare that "all things in the universe, together, weigh exactly 1 unit", then you get probability theory---the basis of statistics and a form of logical reasoning in its own right. I don't know a good introductory book, unfortunately.

8. Linear Algebra. A much more "applied" field than some of the others, but one that's surprisingly deep. It studies the idea of "simple" relationships between "spaces". These are tackled in general in (general) algebra, but linear algebra has vast application in the real world. It's also the most direct place to study matrices which are vastly important algebraic tools. I don't know a good introductory book, unfortunately.

9. Logic. A much more philosophical field at one end and an intensely algebraic field at the other. Logic establishes notions of "reasoning" and "judgement" and attempts to state which are "valid" for use as a mathematical language. Type Theory is closely related and is vital for the development of modern programming languages, so that might be an interesting connection. I don't know a good introductory book, unfortunately.

---

Hopefully, some of the ideas above are interesting on their surface. Truly understanding whether one is interesting or not is necessarily an exercise in getting your feet a little wet, though: you will have to dive in just a bit. You should also try to understand your goals of learning mathematics---do you seek beauty, power, or application? Different branches will be appealing based on your goals.

Anticipate studying mathematics forever. All of humankind together appears to be on the path of studying it forever---you personally will never see its end. What this means is that you must either decide to make it a hobby, a profession, or to consciously leave some (many) doors unopened. Mathematics is a universal roach motel for the curious.

But all that said, mathematics is the most beautiful human discovery. It probably always will be. It permeates our world such that the skills learned studying mathematics will eke out and provide value in any logical concern you undertake.

Good luck.