The “the reader should know if they are correct” logic doesn’t apply here. A beginner could easily have faulty logic and fool themselves into thinking their solutions are correct.
I usually don’t buy math books without solutions if I’m self-studying. Would like to know if solutions are provided in this book. If not, I won’t consider buying it.
If this book doesn’t make the cut with a solution manual, does anyone have recommendations on an intro to proofs book with one?
"No solutions, sadly, but maybe that would be a good idea for a GitHub repo associated with the book…"
Also, if you can't prove a solution correct, then you haven't solved it!
This is the type of thinking I’m talking about. A beginner can think they “proved a solution correct” but have a subtle or even blantant error that isn’t obvious to them.
Also, if reader wants to just skip to the solutions then that’s their fault. But don’t let such people rob the student that put serious effort into their work from seeing the solution.
For example, at work nobody will care if you have rote memorized a solution or not since they will have already done the math, you will just apply formulas others have came up with. In order to do anything important with the math (not just solving school problems) you need to have intuition for it.
Edit: To your reply below, I’m talking about someone that is self-studying and has no access to a teacher. The suggestion the beginner (without a teacher) should “know” whether or not their solutions are correct is something I disagree with.
I do agree with there are multiple ways to prove something and such a beginner may think their proof is incorrect based on a provided solution, when it may be correct, just different. This is why an instructor is valuable.
Yes, which is why you want a teacher until you reach that stage.
> The point is not to study rote solutions, but to check correctness.
Looking at others solutions can in no way prove that your solution is incorrect so I am not sure how those would help you. However having access to others solutions often makes students doubt their own solutions if they don't look very similar, this hampers their growth since they learn to distrust intuitions which are actually correct.
Not everyone has that luxury.
To me the most annoying thing about math books is hand-waving, lack of rigor, and unexplained notation.
At least in programming, everything is formal and I can figure out the entire problem by looking at the source.
On the other hand, many programming stuff is ruefully hand-waving and lacks rigor. They might present important algorithms in pseudocode; even when they present in real code, the precise semantics of the real code is often underspecified and vaguely described in English. I mean take a language; how often do you see in the language specification the semantics of the language defined rigorously, using operational or denotational semantics? PL nitpicking aside, how many programmers think a piece of code must be correct because they pass a few test cases, without ever giving a proof?
I'm of course not saying the lack of rigor in programming is bad. Perhaps 95% of the software we are building isn't mission-critical and relying on intuitions is fine; we ain't got no time to prove every piece of code we write. But my point is your observation really does not match mine.
I have a few thoughts about this. The first is that it is largely up to the learner. Sure, you can just symbolically manipulate things with no real understanding, but no one says you have to stop there (and arguably that's what you should be working on when you read the proof).
The second is that a lot of times the intuition comes later. There was a joke in my school (and I presume others) that you learn algebra in calculus, calculus in DEs, etc. It takes a while to develop that intuition and sometimes just doing it frequently is part of what it takes. I think of it like learning music theory but not really getting it until you've gotten proficient at an instrument.
The third is that some math is just like that. There might be someone somewhere who has some type of intuitive understanding of it, but they are an outlier.
That said, the best learning I've done in mathematics is to take a book without answers in the back and work through it with other people. It's difficult, but very rewarding to really grok the topic and be confident in your answer; and having people you have to explain your solution to helps tremendously.
Not really. It's quite unusual to see a serious formal approach.
I'm working through a book that uses C++. Every few pages I find undefined behaviour (struct punning, illegal use of memset to zero-out objects, etc) and needless usage of non-standard compiler-specific language features.
This is the well it works on my machine mindset used widely in programming, even in books written by highly qualified people.
> Those proofs are typically far from understandable or rigorous.
I'm not sure what kind of thing you're thinking of here. Can you give an example?
At least in the light of the Curry–Howard correspondence. :)
Anyways, I do agree that in programming it’s easier to see what are introductions, assumptions, definitions, functions, values etc. You can’t just invent a notation and go with it. Everything needs to be defined from the ground up. It’s constructive and I like that, probably because I’m a programmer.
Just to follow up. A comment on the book `Discrete Mathematics and Its Applications by Kenneth H. Rosen`
`I'm convinced that math gurus are incapable of teaching math.
Whenever I encounter math textbooks like this one, I'm reminded of Underpants Gnomes on South Park. For the unwashed: Underpants Gnomes stole underwear from the residents of South Park hoping that they'd profit from the thefts, but although their business plan included a Phase 1 ("Steal underwear") and a Phase 3 ("Make a profit"), Phase 2—the connective tissue—was just "?".
Rosen and others like him fail to grasp how much "?" connective tissue they're leaving out when they "teach" math. He'll describe a math concept using almost-but-not-quite human language, then—oh, there's always a "then" with these books—the math gymnastics begin. Math teachers can't resist the gymnastics, can they? No, they really can't. At some point they lose their ability to see how much they assume other people know, and when that happens they cease being effective at teaching. This describes almost every math teacher I've had, and it definitely describes almost every math textbook that I've read. Rosen's book isn't the worst math textbook that I've read, but it's still pretty awful.
Seriously, corner cases and extreme mind-bending problems don't help people learn math; giving students time to grasp concepts before baffling them with bullshit does. This is why math schools like Khan Academy are amazing and college/university level math courses are not. This stuff can be taught, but not like this.`
I strongly agree with this argument. I had this book in my undergrad and I felt barely learning anything and just kept getting drowned in the way the content was written. I switched to a different text in a few weeks and it became an easy subject. The difference was more intuitive examples and gradual difficulty in exercises and less of the proof is left for the reader as an exercise.
I think these are not contradictory notions! Bad maths books lack rigour. Many books are like you say: rigorous but difficult to make sense of. But truly great books both explain the concepts in the simplest, most lucid and succinct way possible AND maintain the rigour necessary to do mathematics.
I like this quote from Michael Spivak: "In addition to developing the students’ intuition [...], it is surely equally important to persuade them that precision and rigor are neither deterrents to intuition, nor ends in themselves, but the natural medium in which to formulate and think about mathematical questions."
I couldn't agree more. Rigour is not a "masturbatory" end in itself to feel very smart, but it is not also an obstacle to understanding.
A sample quote:
> This was not the casual read I had in mind. The notation was alien. I even had to scour the examiner’s report to direct me to the key results. And while I could have sworn this was a well-written thesis, I repeatedly found myself bamboozled by my own prompts. “The result now follows easily…” may have made sense back when, but now the author-turned-confused reader can profess that it most certainly does not follow easily, at least in his own mind.
I think Strang does a good job balancing intuition and rigor, without too much mindless grinding. Other books I’ve used either leap right into “Let F be a field....” or have you learn a bunch of matrix manipulations but don’t really explain why these are interesting or useful.
Similarly, in programming, “Teach Yourself PHP in 24 Hours” is wildly different from “the Art of Computer Programming” (a series of books that you may like reading)
Don't know how the first part would work with Math.
How do you actually read math, physics and programming books?
Reading them the same way as you'd read a novel doesn't seem right.
I try to go chapter after chapter and make notes but I often get bored because I don't see the usage in my real life coding. Maybe I'm not working on problems that are challenging enough?
Also after few chapters it often turns into a "job" of finishing the book. I don't have the pleasure of learning new stuff anymore.
Do you really finish such books? What am I doing wrong?
"To understand any subject, above all, a mathematician SHOULD NOT pick up a book and read it.
It is the worst error!
No, a mathematician needs to look in a book,
and to read it backwards. Then, he sees the statement of a theorem. And, well, he goes for a walk. And, above all, he does not look at the book.
He says, "How the hell could I prove this?"
He goes for his walk, he takes two hours ... He comes back and he has thought about how he would have proved it. He looks at the book. The proof is 10 pages long. 99% of the proof, pff, doesn't matter.
Tak!, here's the idea!
But this idea, on paper, it looks the same as everything else that is written. But there is a place,
where this little thing is written, that will immediately translate
in his brain through a complete change of mental image
that will make the proof.
So, this is how we operate.
Well, at least some of us.
Math is not learned in a book,
it cannot be read from a book.
There is something active about it,
It's a personal, individual work."
Personally, I tend to skim; I find most texts to be far too verbose. But then if I find a part that I'm interested in or want to explore at length, then I'd read it more in-depth.
I think classical books suffer from a lack of features like hyperlinks. This is, authors either have to say something or not say it; they can't just say something concisely with links for readers who want to read more (Note below). As a result, textbooks tend to be cluttered.
Skimming helps you to cut through the clutter to get what you need. But since you'll almost certainly miss points while skimming, it'll tend to involve bouncing back-and-forth rather than a straight read-through.
Note: Of course, footnotes like this, along with appendices and references, are partial substitutes for active content. They're far more limited (Meta-note below) and have a much higher overhead on both reader and writer, but they're still often better than cramming everything into the body of a text.
Meta-note: Because, seriously, who wants to trace recursively nested footnotes? For more discussion on this topic, please see "_References: Why they're inconvenient_", p.156.
part of writing the tutorial is exercises - i like a stripped down flash card system. i try and do random-10 as regularly as possible. at the beginning, there's lots of jargon with scripted answers (ie, what is a blah?) but after a while you can move those to the back and you're left with some multi-step questions - over time (because i'm not trying to memorise the answer pattern) i find that i internalise a kind of narrative that uses the concepts/jargon to grope my way to the answer ie, hmmm looks like an aqueous equilibria question, probably need the equilibrium expression (jot that down) and HCl is a strong acid, so i can ignore those two terms and oh look... there's the answer if I just do this and that. Over time, it's the 'groping for an answer' that sticks as a habit of thought and seems to be quite robust. having said all that, i'm craphouse at maths but i'm hoping to get into one day.
Reading mathematics has a whole series of additional challenges. In my limited experience with reading those: nurturing comfort in incomprehension is important; it's often better to skip a part than get stuck on it; look for multiple accounts of the same concept.
249.2 "Until approximately the end of the nineteenth century, the major scientific books were written for a lay audience. Their authors--men like Galileo, and Newton, and Darwin--were not averse to being read by specialists in their fields; indeed, they wanted to reach such readers. But there was as yet no institutionalized specialization in those days, days which Albert Einstein called 'the happy childhood of science'. Intelligent and well-read persons were expected to read scientific books as well as history and philosophy; there were no hard and fast distinctions, no boundaries that could not be crossed. There was also none of the disregard for the general or lay reader that is manifest in contemporary scientific writing. Most modern scientists do not care what lay readers think, and so they do not even try to reach them.
Today, science tends to be written by experts for experts. A serious communication on a scientific subject assumes so much specialized knowledge on the part of the reader that it usually cannot be read at all by anyone not learned in the field. There are obvious advantages to this approach, not least that it serves to advance science more quickly. Experts talking to each other about their expertise can arrive very quickly at the frontiers of it--they can see the problems at once and begin to try to solve them. But the cost is equally obvious. You--the ordinary intelligent reader whom we are addressing in this book--are left quite out of the picture."
The authors apologize for not being able to offer specific advise to guide the reader of technical books, as those texts are on subjects of which they do not possess the necessary expertise. They suggest the reader fall back on 'scientific popularizations'.
I've found this to be a very useful strategy. Beginning with a readable book, well researched book. Then systematically read the book's bibliography, recursively.
The one problem I ran into, specifically in mathematics, was it seems some notations are not universal. Furthermore, some authors take no pains to define their symbols at any point in their texts. (I quite understand a paper would assume a specific audience, but for a published book I think it's just rude.)
For this I needed to rely on communities such as math.stackexchange.com.
Good luck. The journey is part of the reward.
"Books are random access -- a great innovation over scrolls. "
Reading them the same way as you'd read a novel doesn't seem right.
Your intuition is correct. When people read a novel, they often "forget" that they're reading words and picture the action. The optimal reading speed for that is 200 to 250 WPM. You can't read mathematical papers, where everything has precise definitions, at that speed and expect a high rate of comprehension if everything's new to you. It takes a lot of time.
Do you really finish such books?
Yes, if I'm interested in the subject matter. It takes a lot of time, though.
Once I finished my coursework, I tend to have a problem and go searching for material that may get me some traction on it. So a lot of keyword searches, a lot of reading prologues (prologues are where the author tends to give his conceptual overview of what the material in the book is for...I've learned a lot from reading random prologues in a math library).
Once I find something that looks interesting, I'm usually down to a few theorems or definitions that I think will give me traction. Then I start poking around the book or any other source I need/can find to figure out what I need to understand those definitions/theorems.
Usually at some point it becomes clear if they're a) irrelevant, or b) partially relevant. If (a), I drop the entire line right there and go back to searching. If (b), I start running counterexamples from the problem I'm working on against them, looking for where it breaks and seeing what I can salvage.
Prologues usually read like a novel, but occasionally stopping to look up words, so more like reading a novel in a foreign language. Once you're into the meat, your rate of progress is typically measured in hours per paragraph or days per page. But you probably only end up using ten or twenty pages out of a two hundred page book in this method.
If you're getting bored because you're reading something that's not relevant to what you're doing, skim over it instead and make a mental note of what the content covers so you'll know what you have available to you should the topic come up later.
Ask HN: How do you read programming books?
Doing exercises or taking notes is only necessary if you feel the need for it, otherwise try to understand what the thing is and try to find where it is applied. Even though you probably won't ever need it in the future if you do picking it up will be much easier and this way you get the quick endorphins from figuring stuff out without the drudgery of actual work.
just my 2c.
I don't think you are doing anything wrong. Depending on how the book is written, some might be really boring and unchallenging, pick another one! If you are looking for brain-wrecking adventure and some good story telling, pick something that starts with number theory. If you are looking for understanding the bread and butter for most recent big discoveries and theory crafting, pick something that focus on Complex Analaysis, High dimensional calculus or partial differential equations. If you are planning to stick in the field of computer science for good, pick something that focus on abstract algebra _and_ probabilty theory.
> I often get bored because I don't see the usage in my real life coding.
Then you don't need mathmatics. Depending what you do in coding, there is really rare type of work that need mathematics. Sciences and Mathematics are so far from practical use they are there purely for the sake of knowledge. This isn't just you, it's the case for everyone. Unless some day you find the interest to battle that boredom, the probability of you finding some usage from mathematics might be very unlikely.
I think most technical books end up being organised like a reference manual for some reason - not necessarily as dry - but in a way that appears to facilitate some some externally driven learning activity by augmenting it.
> Do you really finish such books? What am I doing wrong?
Not personally, i'm terrible at penetrating any such book until I have a problem at hand that requires it. However I have found a few books that are technical while being enjoyable and engaging at the same time, in much the same way as a novel: "The Feynman Lectures" (Physics), "Michael Abrash's Graphics Programming Black Book", "Thinking Forth" (Programming). These books are well known, I think their popularity is in no small part due to how accessible they are without diminishing the quality of their technical content - I would like to find more books that have this quality.
Here is the Google Translate transcript:
How do you read mathematical texts?
If you are ready to give a seminar lecture in your studies, you have already studied one or two semesters and read one or the other book and know what is important: If you read mathematical texts, there are two modes in which You can proceed: From the bird's eye view: What are the rough lines? What is the subject of the present text? What are the central concepts and definitions, what are the central statements and sentences? What are the rough evidence structures? Why do you do it all? From a frog's perspective: how is it done in detail? How does a proof work? Why do you need the prerequisites in the sentence? What happens if you leave them out? You often have to switch between these modes. First, one has to get an overview of where one is actually going, otherwise one bites oneself in the first technical lemma and gets stuck. At the first reading one can skip all the evidence and focus on the statements of the sentences. At some point, however, comes the point where one no longer understands the sentences, because one has developed no feeling for the introduced concepts. Then it's time to take a closer look at the evidence as well. If you have understood more technical details, you should step back a bit and ask yourself again what the overall context is, etc. In an adapted form, this also applies to the way you approach individual sentences or examples. If you are confronted with a new sentence, you may ask questions of the following kind before, after, or even while studying your proof: What are simple examples of the sentence (such as special cases)? What are simple counterexamples where certain conditions are not met? Does the sentence, or the term used or the proof, refer to already known things? Is there a characteristic example of observing all the essential phenomena? Work in circles in the literature to your presentation (and his position in the seminar).
(You have to swap the word "sentence" with (mathematical) "proposition" or "theorem" at some places for this to make more sense. In german those are the same word ("Satz").)
I learned substantial amounts of algebraic topology by building an open source topological data analysis library, for example.
If there are no exercises, make some up (do the proofs yourself, try to come up with unsolved scenarios and solve them, etc)
For me it helped immensely when I had a fun side project that demanded new knowledge. For example, my chat bot side project was a fun way to learn natural language processing:
* its an "unsolved" problem (for various definitions of "solved"). I didn't expect to "solve" it, but every time I'd try something new there was the excitement that maybe, just maybe, this might be "it" (i.e. an immense improvement)
* the responses it produces can be really funny. If its online, others can have fun with it too.
* you can try lots of strategies and see the immediate effect. Not only do you learn about the math and technique by implementing it, but you get an immediate "feel" about the kind of effects it has.
Trying to over-generalize, it helps to have some "element" that you consider valuable, fun or rewarding to drive the whole process.
I was just as lost with the K & R C book.
Anecdote aside, there's a difference between reading something and understanding something. My friend who is really in tune with the nature of the subject, is also spending an incredible amount of time surrounding it.
Indeed it doesn’t.
As the author of the book in this post points out on his blog  in math you focus on learning the syntax first, just like in programming.
Off the top of my head I can recommend pre-reading a chapter before reading it: go through theorems, bold/italic text, graphs, tables, conclusions, exercises. Also, try proving theorems yourself before reading proofs in a textbook.
My general advice for you is to check out a book “How to Read a Book” by Mortimer J. Adler and Charles Van Doren. It’s a great manual for reading, which contains both general advice (in the form of 15 rules) applied to any reading material, and specific advices for math, philosophy, history, social science, etc.
> I try to go chapter after chapter and make notes
Notes are good, but only if they “active” notes. If you are able to formulate something in your own words it means you’ve done the work towards understanding, if you’re only able to express a thing in author’s words — you have not, and if you leave it at that the chances are you’ve wasted your time.
In math you also have to do problems. Your ability to solve problems w/o the help of the textbook is the ultimate test of whether you’ve learned what you’ve read.
Interleave: in your practice session work simultaneously on problems from different (usually sequential) chapters. IOW: don’t practice one topic during several study sessions until you’ve exhausted all exercises for that topic in a book — go read the next chapter (or chapters), and include its exerices in your next practice.
Interleaving is harder, but more efficient. The reasons being that (1) our brain is bi-modal processing system, it needs time to process things both consciously and unconsciously, it does the latter while your attention is busy with other things; (2) it also needs time to consolidate memories, grow and strengthen new synaptic connections (which it primarily does in sleep) — so spreading a topic/exercises over time is generally a good idea.
> but I often get bored because I don't see the usage in my real life coding
> Also after few chapters it often turns into a "job" of finishing the book. I don't have the pleasure of learning new stuff anymore.
This is about psychology of study.
Don’t turn it into a job, it’s not a competition, there are no bosses, no deadlines. Don’t push too hard, allow yourself time to integrate new knowledge by keeping yourself busy with other things and studying several subjects/books simultaneously — when you are tired of one thing, switch to another. It’s more efficient way of learning (as explained above), despite increase in absolute time for mastering a single subject.
And work on your motivation. You can start by read what Paul Graham has to say on why study math . Remember, math is hard; our brains are not wired for it.
I would say the exact opposite of "our brains are not wired for [math]": mathematics is the simplest expression of our ultimate thought ("brain") processes.
It is only hard because it is so abstract and builds on a large corpus of what has already been constructed, but it was "designed" exactly after how our brains operate.
For a layperson, proving even the basic arithmetic might seem like magic, but once you go through the simple exercise of defining everything in terms of "One" and "Successor(One)" and compare that to how we teach our kids numbers, it's clear mathematics matches exactly how human brains operate.
Then again, I concede that not everybody's brain is "wired the same way," but I am sure there are plenty of us for whom mathematics is just natural: the only problem being the fact that majority of people have not been exposed to true mathematics.
If this topic piques your interest I would also recommend Mathematics for Computer Science: https://courses.csail.mit.edu/6.042/spring17/mcs.pdf
You might want to extend the preview PDF to include a few pages from later chapters. The issue's that the [current preview](https://pimbook.org/pdf/pim_first_pages.pdf) only gets into polynomials over its 45 pages. But since polynomials are typically taught to students during early childhood, it seems like most readers are liable to just skim that content, being more interested in the topics discussed later. For example, the start of Chapter 14 (on optimization) would be neat to see.
That said, I like the parts that translate between analytical expressions and programming code. Such mappings seem like high-value content to readers; the language barrier can keep people from understanding mathematical writing, while a few helpful translations can help to tear down those language barriers.
My view was that the initial chapter was more about how to learn mathematics generally using polynomials as a source of examples, rather than being on the subject of polynomials like you'd get in grade school.
Agreed though—I would like to see some of the later material, too :)
Edit: actually you can skip around and see more on the Amazon preview.
Any chance you could add it in the future?
But yes, I unfortunately had to cut a probability chapter. I think someone who reads this book would have a much easier time learning probability after, and a better foundation.
So will you be following up with a prob & stats book? ;)
It saddens me that schools may be handing out CS degrees without having first required students to at least have taken linear algebra, multivariable calculus, and discrete math that covers basic counting, sets, graphs and groups. How can this be?
Probability and statistics should also be a required part of every CS program.
I would recommend a book I found that covers Statistics using Python:
Statistical Methods for Machine Learning
Personally, I much prefer that book to the free "Think Stats" one available.
You can also find a book there on Linear Algebra and others related to Deep Learning, all containing real implementations with Python.
I have no affiliation with the site; these books have proven so valuable to me that I need to share them.
Anyway, the book mentioned in the OP looks like a great foundation and I picked up a copy as a refresher. I would have also liked to have seen coverage of number theory in this book, with RSA being an application, but that too would have required lengthy explanation for any useful insights to be learned.
The path to a deep understanding of inference that makes most modern ML seem straightforward goes through measure theory, Lebesgue integration, some functional analysis, a smattering of topology, and an intuition around dynamical systems. Then you go do probability and random processes, detour into game theory for a bit, learn decision theory, and at that point it all goes from mystical to bleedin' obvious.
Nothing advanced, just Trig, Geometry (proofs based), Algebra and Precalculus. Basically what a sharp high school senior in college prep classes would be familiar with. Geometry was probably the best. If you've never encountered formal proofs before, it's probably the best training for pure logic I can imagine. They start out incredibly frustrating but become addictive once you figure out how to crack them. Precalc was insanely useful too. Learning how to build up a function and shape it with various operators, and work with polynomials is absolutely essential for things like graphics shaders and timing functions and all kinds of other stuff that comes up in UI development (my work). All I can say is that it will give you a much greater appreciation for studying the purely abstract rather than always focusing on practical matters that come up in engineering, as well as making apparent more elegant solutions you may have brute forced in the past.
I'm from the US. The state of mathematics education here is absolutely embarrassing to pretty much any other developed country. Taking precalculus is actually considered advanced, most students graduate with nothing more than an "Algebra" class that covers basic algebraic notation, quadratic equations, linear equations, and not much beyond that. Calculus 1 (single variable) is considered an advanced math class that is only taken by STEM majors for freshman university students here.
I expect I'll have to work at it to follow this book but that's why I need something like this. And I need to spend some time with Python too so I'm looking forward to digging into it.
Aside from that, I'm also skeptical that the frequency in which these maths apply to practical, commercial programming is really that high.
Im not anti math or something. I just think the practical value gets way over sold by some people. And sometimes it feels like it's because of the dislike of "those who can call themselves programmers by trade."
I would be more interested in hearing an argument about why math knowledge is not useful or lucrative.
I just realize I fear math because the educational system I grew up in was violent (like beating kids for getting a quiz wrong wtf).
It was only through psilocybin mushrooms did I discover math and calculus again.
So I have this phobia of calculus and math. Anytime I'm faced with a formula I get this panic attack. Some may call it PTSD. But it explains why I had such problem with calculus and it really made me feel inferior.
it's still a cliff hanger, searching for my arc.
It basically builds up mathematics rigorously from basic definitions, while trying to stay very accessible.
If anyone has the time, or desire to learn math this way, let me know what you think, and if I should make more in this series!
As a Math guy who got into the world of programming relatively recently, I am on the opposite side of the spectrum I suppose but I'm gonna order this nonetheless to support him.
From the table of contents, there seem to be short prose sections inteleaved with the teaching sections. I hoped to see an example of the teaching section, not the prose.
Also note that the Amazon "Look Inside" lets you see basically any page. Some readers have told me the first chapters were too slow, and so I think more advanced readers will want to breeze through that (though the applications in the first two technical chapters have a coolness to them that is hard to beat!).
I found this interesting because I too discovered this difference in approach but had the complete opposite reaction. I absolutely hated math in middle and high school. It wasn't until I took a discrete math course for my CS program
that I got exposed to dealing with real proofs, which I found required a level of creative thinking, and I totally loved it. This admittedly wasn't an "advanced" university math class, but the difference from high school math was still quite stark.
I tried to start something similar which tried to explain all weird maths symbol via code. It went nowhere.
But feel free to check https://github.com/mkagenius/mathsymbol2code
I'm very likely to buy a hard copy of such a book, but not unless I can do the equivalent of flipping through it like I would in a book store.
Consider changing the preview instead to a scattered sampling of some of your proudest pages.
MIT OCW Scholar(independent study) course on Linear Algebra by Prof. Strang is really good and is designed for self-study. If you have the time, you could look up Coding the matrix too. I read probability from Mathematics for Computer Science-MIT and also referred Khan Academy and PennState STAT 414/415  for statistics and probability. StatQuest channel on Youtube has handwavy but easy to understand videos on statistics for ML too. The Deep learning book by Ian Goodfellow et al. has a couple of chapters at the beginning that gives you a fairly good idea of the mathematics required to get into Deep learning. Communities like r/AskStatistics and r/statistics on Reddit were really helpful when I got stuck.
I also chanced upon Mathematics for Machine Learning book recently and it seems to be good. It has a chapter on optimization that is left out in most books but skips statistics.
 - https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2x...
 - https://ocw.mit.edu/courses/mathematics/18-06sc-linear-algeb...
 - http://codingthematrix.com/
 - https://courses.csail.mit.edu/6.042/spring18/mcs.pdf
 - https://www.khanacademy.org/math/statistics-probability
 - https://onlinecourses.science.psu.edu/stat414/
 - https://www.youtube.com/user/joshstarmer/videos
 - https://www.deeplearningbook.org
 - https://mml-book.com
 - https://www.youtube.com/playlist?list=PLZHQObOWTQDMsr9K-rj53...
It depends on what you want to do. I’ll get to your question in a bit, but I think this passage from the book on page (i) describes why you might want to learn mathematics.
> So why would someone like you want to engage with mathematics? Many software engineers, especially the sort who like to push the limits of what can be done with programs, eventually come to realize a deep truth: mathematics unlocks a lot of cool new programs. These are truly novel programs. They would simply be impossible to write (if not inconceivable!) without mathematics. That includes programs in this book about cryptography, data science, and art, but also to many revolutionary technologies in industry, such as signal processing, compression, ranking, optimization, and artificial intelligence. As importantly, a wealth of opportunity makes programming more fun! To quote Randall Munroe in his XKCD comic Forgot Algebra , “The only things you HAVE to know are how to make enough of a living to stay alive and how to get your taxes done. All the fun parts of life are optional.” If you want your career to grow beyond shuffling data around to meet arbitrary business goals, you should learn the tools that enable you to write programs that captivate and delight you. Mathematics is one of those tools.
You should never feel like a lesser programmer, because you don’t know mathematics it’s just something that might make things a little more interesting and fun while adding some value. Of course it’s not always fun for everyone, so let yourself decide if it’s for you. Mathematics can create value for a programmer in a lot of different ways like as stated above, but yet again people should not feel belittled not having this knowledge because there are many other ways you can add value to your job as a programmer without mathematics.
With that said, I’ll give you a list of programming topics below that are enabled by mathematics and what kind of mathematics can help with those topics. If you’re not needing to study any of these topics or needing to use them in your daily job I think one of the most useful and fun types of mathematics is discrete math for everyday programming. This can build foundations of logic and reasoning needed for programming. Someone else already mentioned the mathematics for computer science course from MIT  in this thread and that’s a great intro to discrete though it can be pretty challenging at times especially if you’re new to the topic.
Programming Topic - Math Topics to Study
cryptography - number theory, abstract algebra, probability, basic combinatorics, information theory and asymptotic analysis of algorithms 
data science - Linear algebra, Regression techniques, Probability theory, Numerical analysis 
art/computer graphics - geometry, linear-algebra, physics-based calculus, topology and numerical methods 
signal processing: Fourier transforms, Laplace transforms, differential equations, statistics, linear algebra, and complex analysis 
Data structures and algorithms: mostly discrete math (set theory, logic, combinatorics, number theory, graph theory, formal proofs), asymptotic notation.
compression: Information theory, statistics, probability, linear algebra 
ranking: statistics, markov chains (think PageRank), probability, linear-algebra 
optimization: numerical analysis, computational geometry, discrete mathematics, probability, linear-algebra, calculus 
artificial intelligence: discrete math, statistics, analysis, linear-algebra 
 see the hover over: https://www.xkcd.com/1050/
Thank you for sharing this.
1. Theorem 2.4 is stated incorrectly. Given the context, I feel like this is worth correcting. Specifically, it says "degree n" rather than "degree at most n". Part of the proof purports to prove that the degree is indeed n but of course it doesn't because that needn't be true.
There are other cases where you say "degree n" for "degree at most n". Again usually this would be a minor error not worth pointing out, but in this context it seems worth getting right.
2. At one point you introduce a convention that deg(0)=-1. Later, in the exercises, you ask, is this really such a good convention? (The answer being, of course, no.) IMO you should anticipate this. Indeed I don't think you should state, as you do, "By convention the zero polynomial is defined to have degree -1", because that suggests it's some standard universal convention, which is definitely correct, and it's neither of those. Rather you should say something like "We'll use the convention that the zero polynomial is defined to have degree -1". But anyway, the point I made is that, if you're going to question its correctness later, you should anticipate that here, maybe saying something like "(Think about whether this convention makes sense.)" Or maybe not, and just getting rid of the absolutism of your current wording is sufficient. Either way, getting rid of that absolutism and certainty is good; you want to encourage to people about this sort of thing immediately, not encourage them not to think about it until later.
3. You say that when you see a definition you should write down examples. I would add, "and non-examples". Ideally non-examples that come as close as possible but don't quite make it. You touch on this a little with your polynomial examples, but it's worth stating explicitly.
(In some cases non-examples are unnecessary, but in the generic case one should look for them.)
4. Regarding your polynomial examples, you don't justify that they are, in fact, not polynomials. Now of course you don't, that would be too hard to do here and take up lots of space you want to use for other things. That's fine. But if you're not going to do it, you should call out that you're skipping over it, like you do with other things. After all, all sorts of nonobvious things can be polynomials -- such as (x-1)(x+6)^2, as you pointed out earlier, but included no similar examples here. (Yes that's obvious to anyone who knows anything about polynomials, but my point is that it's not in the correct syntactic form.) Like, x^e - x^e is a polynomial, you know? Because it's 0. So without some more knowledge, you can't immediately conclude that your example x + x^2 - x^pi + x^e is in fact not a polynomial! You should make a note of that, as I said.
5. I feel like it's likely worth noting somewhere in this chapter that actually in general in math it's the "syntactic" definition of polynomial that turns out to be the right one (you don't want to define polynomials to be functions if you're working over a finite field, say!). Maybe not and that would just be confusing, I dunno.
6. This is just nitpicking, but I'd suggest rewriting Theorem 2.3 in a clearer, more standard way. "A nonzero polynomial of degree n has at most n distinct roots." What you wrote down is equivalent, of course, but (IMO) harder to read.
Otherwise, this is pretty nice. I remember being distinctly confused by stuff like "the product over j not equal to i" when I was a kid. I imagine it'll be quite helpful to a number of people that you're laying things out like that explicitly.
Actually, sorry, on that note, one further comment:
7. You comment on how sigma and pi notation are special cases of fold, but you might want to make a further note about how (unlike general folds) these are folds where the order doesn't matter, and that the fact that the order doesn't matter is one of the things that allows notation like "product over j not equal to i".
Thanks for reading! ^_^
Is this something you can control on your end?
I started with 3blue1brown's Youtube course on Linear Algebra and loved it. I had already done a college course on LA, but this made me truly understand what I was doing.
I also chanced upon Mathematics for Machine Learning book recently and it seems to be good. It has a chapter on optimization that is left out in most books but it skips statistics.
 - https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2x....
 - https://ocw.mit.edu/courses/mathematics/18-06sc-linear-algeb....
Copied from my comment here: https://news.ycombinator.com/item?id=18582022
I do wish there were more of a preview than just the TOC to see how novel the examples are and how much it helps with intuition for these mathematical concepts beyond what you would learn in a plain CS sequence. That would be my reason for buying the book and I wouldn't write it off just because the list of topics covers the first two years of college math.
Looking back, that first year was brutal with each successive year getting way easier and way more fun.
Why did you decide to self-publish?
* 19 pages of droning before you start with something concrete. Much talk talk talk about your experiences before you get to the point. I can't put into words how much it frustrates me when I'm expecting to read something interesting and the author takes 3 paragraphs talking about nothing (usually with lots of overexcited exclamation marks).
[sorry if I am being blunt, but it's how I feel]
* Imprecise definitions. This defeats the purpose of learning mathematics. Like Leslie Lamport says, rigour in mathematics is not a hurdle or a chore one must endure, it's the whole point of learning the damn thing. You give imprecise definitions, and then obscure it even further with neverending paragraphs of confusing explanations. This to me kills the whole pedagogical value the book might have. Here is a rule of thumb that in my experience applies well to almost everything in mathematics: the simpler your explanation is, the better. Your goal is to explain a concept as succintly and beautifully as possible. This exposes the idea behind it. A long and meandering explanation only serves to obscure the idea behind. Less is more.
* Attempting to shoe-horn programming "lingo" into mathematics. Sometimes, the best way to explain something, even to programmers themselves, is not to force an awkward analogy with Java programming. EDIT: 5 pages later: "The best way to think about this is like testing software." oh boy...
* The graph in e.g. page 8 (20 of the pdf) is terribly typeset. The axes text is way too small to read and in a font that doesn't match the rest of the content.
The culture of mathematics (including its lingo) has always been a big barrier for me. Thus far, I've only skimmed it, but that part looks promising to me.
It seems reasonable to guess that if someone has learned a good bit about programming but managed to avoid learning about math, reasons like culture, terminology, accessibility, and motivation might be a big part of why. So including that sort of material in this book makes sense to me.
I don't want "no talk" and "just equations, I want the "minimum of talk possible" that communicates the ideas and nothing more. I find the more stuff you write the more there is to confuse people. The best way is to strip everything that is superfluous. You are left with the essential, in the clearest form there can be.
Indeed, most of the canonical texts for undergrads would likely fit the bill.
> 19 pages of droning before you start with something concrete.
One person's "droning" may be another person's "rare, illuminating presentation"; we are not all interested in the same things. I can offer another perspective that what the author wrote on polynomials within the first 19 pages there is in fact pretty unique and interesting.
> Imprecise definitions. This defeats the purpose of learning mathematics.
The commenter is again taking a minority viewpoint and baselessly extending it. There is a special kind of paranoia that often manifests in discussions of mathematical pedagogy that any departure from perfect rigor will weaken the minds of students. This is a blatantly shallow and one-sided view of things: the fact that rigor has value does not imply that the most effective method of teaching—which is a matter of both mathematics and human psychology—is to offer nothing but the most rigorous presentation possible.
This particular book is explicitly targeted at helping to transition programmers into mathematics. Given that goal, do you really think the pedagogically superior approach would be to offer a more rigorous definition of polynomial than:
"A single variable polynomial with real coefficients is a function f that takes a real number as input, produces a real number as output, and has the form: f(x) = a0 + a1x + a2x^2 + ... + anx^n"
—in the introductory chapter of the book?
I would urge potential readers to take the parent comment with a grain of salt. And also, if you're among this book's target audience and trying to teach yourself mathematics, be aware of such personalities preaching this particular dogma of mathematical instruction: it's fairly common on the internet. But it basically represents the same corner of the mathematics world as that of the programming world where folks insist on using nothing but VI/Emacs on Linux with C++ and/or Haskell, and are all too ready to belittle any alternatives perceived as softer/weaker. These aren't necessarily the most impressive programmers—they just project the most intimidating auras. Don't let their counterparts in mathematics scare you off.
You are absolutely correct in that regard. I've talked to many people who hated the textbooks I most liked, and preferred ones that I found unreadable. Just goes to show that what works for you may not work for me.
You are very wrong on the other point: none of what I said is borne out of a view that mathematics should be difficult and "hard" an impenetrable (rather than soft and approachable). Indeed I view this sort of overlong prose as impenetrable and confusing, and the succinct style of e.g. Landau textbooks much clearer (see my other comment).
>The commenter is again taking a minority viewpoint and baselessly extending it.
This is not a minority viewpoint. I'd daresay is the majority opinion among mathematicians. It is also the opinion of prominent computer scientists: Dijkstra, Leslie Lamport, Donald Knuth, to name a few off the top of my head.
It is also plainly true: mathematics is about rigour. It is not an obstacle, nor is it an end in itself, but it is a fundamental part of mathematical study and reasoning. If you aren't being rigorous, you're not doing mathematics, it's just a waste of time. I'll let Michael Spivak speak for me:
"In addition to developing the students’ intuition [...], it is important to persuade them that precision and rigor are neither deterrents to intuition, nor ends in themselves, but the natural medium in which to formulate and think about mathematical questions."
>be aware of such personalities preaching this particular dogma of mathematical instruction: it's fairly common on the internet. But it basically represents the same corner of the mathematics world as that of the programming world where folks insist on using nothing but VI/Emacs on Linux with C++ and/or Haskell
Completely nonsensical comparison (C++ and Haskell?? two languages who could not be further apart), and again, not in the least bit what I mean with my criticism.
There are reasons partly historical and partly due to the subject matter of CS that mathematicians closer to it tend to place relatively higher value on formality.
> It is also plainly true: mathematics is about rigour.
This is taking taking it too far and you're placing yourself in the formalist camp, which is a minority viewpoint. You gave a nice quote from Spivak where he characterizes rigor, "...the natural medium in which to formulate and think about mathematical questions."
Labelling it a 'medium' is very informative. Computer programs likewise depend totally on the formality of the medium; it's in intrinsic part of how they are able to operate. Same with the magic of formality + inference in mathematics.
That said, the psychological questions of pedagogy involve much more than the intrinsic features of some subject. In learning to write completely formal computer programs, one benefits immensely from instruction which departs from total formality. I'm assuming this would be obvious to the readership here so I won't go into more detail.
> Completely nonsensical comparison (C++ and Haskell?? two languages who could not be further apart)
I was referring to the social standing of the languages (which is all that matters for the points I was making), not their intrinsic features.
Your criticism is like that of a professional mathematician complaining of the elementary results presented in some high school math book.
>[sorry if I am being blunt, but it's how I feel]
you should learn to keep your feelings to yourself when the only function they serve is to denigrate others and derive cruel satisfaction for yourself.
>Here is a rule of thumb that in my experience applies well to almost everything in mathematics
this is aspirational pretension - everyone claims to appreciate formal purity /after/ they've learned something but when you're /learning/ none of that matters because you're just trying to develop intuition. to be one of those people that understands after their own stumblings/ruminations and then begrudge the next person the same is despicable. shame on you and i hope you're never in a position where someone depends on you to teach them absolutely anything.
>Imprecise definitions. This defeats the purpose of learning mathematics. Like Leslie Lamport says, rigour in mathematics is not a hurdle or a chore one must endure,
but that's just like your opinion man (or leslie lamport's). there are shelves and shelves of books for people like you - go read bourbaki or rudin or mochizuki or whomever you'd like. this book is not for /you/ - it's stated purpose is to excite and entice people that don't have formal mathematical training to learn mathematics and those sorts of people decidedly don't enjoy austere definitions and succinct theorems and terse proofs.
hence the only purpose your comment serves is to hurt the author's feelings, an author whom i might add has done infinitely more for the math community than you have with your pedantry and vitriol by maintaining a blog https://jeremykun.com/ with literally reams of interesting mathematical content that is simultaneously exciting /and/ rigorous. and furthermore iirc jeremy was originally a math ed phd student so i trust his opinion of the right way to teach math infinitely more than i do yours mr random internet physics guy.
next time think twice before posting this kind of lowbrow mean shit.
> In Comments
> Be civil. Don't say things you wouldn't say face-to-face. Don't be snarky. Comments should get more civil and substantive, not less, as a topic gets more divisive.
> When disagreeing, please reply to the argument instead of calling names. "That is idiotic; 1 + 1 is 2, not 3" can be shortened to "1 + 1 is 2, not 3."
Enjoy your weekend, both of you!
> Like Leslie Lamport says
Pretty clear appeal to authority, IMO.
Btw it's actually Lamport quoting Spivak.
One thing that's wrong with HN is that perceived "negativity" often gets condemned in exactly the way you have done here.
It seems as if a significant number of HN readers have never really participated in a spirited discussion with arguments made from multiple different perspectives. Maybe any kind of apparent conflict scares them, maybe they project their own aggression onto a comment that seems to go against the grain of the discussion. It will never change.
>The only thing "apparent" here is that OP has trouble with empathy.
Again, I can do without the online pretend-therapy. Amazing how perceptive some people are that they deduce the most profound things from a dozen lines of text!
However, it seems several people took the side of the replier.
So I reviewed your original comment, and I think I've found the problem: it exaggerated and labelled, e.g. droning, talk talk talk, talking about nothing, neverending paragraphs.
Many of these aren't literally true ("nothing", "neverending"). Others are emotionally loaded ("drone"). It's probably almost always better to speak directly, without exaggeration or emotion... but this is particularly important when criticizing.
I didn't notice these at first because I tend to filter out decoration, and just hear the content (i.e the literal meaning) - though this is much easier to do when I'm not personally involved!
I think, "to be blunt", to speak plainly, to get to the point, really mean to be factual and accurate - without emotional language, exaggeration or labeling.
Anyway, I notice dang asked to not continue this thread, but I was troubled by it, and reviewing it helped me - maybe it will help you too.
I do justify why simplicity and succinctness are better than meandering. More superfluous information obscures the "nugget" or the essence of we really want to talk about. Strip away the accessory, write the simplest, most lucid explanation that captures the idea, and you will see the concepts and connections in their elegance, more clearly than when that is obscured in the middle of pages and pages of talk. In summary: "idea" is more understandable than "idea+cruft".
What do you mean no reason why? Are you expecting a scientific trial? I'm sorry to disappoint you: these are but my opinions.
I believe you must have mistaken me for someone else. My name is andrepd. Is this "hn" a friend of yours?
>you should learn to keep your feelings to yourself when the only function they serve is to denigrate others and derive cruel satisfaction for yourself.
It never ceases to amaze me how some people are so perceptive that they can confidently deduce the intentions and personality of a person half a world away by reading a short text online. Are you available for therapy sessions? I could use your valuable insights.
Also, I was under the impression that I was making constructive criticism. I made concrete points and showed examples of books that in my opinion did those things right (see my other comment). I regret the "very very poor" phrase at the start though. I've changed it to just "poor".
>everyone claims to appreciate formal purity /after/ they've learned something but when you're /learning/ none of that matters because you're just trying to develop intuition
Oh, I see you know more about how I felt learning stuff than I do myself! Lovely.
I can tell you that I found it was almost always reading the most succinct treatments that I truly understood the greatest insights. Although from your tone I suspect that none of this will make a difference about how you feel. I won't repeat myself. You can (re)read my other comments if you're interested (and if you find I didn't explain myself well I'd be happy to discuss it more), and also check the examples I've mentioned.
>shame on you and i hope you're never in a position where someone depends on you to teach them absolutely anything
>an author whom i might add has done infinitely more for the math community than you have with your pedantry and vitriol
>jeremy was originally a math ed phd student so i trust his opinion of the right way to teach math infinitely more than i do yours mr random internet physics guy.
I am doing a maths PhD and (woe is you) I teach undergraduate classes AND I've been tutoring students of physics, maths and computer science for over 4 years now, online and in person. I can say with no false modesty that I've been repeatedly complimented by students on my ability to teach and explain concepts.
What Nobel prizes have you got, since that seems to be so important to you?
"next time think twice before posting this kind of lowbrow mean shit".
It was meant to attack and irritate and I fell for it.
I am again very sorry to disappoint I've not read TAOCP or Landau or even Peskin from cover to cover. I'm however curious if you can let me know where you got that idea from, cause I scoured my comments and can't for the life of me find anywhere I indicated so.
Seriously though, I have no idea what your point is supposed to be. I shouldn't give my opinion because... it might not be relevant to someone else, is that it? Someone might not agree? If it interests you I've met many people in the past few years who share my view (and also many personalities, again, Lamport, Dijkstra, Knuth, in the field of computer science). I've also met many who don't agree! And that's fine, what works for some might not work for others. Clearly this concept does not sit well with you.
This is being an uninteresting conversation which is only serving to irritate me (and you, it seems). I will stop replying now.
This statement is particularly amusing and highlights to me the fact that mathematics are a natural language, and not a programming language. Sussman had a really great presentation on this point; anyone who’d argue this please watch!
NB: The slides aren't visible in the video, but here's the corresponding AI Memo by Gerald Jay Sussman and Jack Wisdom from November 2012...
AI Memo 2002-018: The Role of Programming in the Formulation of Ideas (November 2012) [pdf] https://dspace.mit.edu/bitstream/handle/1721.1/6707/AIM-2002...
Another book that fits this is Cohen-Tannoudji's Quantum Mechanics. The first two chapters explain quantum mechanics from absolute scratch. It starts as all physics does: with an experiment. Then everything else follows from looking carefully at the consequences of that observation, and the concepts are truly explained for what they are, because they are presented in the simplest way possible. "Idea" is more understandable than "Idea+Cruft". This is remarkable to me: much fuss is made about how quantum mechanics is strange and confusing and difficult to grasp, and it is indeed so. In that first chapter, however, I've found the most illuminating explanation of quantum mechanics I've ever read.
EDIT: I just opened Landau's Mechanics Vol I, and here's what his colleague had to say about his writing and teaching style: "[These are] all the features of his characteristic scientific style: clarity and lucidity of physical statement of problems, the shortest and most elegant path towards their solution, no superfluities.". Indeed.
This book hopefully fills that gap. There are other introductory books like Mathematics: Its Content, Methods & Meaning by Aleksandrov and Kolmogorov but that requires a serious investment of time.
Lastly, I apologize but I am going to rant about this physicist phenomenon. I am a physicist myself (high-energy theory) that entered quantitative finance after my PhD (a heavily disliked field on HN). I found a lot of physicists outside academia who tend to be aggressive and condescending and often haven't actually gone through the rigors of a PhD program themselves. Maybe it makes one feel smarter to tell other people that they are reading easy books or can't jump straight to Landau or Bourbaki (those two couldn't be more different but you get the point) and there are no other physicists around to correct the notion that there are multiple ways to gain knowledge and build intuition.
It doesn't matter who says what about which book. Sample some books, find what you like as long as its not junk science/mathematics, do plenty of exercises, and try to derive things yourself and don't fool yourself that you understand something deeply by studying it for a year.
It doesn't seem a good idea to jump into writing a textbook teaching mathematics unless one has experience of teaching mathematics.
But the author makes the very point about early failures of programming, due to lack of experience, so perhaps he can supply information about what his pedagogical experience consists of.
Teaching other people is a craft, similar to programming or mathematics, with its own necessities.
So in terms of number of people face to face, somewhere in the low thousands seems right. In terms of writing, my blog has on the order of millions of all-time page views.
I think it's a stretch to call the book a textbook. I think of it as an O'Reilly-type general technical book, but for math. If someone uses it to teach a course, that would be pretty wild, and I'd feel honored.
Hope you enjoy it :)