Live data from Hacker News

Matrices can be your friends (2002)

sjbaker.org

101–110 of 115 posts

Re: Matrices can be your friends (2002)

#101

Earlier quoted context omitted.

OK, now what?

A matrix is just a list of where a linear map sends each basis element (the nth column of a matrix is the output vector for the nth input basis vector). Lots of things are linear (e.g. scaling, rotating, differentiating, integrating, projecting, and any weighted sums of these things). Lots of other things are approximately linear locally (the derivative if it exists is the best linear approximation. i.e. the best mat…

Translation to something ordinary humans can understand (I personally have strong distaste for the basis vector/basis element approach):

Linear transformations 101:

If the scalar function f(x)=y is linear, what can it do?

We can now either pretend that canonical forms do not exist, or we just use them anyway and make some people angry. The former way is very long and I don't have much time so angry people are a small price to pay.

There is one way to describe f and that is as f(x)=ax=y.

Now what if we have multiple inputs f(a,b)=y? We can just have two parameters. f(a,b) = c*a+d*b = y. I can already hear the boos.

Note that c*a+d*b has the same form as a dot product. A linear function with multiple inputs and multiple outputs can be described as: f(x) = a^Tx = y, where x is a vector of dimension 2 containing the original a and b, and a is a vector containing c and d. Multiplication with a row vector is a linear transformation.

Now what if we do the opposite? One input, multiple outputs? It's the same but with column vectors! f(x) = xa = y where a is a vector and y is a vector.

Now what if we do both? Multiple inputs and multiple outputs?? You just stack either your row vectors or the column vectors! Now you have a matrix as your parameter for f(x)=Ax=y!

The best part? I've already given four examples of linear transformations including the dual space. Having canonical representations makes explanations very easy.

Re: Matrices can be your friends (2002)

#102

Earlier quoted context omitted.

I took a linear algebra class, as well as many others. It didn't work. Most math classes I've taken granted me some kind of intuition for the subject material. Like I could understand the concept independent from the name of the thing. In linear algebra, it was all a series of arbitrary facts without reason for existing. I memorized them for the final exam, and probably forgot them all the next day, as they weren't a…

You might like to try this website that explains it quite intuitively: https://betterexplained.com/articles/matrix-multiplication/

thank you. this is the shit

Re: Matrices can be your friends (2002)

#103

Earlier quoted context omitted.

Do you have anything I can read about that? I'm definitely on the spectrum and have whatever the opposite of aphantasia is, I can see things very clearly in my head

"In Experiment 2 we have shown that people with aphantasia report higher AQ scores (more traits associated with autism than controls), and fall more often within the range suggestive of autism (≥32)." https://www.sciencedirect.com/science/article/abs/pii/S10538...

Interesting, I guess I'm an outlier then

Re: Matrices can be your friends (2002)

#104

Earlier quoted context omitted.

You might like to try this website that explains it quite intuitively: https://betterexplained.com/articles/matrix-multiplication/

thank you. this is the shit

I recently did a university course in linear algebra. It was incredibly easy to do matrix multiplications because of this guy. Cant praise him enough.

Re: Matrices can be your friends (2002)

#105
post #72

Earlier quoted context omitted.

I took a linear algebra class, as well as many others. It didn't work. Most math classes I've taken granted me some kind of intuition for the subject material. Like I could understand the concept independent from the name of the thing. In linear algebra, it was all a series of arbitrary facts without reason for existing. I memorized them for the final exam, and probably forgot them all the next day, as they weren't a…

I think this is pretty instructor-dependent. I had two LinAlg courses, and in the first, I felt like I was building a great intuition. In the second, the instructor seemed to make even the stuff I previously learned seem obtuse and like "facts to memorize." Maybe linear algebra is more instructor-dependent, since we have fewer preexisting concepts to build on?

Can confirm. My university lecturer walked us through determinants properly and - thank god! - I finally understood what they actually did. I’d been studying linear algebra for a few years by myself and never found an answer explanation that my lecturer gave.

Re: Matrices can be your friends (2002)

#106
post #97
post #59

Earlier quoted context omitted.

Recently graduated math student here. The definition of the "vec" operator which turns a matrix into a vector works like this, stacking up columns rather than rows. https://en.wikipedia.org/wiki/Vectorization_(mathematics)

Really wonder who in his right mind, who can also read a book, would decide to do so in order to enumerate the sequences of items…

Vectors are traditionally written as columns, so just writing all the columns in left-to-right order into a bigger column makes sense. The confusing bit isn't the ordering of the elements in a matrix, it's that someone decided to write vectors as columns to begin with!

Re: Matrices can be your friends (2002)

#107
post #89

Earlier quoted context omitted.

It sounds like you have routed around your spatial visualization deficit, but that just proves the importance of alternate cognitive strategies rather than indicate that such an aptitude or deficit doesn’t ceteris paribus impact mathematical achievement. https://en.wikipedia.org/wiki/Spatial_visualization_ability You probably are high g (iq), which has, historically at least, dominated other factors in determining ov…

I took some sort of IQ test when I was a kid and there was an entire section that was "if you rotate this object around that axis, it matches which of the followin g options". Try as I might, I can't picture this in my head (picturing anything other than a sphere or a cube is tough) but I found that I could look at the options and logically exclude them in a very tedious way by inspection. It's one of the reasons I l…

You must hate those fancy new style captchas where you rotate the object. I’ve never considered the fairness and discriminatory aspect of captchas until now. I wonder if in the future eternal September will finally end as increasingly complex captchas act as a sort of poll test on posting.

Re: Matrices can be your friends (2002)

#108
post #89

Earlier quoted context omitted.

I took some sort of IQ test when I was a kid and there was an entire section that was "if you rotate this object around that axis, it matches which of the followin g options". Try as I might, I can't picture this in my head (picturing anything other than a sphere or a cube is tough) but I found that I could look at the options and logically exclude them in a very tedious way by inspection. It's one of the reasons I l…

You must hate those fancy new style captchas where you rotate the object. I’ve never considered the fairness and discriminatory aspect of captchas until now. I wonder if in the future eternal September will finally end as increasingly complex captchas act as a sort of poll test on posting.

no, if I can see the object rotated then I can visually compare features. It's mentally rotating an object which I can't do easily.

Re: Matrices can be your friends (2002)

#109
post #3

I don't think there's any mathematical reason to lay out the elements in memory that way. Sure given no context I would probably use i = row + n col as index, but it doesn't really matter much me. If I had to pick between a matrix being a row of vectors or a column of covectors, I'd pick the latter. And M[i][j] should be the element in row i column j, which is nonnegotiable.

I think the fundamental reason it's laid out like this is because it results in elements with the same major index being close to each other for caching. The assumption is that users will change their minor index much more often than the major one while accessing data, which means that cache prefetching will just work.

Obviously there are situations where this breaks down, but if you have to pick one way to do it I think this makes more sense.

Re: Matrices can be your friends (2002)

#110
post #81

Earlier quoted context omitted.

SO(3) contains all of the orthogonal 3x3 matrices of determinant 1. If you are dealing with rigid bodies rotated though the origin like with the product of linear translations you can avoid the problem. At least with an orthonormal basis R^3 with an orthogonal real valued 3x3 matrix real entries which, where the product of it with its transpose produces the identity matrix and with determinant 1 But as soon as you ar…

The belt trick is about smoothly mapping paths through SO(3) to each other, not about if any point in SO(3) is reachable from any other point. I think you are confusing the notion of 'simple-connected' with just 'connected'.

No, the belt trick is about the fundamental group of SO(n) where n>2 is Z_2and the fact that a 4pi rotation is homotopic to the identity.

It is often introduced as RP^3 being isomorphic to SO(3) and as RP^3 is not simply being connected thus SO(3) cannot be.

They don’t explain why until students have the ability to deal with 4D 3-spheres being projected on 4D hyperplanes.

You can build an intuition with a 2-sphere being projected through the origin onto a 2d plane. This will demonstrate how the antipodes are not uniquely identified.

If you go from SU(2), which is the double cover of SO(3) you can use basic algebra to reduce it to a^2+b^2+c^2+d^2=1 where a,b, and c are your free variables and figure it out.

It works well without that complexity at lower levels because people are actually rotating the clopen set, which is only allowed to be the entire body or the empty set.

The 4pi symmetry applies to the topological properties of neurons and the plate trick in the real world because you are translating a portion or a property of the body and not the entire body.

Same thing on how they don’t introduce Tori topology when using Euler angles.

Pick up basically any topology or Lie algebra book targeted at first year grad students and the topic will be covered.

Bredon’s Topology and Geometry is one I personally like.

Post reply on HN