It's crazy that Linear Algebra is one of the deepest and most interesting areas of mathematics, with applications in almost every field of mathematics itself plus having practical applications in almost every quantitative field that uses math.
But it is SOOO boring to learn the basic mechanics. There's almost no way to sugar coat it either; you have to learn the basics of vectors and scalars and dot products and matrices and Gaussian elimination, all the while bored out of your skull, until you have the tools to really start to approach the interesting areas.
Even the "why does matrix multiplication look that way" is incredibly deep but practically impossible to motivate from other considerations. You just start with "well that's the way it is" and grind away until one day when you're looking at a chain of linear transformations you realize that everything clicks.
This "little book" seems to take a fairly standard approach, defining all the boring stuff and leading to Gaussian elimination. The other approach I've seen is to try to lead into it by talking about multi-linear functions and then deriving the notion of bases and matrices at the end. Or trying to start from an application like rotation or Markov chains.
It's funny because it's just a pedagogical nightmare to get students to care about any of this until one day two years later it all just makes sense.
> Even the "why does matrix multiplication look that way" is incredibly deep but practically impossible to motivate from other considerations. You just start with "well that's the way it is" and grind away
In my experience it need not be like that at all.
One can start by defining and demonstrating linear transformations. Perhaps from graphics -- translation, rotation, reflection etc. Show the students that these follow the definition of a linear transformation. That rotating a sum is same as summing the rotated(s).
[One may also mention that all differentiable functions (from vector to vector) are locally linear.]
Then you define adding two linear transformations using vector addition. Next you can define scaling a linear transformation. The point being that the combination can be expressed as linear transformations themself. No need to represent the vectors as R^d, geometric arrows and parallelogram rule would suffice.
Finally, one demonstrates composition of linear transformations and the fact that the result itself is a linear transformation.
The beautiful reveal is that this addition and composition of linear transformations behave almost the same as addition and multiplication of real numbers.
The addition asociates and commutes. The multiplication associates but doesn't necessarily commute. Most strikingly, the operations distributes. It's almost like algebra of real numbers !
Now, when you impose a coordinate system or choose a basis, the students can discover that matrix multiplication rule for themselves over a couple of days of playing with it -- Look, rather than maintaining this long list of linear transformations, I can store it as a single linear transformation in the chosen basis.
I didn't think any part of linear algebra was boring. I was hooked from the moment I saw Ax=b => x = b/A. Gaussian elimination is a blast, like an actually-productive Sudoku puzzle, and once you have it down you can blaze through the first 2/3rds of an undergrad linear algebra course. I don't consciously try to gain automaticity with math subjects, but matrix-column multiplication I got pretty quickly and now I just have it.
I learned from Strang, for what it's worth, which is basically LU, spaces, QR, then spectral.
I am really bad at math, for what it's worth; this is just the one advanced math subject that intuitively clicked for me.
Linear algebra was such a tedious thing to learn I skipped over it to abstract algebra and doubled back once I had some kind of minimally interesting framework to work with it against. Normally I think this is a foolish way to do things, but sometimes things are just so dull you have to take the hard route to power through at all.
For anyone who’s interested in graphics programming and/or is a visual learner/thinker, there’s an incredibly motivating and rewarding way to learn the basics of linear algebra. (And affine algebra, which tends to be handwaved away, unfortunately. I’m writing a MSc thesis about this and related topics.)
> Even the "why does matrix multiplication look that way" is incredibly deep but practically impossible to motivate from other considerations.
It's only difficult if you are wedded to a description of matrices and vectors as seas of numbers that you grind your way through without trying to instill a fuller understanding of what those numbers actually mean. The definition makes a lot more sense when you see a matrix as a description of how to convert one sense of basis vectors to another set of basis vectors, and for that, you first need to understand how vectors are described in terms of basis vectors.
> This "little book" seems to take a fairly standard approach, defining all the boring stuff and leading to Gaussian elimination. The other approach I've seen is to try to lead into it by talking about multi-linear functions and then deriving the notion of bases and matrices at the end. Or trying to start from an application like rotation or Markov chains.
Which books or “non-standard” resources would you recommend then, that do a better job?
What I find amazing is, given how important linear algebra is to actual practical applications, high school math still goes so deep on calculus at the expense of really covering even basic vectors and matrices.
Where vectors do come up it’s usually only Cartesian vectors for mechanics, and only basic addition, scalar multiplication and component decomposition are talked about - even dot products are likely ignored.
I found the university level presentation of "Vector spaces -> Linear functions -> Matrices are isomorphic to linear functions" much more motivating than the rote mechanics I was taught in highschool, but it's hard to see if I would've had that appreciation without being taught the shitty way first.
>Even the "why does matrix multiplication look that way" is incredibly deep but practically impossible to motivate from other considerations. You just start with "well that's the way it is" and grind away until one day when you're looking at a chain of linear transformations you realize that everything clicks.
Can you expand on your experience with this? I do some graphics programming so I understand that applying matrix transformations works, and I've seen the 3blue1brown 'matrices are spreadsheets' explanation (luv me sum spreadsheets), but the intuition still isn't really there. The 'incredibly deep "why matrix multiplication looks that way"' is totally lost on me.
Why do you say it's practically impossible to motivate matrix multiplication? The motivation is that this represents composition of linear functions, exactly as you follow up by mentioning.
It's a disservice to anyone to tell them "Well, that's the way it is" instead of telling them from the start "Look, these represent linear functions. And look, this is how they compose".
Probability and statistics falls into that category too. It’s one of the more boring undergraduate math courses, but is mind-boggling useful in the real world.
(Basic probability / combinatorics is actually pretty cool, but both tend to be glossed over.)
Actually, the calculation of matrix multiplication is extremely easy to understand if you show it done with a row and column vector first. Once your students understand dot products, they will recognize matrix multiplication as the mere pairwise calculation of dot products.
I went through Khan academy on linear algebra a long time ago because I wanted to learn how to write rendering logic, for me I was implementing things as I learned them with immediate feedback for a lot of the material. Was probably the single most useful thing I learned then.
I had the opposite experience when learning linear algebra as I was also doing 3D computer graphics at the time. It was super interesting and fun. I guess you just have to find an application for it.
I hated precalc, but I loved proof-based linear algebra, my first university math course (linalg + multivariate calc).
The simplicity(/beauty) of matrix multiplication still irks me though, in the sense of "wow, seriously? when you work it out, it really looks that simple?"
I don't know, maybe it's because I read the book on the side in highschool when I was supposed to be doing something else but I really loved Linear Algebra. Once I understood what it was I used matrix operations for everything. Vector spaces are such a powerful abstraction.
In terms of understanding why something is like that, Linear Algebra belongs to Geometry more than Algebra. Every formula in Linear Algebra which ultimately is justified by "it's just that way" can be better justified by geometry. The algebraic formulas are like animals who lost their natural habitat and were put in a zoo, making people think that these animals evolved in the zoo itself.
To give an example: A simple multiplication of two numbers is better seen as rotating one of the numbers to be perpendicular to the other and then quantifying the area/volume spanned by them. This gives vector dot product.
While geometry might better address "why", algebra gets into the work of "how to do it". Mathematics in old times, like other branches of science, did not encourage "why". Instead, most stuff would say "This is how to do it, Now just do it". Algebra probably evolved to answer "how to do it" - the need to equip the field workers with techniques of calculating numbers, instead of answering their "why" questions. In this sense, Geometry is more fundamental providing the roots of concepts and connecting all equations to the real world of spatial dimensions. Physics adds time to this, addressing the change, involving human memory of the past, perceiving the change.
Not just Linear Algebra but every branch of Science/Mathematics should be taught as much as possible using Geometry (and other visualizations) before being mapped to abstract algebraic symbols. Basic Geometry (along with simple Arithmetic) is the oldest subfield of Mathematics for the reason that most of its concepts are intuitive and feels "natural" and mappable to the "Real World" by us Humans. While abstraction via symbol manipulation is necessary to generalize and extend mathematics it should come at a later stage after we have developed some intuition of the concepts being represented by the symbols, however limited/restricted they might be. All abstraction requires some mathematical maturity which can only happen over time.
I remember how betrayed I felt when I got to calculus and realized all of those equations I learned in high school for physics were just introductory calculus. Like why did we have to learn all that the hard way?
Tried to pick a book to get into linear algebra recently, the experience was fairly hellish. First course this, second course that, done right, done wrong... I'd to the LADR4e route, but I don't have the proof-it chops yet...
I like Serge Lang's books for clarity of explanations. He has an Introduction to Linear Algebra which concisely covers the basics (265 pages in the main text), and grounds the matrix computations in the geometric interpretation.
Be aware that Lang has another book, called just "Linear Algebra", which is more theoretical.
You might want to checkout the book Practical Linear Algebra: A Geometry Toolbox by Dianne Hansford and Gerald Farin (its 1st edition was simply named The Geometry Toolbox: For Graphics and Modeling) to get an intuitive and visual introduction to Linear Algebra.
Pair it with Edgar Goodaire's Linear Algebra: Pure & Applied and you can transition nicely from intuitive geometric to pure mathematical approach. The author's writing style is quite accessible.
Add in Introduction to Applied Linear Algebra: Vectors, Matrices, and Least Squares by Stephen Boyd et al. and you are golden. Free book available at https://web.stanford.edu/~boyd/vmls/
I had the same experience when I first learned linear algebra. I don't have any book recommendations, but I did want to say that for some topics, it is better to learn it by applying it than by using a book. Linear algebra was like that for me, but oddly enough I was able to learn tensor calculus from a book later (after doing a lot of problems).
I've found the "No bullshit Guide to Linear Algebra" pretty good. Could be worth checking it out. It's the one resource that has things click more for me.
It starts with the axioms of being able to draw one line parallel to another, and a line through point, and builds up everything from there. No labeled Cartesian axes. Just primitive Euclidean objects in an affine space.
[Author here] Linear Algebra is the first book in a series I'm writing on math, computer science, and programming. You can find the index for the upcoming books here: https://github.com/the-litte-book-of/everything. If the style clicks with you or you're curious about certain topics, I’d love to hear your thoughts!
A linear algebra course without graphics? When I learnt it at school almost 25 years ago, the teacher made schematics all the time to explain the visual intuition behind each concept. I was totally confused when he introduced the abstract definition of a vector space with the addition and scalar multiplication. Then he drew some arrows. Then it all suddenly made sense.
The organization and formatting of the single .tex file is such that one could almost read the source alone. Really nice. Also, I had no idea that GitHub did such a good job rendering the LaTeX math in markdown, it's imperfect but definitely good.
As someone who took a standard undergrad linear algebra course but never really used it in my work, what are some good ways to get acquainted with practical applications of linear algebra?
It's generally useful for multivariate statistics, 3D flies (insects), in 3D space, clustering about a narrow slanting plane of light from a window slit are points that can be projected onto "the plane of best fit" - nominally the slanting plane of light.
That right there is a geometric picture of fitting a line, a plane, a lower order manifold, to a higher order data set, the errors (distance from plane), etc. and something of what Singular Value Decomposition is about (used for image enhancement, sharpening fuzzy data, etc).
The real test of applications is what kind of work do you see yourself doing? - A quick back read suggests your currently a CS student, so all unfocused potential for now (perhaps).
A good use of linear algebra that I'm working with at the moment is the use of splines as a basis for real (vector) functions. After obtaining the matrix/vector representations you can solve for the spline coefficients (and then plot them).
Linear transforms (such as rotations and displacements) in GPU graphics.
Fourier series in signal processing.
JPEG compression.
Obtaining the best fit element in a vector space of curves given data or other constraints.
Understanding autodiff in JAX.
The mathematical definition of a tensor helps develop intuition for manipulating arrays/tensors in array libraries.
Someone should convert all the examples into C code so it's more intelligible to programmers who are, let's admit, the main audience for something like this.
To the best of my knowledge: Scalars are variables. Vectors are arrays. Matrices are multi dimensional arrays. Addition and multiplication is iteration with operators. Combinations are concatenation. The rest like dot products or norms are just specialized functions.
But it'd be nice to see it all coded up. It wouldn't be as concise, but it'd be readable.
That's basically what you'll get if you pick up a book on 3D game programming. However, progress will come to a halt when you get to things like determinants and eigenvalues that don't show up in core 3D graphics pipelines. You'll have to find other ways to motivate a C version of that part of the curriculum... but I agree, that's a well-worthwhile thing to ask for.
Highly recommend to anyone struggling with linear algebra to check out Linear Algebra Done Right, by Sheldon Axler. Do always keep in mind that some concepts are very verbose, but truly out of necessity. If you're talking about an N by N matrix, you're naturally going to have to distinguish N^2 different elements.
You can go very far without touching matrices, and actually find motivation on this abstract base before learning how it interops with matrices.
A little surprising to me this doesn’t come up the most! Excellent text, and look, you can get the 4th edition (2024) for free as a pdf at http://axler.net.
Wow very nice. Lots of content in here, with no lengthy explanations but useful point-form intuition.
The .epub has very clean math done in HTML (no images), which is a cool way to do things. I've never seen this before. I wonder what the author used to produce the .epub from the .tex?
Always nice to see CC-licensed textbooks. This one looks fairly minimal, not including much of explanation, illustrations, or proofs; I think those are generally useful for the initial study, but this should still work as a cheat sheet, at least.
I love this. It's a great companion to all the resources online like Kahn Academy, 3blue1brown etc. and mathisfun, Wolfram Mathworld and Google's Gemini.
This was one of the reasons for me wanting to study the J programming language. I have a notion AI/ML programming might be better done using array languages.
A little bit too concise IMO. E.g. it doesn't really explain where the normal equations come from and it mentions eigenspaces without ever defining them.
In this book, I cover Functions, Derivatives, Integrals, Multivariable Calculus, and Infinite Processes. In addition, I've included appendices with sketch proofs and applications to Physics, Probability and Statistics, and Computer Science.
Serge Lang's "Short Calculus" is clear and concise, efficiently covering the basics in ~170 pages instead of hundreds of pages like some books. It then has a few more chapters going into a bit more depth but on topics that are also essential if you want to take things further
You will never find a level of "beginner friendly" that suits everyone.
I agree that this is not an ideal start - at least without any further clarification - for beginners but I think it works well for people that already known mathematical notation but not many specifics of linear algebra.
Also, I don't want to be the preacher bringing this into every argument but this is one of the genuinely good uses for AI that I have found. Bringing the beginning of a beginner friendly work down to my level. I can have it explain this if I'm unsure about the specific syntax and it will convey the relevant idea (which is explained in a bit of unnecessary complexity / generality, yes) in simple terms.
I agree. I wouldn’t consider someone who has taken (and remembers) a course in set theory a beginner without some added qualifier.
One of my pet peeves is using mathematical symbols beyond basic arithmetic without introducing them once by name. Trying to figure out what a symbol is and what branch of math it comes from is extremely frustrating.
andrewla|6 months ago
But it is SOOO boring to learn the basic mechanics. There's almost no way to sugar coat it either; you have to learn the basics of vectors and scalars and dot products and matrices and Gaussian elimination, all the while bored out of your skull, until you have the tools to really start to approach the interesting areas.
Even the "why does matrix multiplication look that way" is incredibly deep but practically impossible to motivate from other considerations. You just start with "well that's the way it is" and grind away until one day when you're looking at a chain of linear transformations you realize that everything clicks.
This "little book" seems to take a fairly standard approach, defining all the boring stuff and leading to Gaussian elimination. The other approach I've seen is to try to lead into it by talking about multi-linear functions and then deriving the notion of bases and matrices at the end. Or trying to start from an application like rotation or Markov chains.
It's funny because it's just a pedagogical nightmare to get students to care about any of this until one day two years later it all just makes sense.
srean|6 months ago
In my experience it need not be like that at all.
One can start by defining and demonstrating linear transformations. Perhaps from graphics -- translation, rotation, reflection etc. Show the students that these follow the definition of a linear transformation. That rotating a sum is same as summing the rotated(s).
[One may also mention that all differentiable functions (from vector to vector) are locally linear.]
Then you define adding two linear transformations using vector addition. Next you can define scaling a linear transformation. The point being that the combination can be expressed as linear transformations themself. No need to represent the vectors as R^d, geometric arrows and parallelogram rule would suffice.
Finally, one demonstrates composition of linear transformations and the fact that the result itself is a linear transformation.
The beautiful reveal is that this addition and composition of linear transformations behave almost the same as addition and multiplication of real numbers.
The addition asociates and commutes. The multiplication associates but doesn't necessarily commute. Most strikingly, the operations distributes. It's almost like algebra of real numbers !
Now, when you impose a coordinate system or choose a basis, the students can discover that matrix multiplication rule for themselves over a couple of days of playing with it -- Look, rather than maintaining this long list of linear transformations, I can store it as a single linear transformation in the chosen basis.
tptacek|6 months ago
I learned from Strang, for what it's worth, which is basically LU, spaces, QR, then spectral.
I am really bad at math, for what it's worth; this is just the one advanced math subject that intuitively clicked for me.
joshmarlow|6 months ago
hiAndrewQuinn|6 months ago
Sharlin|6 months ago
jcranmer|6 months ago
It's only difficult if you are wedded to a description of matrices and vectors as seas of numbers that you grind your way through without trying to instill a fuller understanding of what those numbers actually mean. The definition makes a lot more sense when you see a matrix as a description of how to convert one sense of basis vectors to another set of basis vectors, and for that, you first need to understand how vectors are described in terms of basis vectors.
dapper_bison17|6 months ago
Which books or “non-standard” resources would you recommend then, that do a better job?
jameshart|6 months ago
Where vectors do come up it’s usually only Cartesian vectors for mechanics, and only basic addition, scalar multiplication and component decomposition are talked about - even dot products are likely ignored.
ViscountPenguin|6 months ago
boppo1|5 months ago
Can you expand on your experience with this? I do some graphics programming so I understand that applying matrix transformations works, and I've seen the 3blue1brown 'matrices are spreadsheets' explanation (luv me sum spreadsheets), but the intuition still isn't really there. The 'incredibly deep "why matrix multiplication looks that way"' is totally lost on me.
Chinjut|6 months ago
It's a disservice to anyone to tell them "Well, that's the way it is" instead of telling them from the start "Look, these represent linear functions. And look, this is how they compose".
BenFranklin100|6 months ago
(Basic probability / combinatorics is actually pretty cool, but both tend to be glossed over.)
jonahx|6 months ago
Short, simple answer to that question by Michael Penn: https://www.youtube.com/watch?v=cc1ivDlZ71U
Another interesting treatment by Math the World: https://www.youtube.com/watch?v=1_2WXH4ar5Q&t=4s
There's no impenetrable mystery here. Probably just bad teaching you experienced.
unknown|6 months ago
[deleted]
imtringued|6 months ago
Sleaker|6 months ago
127|6 months ago
hinkley|6 months ago
I wonder if these days that would be a better starting point.
winwang|6 months ago
The simplicity(/beauty) of matrix multiplication still irks me though, in the sense of "wow, seriously? when you work it out, it really looks that simple?"
msgodel|6 months ago
photon_lines|6 months ago
WillAdams|6 months ago
https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2x...
jonahx|6 months ago
zkmon|6 months ago
To give an example: A simple multiplication of two numbers is better seen as rotating one of the numbers to be perpendicular to the other and then quantifying the area/volume spanned by them. This gives vector dot product.
While geometry might better address "why", algebra gets into the work of "how to do it". Mathematics in old times, like other branches of science, did not encourage "why". Instead, most stuff would say "This is how to do it, Now just do it". Algebra probably evolved to answer "how to do it" - the need to equip the field workers with techniques of calculating numbers, instead of answering their "why" questions. In this sense, Geometry is more fundamental providing the roots of concepts and connecting all equations to the real world of spatial dimensions. Physics adds time to this, addressing the change, involving human memory of the past, perceiving the change.
rramadass|5 months ago
hinkley|6 months ago
csunoser|6 months ago
Instead, it is replaced with a red error box saying: [ Unable to render expression. ]
I wonder if there is an artificial limit for the amount of latex expression that can rendered per page.
asplake|6 months ago
barrenko|6 months ago
griffzhowl|6 months ago
Be aware that Lang has another book, called just "Linear Algebra", which is more theoretical.
rramadass|6 months ago
Pair it with Edgar Goodaire's Linear Algebra: Pure & Applied and you can transition nicely from intuitive geometric to pure mathematical approach. The author's writing style is quite accessible.
Add in Introduction to Applied Linear Algebra: Vectors, Matrices, and Least Squares by Stephen Boyd et al. and you are golden. Free book available at https://web.stanford.edu/~boyd/vmls/
cybrox|6 months ago
It's free, including exercises and an (also free) solutions book.
atrettel|6 months ago
Thanks to everyone recommending books too!
GabriDaFirenze|6 months ago
dkga|6 months ago
eftychis|6 months ago
Starts from linear transformations and builds from there.
jonahx|6 months ago
https://www.youtube.com/watch?v=yAb12PWrhV0&list=PLBQcPIGljH...
It starts with the axioms of being able to draw one line parallel to another, and a line through point, and builds up everything from there. No labeled Cartesian axes. Just primitive Euclidean objects in an affine space.
tamnd|6 months ago
rossant|6 months ago
ddavis|6 months ago
unknown|6 months ago
[deleted]
jean_lannes|6 months ago
defrost|6 months ago
Machine learning, LLMs, RSA, etc.
It's generally useful for multivariate statistics, 3D flies (insects), in 3D space, clustering about a narrow slanting plane of light from a window slit are points that can be projected onto "the plane of best fit" - nominally the slanting plane of light.
That right there is a geometric picture of fitting a line, a plane, a lower order manifold, to a higher order data set, the errors (distance from plane), etc. and something of what Singular Value Decomposition is about (used for image enhancement, sharpening fuzzy data, etc).
The real test of applications is what kind of work do you see yourself doing? - A quick back read suggests your currently a CS student, so all unfocused potential for now (perhaps).
JBits|6 months ago
Linear transforms (such as rotations and displacements) in GPU graphics.
Fourier series in signal processing.
JPEG compression.
Obtaining the best fit element in a vector space of curves given data or other constraints.
Understanding autodiff in JAX.
The mathematical definition of a tensor helps develop intuition for manipulating arrays/tensors in array libraries.
Transition matrices of a Markov chain.
PageRank.
russellbeattie|6 months ago
To the best of my knowledge: Scalars are variables. Vectors are arrays. Matrices are multi dimensional arrays. Addition and multiplication is iteration with operators. Combinations are concatenation. The rest like dot products or norms are just specialized functions.
But it'd be nice to see it all coded up. It wouldn't be as concise, but it'd be readable.
CamperBob2|6 months ago
eliaskickbush|6 months ago
You can go very far without touching matrices, and actually find motivation on this abstract base before learning how it interops with matrices.
akww|6 months ago
ivansavz|6 months ago
The .epub has very clean math done in HTML (no images), which is a cool way to do things. I've never seen this before. I wonder what the author used to produce the .epub from the .tex?
ivansavz|6 months ago
defanor|6 months ago
bobajeff|6 months ago
Edit: Also the mathematics stackexchange.
anthk|6 months ago
http://t3x.org/klong/index.html
rramadass|6 months ago
Some books for studying Mathematics using J are listed here - https://code.jsoftware.com/wiki/Books
vismit2000|6 months ago
ziedaniel1|6 months ago
michelpp|6 months ago
snarfy|6 months ago
tekknolagi|6 months ago
m3047|6 months ago
mugamuga|6 months ago
tamnd|6 months ago
In this book, I cover Functions, Derivatives, Integrals, Multivariable Calculus, and Infinite Processes. In addition, I've included appendices with sketch proofs and applications to Physics, Probability and Statistics, and Computer Science.
griffzhowl|6 months ago
marginatum|6 months ago
rw_panic0_0|6 months ago
cybrox|6 months ago
I agree that this is not an ideal start - at least without any further clarification - for beginners but I think it works well for people that already known mathematical notation but not many specifics of linear algebra.
Also, I don't want to be the preacher bringing this into every argument but this is one of the genuinely good uses for AI that I have found. Bringing the beginning of a beginner friendly work down to my level. I can have it explain this if I'm unsure about the specific syntax and it will convey the relevant idea (which is explained in a bit of unnecessary complexity / generality, yes) in simple terms.
relaxing|6 months ago
One of my pet peeves is using mathematical symbols beyond basic arithmetic without introducing them once by name. Trying to figure out what a symbol is and what branch of math it comes from is extremely frustrating.