Baby Rudin, Principles of Mathematical Analysis, was that book for me. It was that book for a lot of people, which I guess means it felt "perfect" for people with a broad range of backgrounds.
I never found a book like that for algebra. Algebra felt opaque, simultaneously hard and boring, and linear algebra felt dry and mechanical, more like a vocational skill than like mathematics. If I had encountered Axler's Linear Algebra Done Right in undergrad, I might have been more interested in algebra.
By the time I encountered "computer science" in my mid-twenties, I don't think the quality of textbook mattered as much to me, but I wish I could remember the name of the formal languages and automata textbook I used to have. It was short and probably not very advanced, but the concepts are still vivid in my head. I see state machines everywhere, and things feel easy to me when I can tackle them as state machines.
I feel like Linear Algebra Done Right is a great book, but it is a better second book about Linear Algebra, rather than a good first book.
Actually, I think the whole subject deserves a fairly mechanical treatment first, and only then an explanation of the underlying math. I think it would make sense to introduce Matrix multiplication and related concepts to students in high school, so they become completely mechanical - much like we teach students how to differentiate functions as a purely mechanical process.
A pretty good book for abstract algebra is Pinter's "A Book of Abstract Algebra". It's rigorous but not overly terse and provides enough examples and applications as it goes to motivate the student. Chapters are fairly short and end with a large number of exercises, organized by topic, to give you plenty of opportunity to practice the material.
It's available in a Dover edition for under $16 so it is easy on the budget too [1].
I never found a book like that for algebra. Algebra felt opaque, simultaneously hard and boring, and linear algebra felt dry and mechanical, more like a vocational skill than like mathematics. If I had encountered Axler's Linear Algebra Done Right in undergrad, I might have been more interested in algebra.
By the time I encountered "computer science" in my mid-twenties, I don't think the quality of textbook mattered as much to me, but I wish I could remember the name of the formal languages and automata textbook I used to have. It was short and probably not very advanced, but the concepts are still vivid in my head. I see state machines everywhere, and things feel easy to me when I can tackle them as state machines.