| ▲ | Show HN: A little notebook for learning linear algebra with Python(little-book-of.github.io) |
| 160 points by tamnd 8 hours ago | 38 comments |
| |
|
| ▲ | tamnd 7 hours ago | parent | next [-] |
| This pairs really well with the little book https://github.com/little-book-of/linear-algebra, I have recently updated it with more content and clearer explanations, so if you're diving into this topic, you might find it helpful. |
| |
| ▲ | wodenokoto 5 hours ago | parent | next [-] | | pairs well? Isn't it the same book? | | |
| ▲ | dazzaji 5 hours ago | parent [-] | | Based on the URL correlation and content, it sure appears to be the same book. | | |
| ▲ | tamnd 4 hours ago | parent [-] | | By pairing, I mean that you can read the book alongside the notebook. Sometimes, in the notebook, I don't explain the concepts, only some Python code. |
|
| |
| ▲ | johnh-hn 7 hours ago | parent | prev | next [-] | | Thank you for creating and open sourcing this. I have a question if I may. If a person has the goal of getting into a field like computer vision or machine learning, would they be able to build useful things right away if they completed this book? | | |
| ▲ | tamnd 7 hours ago | parent [-] | | Definitely! If you scroll down a bit, you will see in Chapter 10 that I've included some fun applications, things like 2D/3D geometry, linear regression, recommender systems, and even a quick intro to PageRank. I wanted to show how these ideas connect to real-world problems, so it's not just theory. Hope you find it interesting. | | |
| |
| ▲ | m00dy 7 hours ago | parent | prev | next [-] | | great work!, will take a look over the weekend. | | | |
| ▲ | constantcrying 5 hours ago | parent | prev [-] | | >the core ideas of linear algebra I think it is actually delusional to say that a book which does not properly define what a vector is, contains the "core ideas" of linear algebra. Linear algebra is so much more than lines in R^n. It is a powerful theory because it is abstract. | | |
| ▲ | coderatlarge 4 hours ago | parent | next [-] | | if you know how to handle real or complex coordinate vectors and matrices you’re one only isomorphism away (aka choice of basis) from dealing with an “abstract” vector space (except if you want to talk about finite fields or infinite dimensions). it seems like a really good starting point for many learners’ backgrounds… | | |
| ▲ | constantcrying 40 minutes ago | parent | next [-] | | >f you know how to handle real or complex coordinate vectors and matrices you’re one only isomorphism away (aka choice of basis) from dealing with an “abstract” vector space No, you aren't. How would you explain that matrices are both linear transformations and vectors? How would explain what a dual space is? How would you understand the properties of the Fourier transformation, which is a mapping between functions, which are also vectors, and itself also is a vector? | |
| ▲ | coderatlarge 4 hours ago | parent | prev [-] | | even Golub and van Loan basically start there. |
| |
| ▲ | mouse_ 4 hours ago | parent | prev [-] | | Offer a better alternative, then? E-books are handy. |
|
|
|
| ▲ | qustrolabe 2 hours ago | parent | prev | next [-] |
| Marimo notebook would fit nicely here for interactive examples where you could play with values and see computations in real time, though it probably lacks in formatting capabilities and quite heavy. |
|
| ▲ | stared 6 hours ago | parent | prev | next [-] |
| Nice to see it! I think that a lot of mathematics would benefit from executable code (or I would say - executable maths) - so people can play and experiment with it. I had my own approach for teaching deep learning (https://github.com/stared/thinking-in-tensors-writing-in-pyt...), showing both mathematical formulation in LaTex, and a numeric one in PyTorch. |
| |
|
| ▲ | badbart14 4 hours ago | parent | prev | next [-] |
| This is awesome, been going through the little book as a way to refresh myself on linear algebra which I see has been updated as well. Luckily only on chapter 4 so definitely going to start doing the labs alongside the book now! |
|
| ▲ | fnah1827 5 hours ago | parent | prev | next [-] |
| That book is about NumPy and not linear algebra. For actually learning linear algebra you need a math book, pen and paper. NumPy is the worst way of abstracting linear algebra into a programming language. Octave is better in not obfuscating the concepts with OO boilerplate and having actually useful printed matrix output instead of ugly list representations. Even Fortran is better. |
| |
| ▲ | abdullahkhalids 30 minutes ago | parent | next [-] | | The best is of course Wolfram + the Mathematica libraries. You get full symbolic manipulation as well, so you can do abstract linear algebra as well. | |
| ▲ | tamnd 4 hours ago | parent | prev | next [-] | | Of course, this is about Python and NumPy. In practice, you'll often encounter the code before the underlying math (especially in Machine Learning), so developing intuition from both directions is always helpful. Btw, if you enjoy pure mathematics, starting from Chapter 4 in the book, I begin defining vectors and the axioms of vector spaces: https://little-book-of.github.io/linear-algebra/books/en-US/... | |
| ▲ | cowLamp 5 hours ago | parent | prev [-] | | hard disagree. octave and matlab (and maybe even r) are first and foremost calculator languages, not programming languages. numpy is an intuitive way of doing those numerical calculations in a general use programming language. only minus is the missing gong and why commands |
|
|
| ▲ | kccqzy 5 hours ago | parent | prev | next [-] |
| I'm only halfway into the first chapter but I already hate it. The linear combination picture is extremely misleading: the gray dots show the linear combinations where the coefficients are integers, but we are in the vector space R^2! This could have been a great opportunity to teach that any vector in R^2 could become a linear combination of these two vectors, thus it could become a new coordinate system. Even though this is probably introduced in a later chapter, a curious reader will be able to question why the gray dots are form with integer coefficients and leave them with a wrong impression. |
| |
|
| ▲ | constantcrying 5 hours ago | parent | prev | next [-] |
| What is a point of Linear Algebra Tutorial which does not even attempt to properly define what a vector is? >A vector has: >A symbol (we might call it v, w, or even →AB in geometry). >Components (the individual numbers, like 2 and 3 in [2, 3]). >An arrow picture (a geometric way to see the vector as a directed line segment). None of these are properties of all vectors. They are properties of how vectors are represented in numpy. |
| |
| ▲ | __MatrixMan__ 5 hours ago | parent | next [-] | | You are quoting the lab which is all about doing stuff in numpy. Probably if you want to critique the definitions used you should switch to the book. That said, it doesn't lead with a notion of vector that is as general as I'd like. Readers might be later surprised to find that there are vectors which are not lists of numbers. But I only looked at the first few pages so I assume the vector space axioms show up eventually. | | |
| ▲ | hirako2000 2 hours ago | parent | next [-] | | I find it very disrespectful towards a project with such popularity to contributors ratio. It takes long hours to produce a working notebook, a synergy between concept descriptions and theorical explanations alongside code, comments of code and markdown for the theory here and there is an artistic coupled with engineering stunt you should try to accomplish yourself before criticizing. Perhaps you have, in which case a contribution as the other comment points out is the courteous thing to do. That book must have taken months to author and is one of the best read on the subject I've ever come across. Edit: removed incorrect fact about scalars.. they don't have a direction they have polarity. | |
| ▲ | constantcrying 5 hours ago | parent | prev [-] | | The book is even worse: "A vector, by contrast, is an ordered collection of numbers." This is a terrible definition and makes talking about proper linear algebra proper impossible. | | |
| ▲ | tamnd 4 hours ago | parent | next [-] | | I tried to build intuition before going into the formal definitions. Personally, I've always liked Bourbaki's books, but they're too formal for learning - especially in linear algebra, which I see as something meant for applications rather than pure math research. Maybe I just oversimplified things or made them feel less "math". | |
| ▲ | dvrj101 4 hours ago | parent | prev [-] | | here you go mate, exactly what you are looking for : https://github.com/little-book-of/linear-algebra#contributin... | | |
| ▲ | tamnd 4 hours ago | parent [-] | | Every contribution is welcome: whether it's criticism, fixing typos, or even completely rewriting a section! Writing this book has been a real challenge for me, since all the books I enjoy reading are very formal ones :)) Anyone here into Grothendieck's SGA or EGA? (Sorry, a bit off topic!) |
|
|
| |
| ▲ | canthonytucci 5 hours ago | parent | prev | next [-] | | What is the point of a comment saying something doesn’t properly define something that doesn’t share the proper definition? (Posted in good fun, no harm intended) | |
| ▲ | voidhorse 5 hours ago | parent | prev [-] | | And precisely this is the risk of teaching "mathematics" using a programming language. Unfortunately, I think quite a few people don't actually know the abstract mathematical definitions and use concrete implementations as definitions in their heads in the first place. At least using a theorem prover would get you closer to doing actual maths and proving. It's probably more accurate to say courses like these teach mechanics/calculation more than they teach the theory. |
|
|
| ▲ | ai_viewz 5 hours ago | parent | prev | next [-] |
| That is awesome work. I really find it usefull. |
|
| ▲ | freakynit 6 hours ago | parent | prev [-] |
| This is great. Covers a lot of useful topics. Thanks.. |
| |
| ▲ | pplonski86 5 hours ago | parent [-] | | If you are looking for Python notebook that is beginner friendly, I'm working on desktop app called MLJAR Studio. It packs Python and JupyterLab in single executable - installation is stright-forward. Additionally, there are extensions that makes working with Python much easier for beginners: for example, variable inspector and packages manager. | | |
|