Live data from Hacker News

Relearning Matrices as Linear Functions

dhruvonmath.com

61–70 of 95 posts

Re: Relearning Matrices as Linear Functions

#61

It took until I started learning differential geometry in the form of General Relativity to arrive at this insight, even though I feel like the notion of a matrix as a linear map was drilled in pretty thoroughly. The notion of matrix multiplication as function composition was presented almost as an interesting side effect of matrix multiplication -- that is, multiplication by these rules came first, and, hey, look, t…

I found this series by eigenchris helpful to understand tensors https://www.youtube.com/watch?v=8ptMTLzV4-I&list=PLJHszsWbB6...

Re: Relearning Matrices as Linear Functions

#62
post #50

FWIW, I was told that matrices are linear maps pretty early on in my education. Are there any college level linear algebra / matrix calculations courses that don't tell students about that?

Sadly, there are. Or at least were. When I went through university the standard set of courses was a Calculus course that was mostly about derivatives, a second one that was mostly about integrals, a third Calculus course that was about multi-variable Calculus. That third course necessarily had to teach matrices, and taught it as rote calculations. There was a follow-up differential equations course which refreshed p…

For me also. It is still that way in many programs, that I can tell.

Re: Relearning Matrices as Linear Functions

#63
post #26

Earlier quoted context omitted.

Shearings cannot be represented in this way.

Yes they can. This follows from singular value decomposition. Let S be the matrix representation of a shear transformation. There exist rotation matrices R, B and a diagonal matrix D such that S = RDC , where C is the transpose of B . D is the matrix representation of a scaling transformation and R, B are the matrix representations of rotation transformations. Since S is a product of rotation and scaling matrices, it…

Reminds me of the old "hack" to use three shear transformations to rotate an image.

The idea being that a shear is relatively much faster on weaker CPUs, relative to doing a "proper" (reverse mapping) rotation.

A nice write-up can be found here: https://www.ocf.berkeley.edu/~fricke/projects/israel/paeth/r...

Re: Relearning Matrices as Linear Functions

#64

Earlier quoted context omitted.

That was exactly my experience. Struggled with matrices theory at uni doing some bullshit exercises but started to grasp the topic only when I needed to apply some linear transformation in a game

I think the situation has improved somewhat as visualization tools have become easier to use. We made this simple visual [1] to help people understand what they might get out of linear algebra, and it was easy enough for some statisticians to accomplish. [1] https://datasciencetexts.com/subjects/linear_algebra.html

Nice site, but it's worth giving some info about yourself on the site and why I should trust your advice, given that these books are expensive.

In elementary machine learning, you give two options. You should really include introduction to statistical learning by the same folks who wrote ESL. It's a great book that covers the same ground as ESL but with less math.

Re: Relearning Matrices as Linear Functions

#65
post #15

Hey OP here! When I first was introduced to matrices (high school) it was in the context of systems of equations. Matrices were a shorthand for writing out the equations and happened to have interesting rules for addition etc. It took me a while to think about them as functions on their own right and not just tables. This post is my attempt to relearn them as functions which has helped me develop a much stronger intu…

It's a nice article - you focus on matrices as a kind of operator that takes a vector as input and produces another vector. This is one side of the coin. The other interpretation is that matrices are functions that take two arguments (a row vector and a column vector) and produce a real number. IMO this interpretation opens the door to deeper mathematics. It links in to the idea that a column vector is a functional o…

That didn’t make any sense to, and I work with matrices every day. Are you trying to describe a dot product?

Re: Relearning Matrices as Linear Functions

#66
post #65

Earlier quoted context omitted.

It's a nice article - you focus on matrices as a kind of operator that takes a vector as input and produces another vector. This is one side of the coin. The other interpretation is that matrices are functions that take two arguments (a row vector and a column vector) and produce a real number. IMO this interpretation opens the door to deeper mathematics. It links in to the idea that a column vector is a functional o…

That didn’t make any sense to, and I work with matrices every day. Are you trying to describe a dot product?

I haven't been involved in abstract math in close to a decade, but I think it's a description of the (general) inner product. So, a generalization of the dot product. The classic dot product is that operation with the identity matrix. My understanding is that using matrices that way is very common in physics.

Re: Relearning Matrices as Linear Functions

#67
One of the things that always irked me about the term "linear transformation" is it doesn't include affline transformations, which is funny because back in elementary school, you learn that a "linear equation" looks like Mx + b. Of course, the article states the term "linearity" when talking vector spaces (or modules) means linearity in arguments, while the term linear for a child in school means "something like a line on graph paper", and this is yet another example of terminology in the way mathematics is taught, possibly for historical reasons, that leads to even more confusion.

PS. incase you didn't know, affline transformations are not linear:

  f(x) = mx + b =>
  f(x+y) = m(x+y) + b /= mx+b + my+b = f(x) + f(y),
  f(cx) = c m x + b /= c(mx + b) = c f(x)

Re: Relearning Matrices as Linear Functions

#68
post #66
post #65

Earlier quoted context omitted.

That didn’t make any sense to, and I work with matrices every day. Are you trying to describe a dot product?

I haven't been involved in abstract math in close to a decade, but I think it's a description of the (general) inner product. So, a generalization of the dot product. The classic dot product is that operation with the identity matrix. My understanding is that using matrices that way is very common in physics.

Any example of some practical use that would make it easier to understand?

Re: Relearning Matrices as Linear Functions

#69
post #64

Earlier quoted context omitted.

I think the situation has improved somewhat as visualization tools have become easier to use. We made this simple visual [1] to help people understand what they might get out of linear algebra, and it was easy enough for some statisticians to accomplish. [1] https://datasciencetexts.com/subjects/linear_algebra.html

Nice site, but it's worth giving some info about yourself on the site and why I should trust your advice, given that these books are expensive. In elementary machine learning, you give two options. You should really include introduction to statistical learning by the same folks who wrote ESL. It's a great book that covers the same ground as ESL but with less math.

Thanks for the feedback! ISL is indeed a good option, especially for the more application-oriented; it's on the todo list!

Re: Relearning Matrices as Linear Functions

#70
post #58

Earlier quoted context omitted.

The metric?

A metric is a distance function. Defining a metric on a space is one of ways you create a topology. I'm not sure what the parent means by the metric being the identity function, however. The Euclidean metric is basically the hypotenuse of a triangle parameterized by two vectors. The adjacent and opposite sides of the triangle are measured to be the Euclidean norm of each vector (their length), and the hypotenuse is t…

In differential geometry the metric [1] is a tensor that defines the relationship of vectors in the space to vectors in the tangent space. The identity function as a metric means that you are in a locally flat space where geodesics (the path taken by traveling in a given direction) are straight lines.

A metric in a traditional metric space is a global distance function; you can use the metric tensor in a Riemannian manifold to allow integration to find the distance between two points.

[1] https://en.wikipedia.org/wiki/Metric_tensor

Post reply on HN