Need help determining the order of books for mathematics self study (names in description). I have recently started getting back into mathematics as a consequence of trying to get a better grasp on machine learning. I started studying from a machine learning book but found the language extremely convoluted and abstruse. Fortunately, the book referenced Gilbert Strang's book on linear algebra.
Now, I wish to get back into mathematics, gain a better understanding and possibly a degree somewhere down the line. So, I am trying to relearn linear algebra and calculus (for now). I was trying to find some books for study and a lot of people recommended Micheal Spivak's Calculus which I managed to get a copy.
Now, here's my dilemma. From what I can recollect about studying calculus in school is that there were a lot of topics (general equations for circles, parabolas, hyperbola; limits and continuity, trigonometry, arithmetic geometric harmonic progression, complex numbers etc),  that were taught before starting calculus. Spivak's book does have limits and continuity (about 50 pages) as a topic but I was skeptical about how much it could actually cover so I found Introduction to Real Analysis as a sort of precursor book to read before reading Spivk's Calculus.
The first 6 chapters and chapter 9 (infinite series) of this book are familiar to me based on previous coursework.
Now my main question is should I first study limits and functions from this book before moving onto Spivak's calculus or will Spivak's calculus suffice?
I am trying to rebuild a string foundation so I am looking for books with in-depth explanations (I like how Prof. Strang's book discusses concepts with the reader)
I would also appreciate advice regarding purchase of a single pre-calculus book that covers all topics or different pre-calculus books for each separate topic. I think rigorously practicing each topic would be best.
Thank you.
 A: Compared to most standard undergraduate calculus textbooks, Calculus by Spivak is unusually rigorous and has many challenging problems. (It's also fun!)
However, the prerequisites for Spivak are no different than the prerequisites for those standard books.
You'll want some exposure to typical high school pre-calculus topics such as basic algebra techniques for solving equations, functions and their graphs (including lines, parabolas, and other polynomials) exponent arithmetic, triangle geometry, the pythagorean theorem, the quadratic formula, trigonometric functions and the unit circle, and so forth.
It sounds like you've been through that stuff before, so you should be fine. As you mention, pick up a pre-calc textbook so you can look things up when you need a refresher (though, you might be fine with just an internet connection). You don't need to remember all that stuff perfectly to get started. Just brush up when you run into something you don't remember.
Certainly, Spivak will be easier if you've already been through a more standard calculus class before, but that's not necessary.
One of the goals of the book is to rebuild what you know about real numbers and functions "from the ground up", meaning, familiarity with the above concepts is important, but Spivak aims to replace any shakier hand wavy pre-calc notions with much firmer, honest, foundations.
I suspect that reading the Real Analysis book you mention in preparation for Spivak is not only unnecessary, but backwards. Typically one would tackle Analysis after Spivak, not before. Spivak is often described as a stealth introduction to Analysis.
A few other Spivak tips based on my own experience (I'm a bit over halfway through)

*

*Get a copy of the Answer Book.

*Try to do all of the problems. They are the meat of the book, and contain many important results.

*There are errors. Some are simple typos. Others are more substantial. MSE can be helpful when you're not sure if there's an error or not.

*Try not to be discouraged when you get stuck on some problem or proof. Totally normal. If totally stumped, it's fine to look up the answer or search for a hint. In those cases, maybe make a note to return to the stumper at some later date to try it again and see if you can do it on your own.

A: Although Spivak's calculus is a great rigorous introduction to calculus, it is important to note that it is still a calculus book. Analysis, or advanced calculus, is a theoretical, proof-based course in calculus. In order to gain the best possible understanding of the subject, I recommend studying calculus before analysis.
As for learning precalculus, Khan Academy is a great supplement!
I also recommend looking into http://www.mecmath.net/trig/Trigonometry.pdf
for a comprehensive guide to trigonometry and this book (https://sites.math.washington.edu/~m120/TheBook/precalTB2019.pdf)for precalculus. There are thousands of worksheets online that you can use to practice the material you learn in these resources.
