ajschumacher / ajschumacher.github.io

blog
http://planspace.org/
20 stars 21 forks source link

linear algebra #279

Open ajschumacher opened 2 years ago

ajschumacher commented 2 years ago

Strang's Linear Algebra and Its Applications (Fourth Edition) says:

"In fact, there is only one possible rule [for matrix multiplication], and I am not sure who discovered it. It makes everything work. It does not allow us to multiply every pair of matrices. If they are square, they must have the same size. If they are rectangular, they must not have the same shape; the number of columns in A has to equal the number of rows in B. Then A can be multiplied into each column of B."

This makes it seem like matrix multiplication is some big puzzle with no natural interpretation; no motivating metaphor. But there is one! The one from Category Theory for the Sciences!

ajschumacher commented 2 years ago

This thing visualizes two-by-two matrixes as vector fields: https://www.geogebra.org/m/m83UC2Vn

Kind of neat?

(One usually scales down these vectors; keeping their direction but not the length. Otherwise the plot would be a mess of overlapping arrows.) https://math.stackexchange.com/questions/1021998/how-do-you-draw-a-direction-field-for-2x2-matrix

ajschumacher commented 2 years ago

The ref in Spivak's Category Theory for the Sciences is in 3.2.2.4, page 69: "[The composite span] will correspond to the usual multiplication of an |A| x |B| matrix by a |B| x |C| matrix, resulting in a |A| x |C| matrix."

ajschumacher commented 2 years ago

The Category of Matrices I https://unapologetic.wordpress.com/2008/06/02/the-category-of-matrices-i/

"In this case, matrices will be the morphisms"

The Category of Matrices II https://unapologetic.wordpress.com/2008/06/03/

The Category of Matrices III https://unapologetic.wordpress.com/2008/06/23/

The Category of Matrices IV https://unapologetic.wordpress.com/2008/06/24/

"What the theorem tells us is that none of this matters. We can translate problems from the category of matrices to the category of vector spaces and back, and nothing is lost in the process."

ajschumacher commented 2 years ago

Spivak recommends: https://www.youtube.com/watch?v=UWWdz3Nw8y0

https://graphicallinearalgebra.net/ is Pawel Sobocinski's cool site

something there links to Essence of linear algebra https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab

ajschumacher commented 2 years ago

from 2a - Pawel Sobocinski, Tutorial 2, "Graphical linear algebra"

IMG-5940 IMG-5941 IMG-5942 IMG-5943

That last is around the time of:

"So the way we normally teach linear algebra to students is we write down the formula for multiplying a matrix. Where does this formula come from? I mean everyone learns it in first year, right, so we don't question it, but it's actually very difficult to explain. I mean I have to teach linear algebra to first-year students and, you know, it takes them quite a bit of time to get it. And they learn it, they get it by memorizing, you know, these kinds of algorithms in their heads, but this is not the way we should teach maths. We shouldn't teach maths, you know, by telling people to memorize algorithms."

"I think string diagrams are more closely connected to reality."

ajschumacher commented 2 years ago

https://en.wikipedia.org/wiki/PROP_(category_theory)

Screen Shot 2021-08-29 at 2 44 47 PM

it strikes me, therefore, that people are rather rash to say "vectors are matrices"... a matrix is a morphism, a vector is an object. It happens that results come out fine if you sort of flex back and forth, making "row vectors" and "column vectors"... but a vector itself doesn't have an orientation and isn't the same thing as either matrix representation

ajschumacher commented 2 years ago

In y=Xb, it makes more intuitive sense to think about pushing a row of X through b than it does pushing b through X, because what even is that space really? Or maybe it’s okay if we keep the input/output interpretation in mind? Hmm…

And is this anything? https://www.google.com/amp/s/amp.reddit.com/r/learnmachinelearning/comments/8dkm3x/linear_regression_vs_matrix_factorization/ “Linear Regression vs Matrix Factorization”

ajschumacher commented 2 years ago

Calculational Proofs for Relational Graphical Linear Algebra (english) https://www.youtube.com/watch?v=ptWK8ehQvyw&t=3379s João Paixão

hmm! sounds like there's:

ajschumacher commented 2 years ago

"I cannot believe that anything so ugly as multiplication of matrices is an essential part of the scheme of nature."

Eddington https://en.wikipedia.org/wiki/Arthur_Eddington page 39 Relativity Theory of Electrons and Protons, Cambridge University Press, 1936.

as included in: Typing linear algebra: A biproduct-oriented approach https://arxiv.org/abs/1312.4818

ajschumacher commented 2 years ago

"Determinants are difficult, non-intuitive, and often defined without motivation."

Sheldon Axler, "Down With Determinants!" https://www.maa.org/sites/default/files/pdf/awards/Axler-Ford-1996.pdf https://www.axler.net/DwD.html

ajschumacher commented 2 years ago

oh also: c8948588ad3d4f354d49b6faf10fb9db8ed18160

so:

ajschumacher commented 1 year ago

a unitary matrix preserves the length of all input vectors

ajschumacher commented 1 year ago

Matrices and graphs "The single most undervalued fact of linear algebra: matrices are graphs, and graphs are matrices" https://thepalindrome.substack.com/p/matrices-and-graphs

This only considers square matrices, I think, but it's kind of neat applications of the flow metaphor...

ajschumacher commented 10 months ago

https://coffeemug.github.io/spakhm.com/posts/01-lingalg-p1/linalg-p1.html

ajschumacher commented 10 months ago

Also in my post, but surfacing here:

“I cannot believe that anything so ugly as multiplication of matrices is an essential part of the scheme of nature.” (Arthur Eddington, 1936)

ajschumacher commented 2 months ago

Matrix mult in numpy...

ajschumacher commented 1 month ago

comic about it being natural to not commute: https://www.smbc-comics.com/comic/commute-2

ajschumacher commented 1 month ago

Gilbert Strang presents his "Five Factorizations of a Matrix: A Vision of Linear Algebra" https://youtu.be/nTwRjQ4xqUc

ajschumacher commented 1 month ago

see also: #284 matrix factorization

ajschumacher commented 1 month ago

The unreasonable effectiveness of linear algebra https://youtu.be/Rqv3cXt8ZNU?si=iRRjvlDRbRZN74XC

And from the comments there:

"If you can reduce a mathematical problem to a problem in linear algebra, you can most likely solve it, provided you know enough linear algebra". This was a quote in the preface of Linear Algebra and its Applications by the great mathematician Peter D. Lax. It was my first book on the subject and that sentence stuck with me ever since

ajschumacher commented 1 month ago

Eigenvalues: intrinsic values, like eigentlich is actually, eigeninteresse is self-interest, etc.

Alternatives: pure stretch factors

ajschumacher commented 1 week ago

This isn't bad, though I take issue with "spreadsheets" being the big reveal... https://betterexplained.com/articles/linear-algebra-guide/

ajschumacher commented 1 week ago

Linear Algebra: Math for Multiple Dimensions

Linear Algebra: Mathematics for Multiple Dimensions

Linear Algebra: Multiple Dimensions of Data

ajschumacher commented 1 week ago

somebody made a notional "AP Linear Algebra" mockup! https://www.reddit.com/r/APStudents/comments/14mzxr4/concept_plan_for_ap_linear_algebra/

ajschumacher commented 19 hours ago

basketball scoring example: