Live data from Hacker News

Matrices can be your friends (2002)

sjbaker.org

111–115 of 115 posts

Re: Matrices can be your friends (2002)

#111
post #59

> Mathematicians like to see their matrices laid out on paper this way (with the array indices increasing down the columns instead of across the rows as a programmer would usually write them). Could a mathematician please confirm of disconfirm this? I think that different branches of mathematics have different rules about this, which is why careful writers make it explicit.

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)

[deleted]

Re: Matrices can be your friends (2002)

#112
post #97

Earlier quoted context omitted.

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!

The plus side is that you can use row vectors with matrices acting from the right, and keep the traditional matrix multiplication. Rare case of two wrongs creating a right.

Re: Matrices can be your friends (2002)

#113
post #97

Earlier quoted context omitted.

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!

It took me long while to stop being afraid when people wrote vec^T where ^T means transposed. I was like "but why can we do that", and the mathematician answered - "well, because it is just more convenient this time". o_O

Re: Matrices can be your friends (2002)

#114

Earlier quoted context omitted.

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 be…

I should add that “connectedness” is a local property that has to be everywhere.

The antipode pairs don’t have unique identities they are identified together, but IIRC they are never close enough to break that local condition of connectivity.

You could use the unit circle and a line at x=2, connecting points of that line through the origin and see how that identification of two points on the unit circle happens with that one line.

That may help but it wouldn’t explain the issues with so(3) that results in a 720 deg rotation being equivalent to a 0 deg rotation.

It would explain the point at infinity concepts as the poles are indescribable with a line from X=2 through the origin.

Re: Matrices can be your friends (2002)

#115
post #30

Earlier quoted context omitted.

I'm a mathematician. It's kind of a strange statement since, if we are talking about a matrix, it has two indices not one. Even if we do flatten the matrix to a vector, rows then columns are an almost universal ordering of those two indices and the natural lexicographic ordering would stride down the rows.

I assume they're talking about how when multiplying by a matrix by a vector, it's more natural to think of the matrix as a collection of columns than as a collection of rows, and to think of the vector as a column vector. That layout is a nearly universal convention in applied practice such as statistics. Readers would be very very confused if you flipped it the other way. The irony is that "programmers" are much mor…

It depends which side you are doing the multiplication on? Most linear algebra textbooks work matrix-vector, where the vector is a column vector. In that arrangement, the resulting vector is formed by dot products of the rows of the matrix with the vector.

On the other hand, you see vector-matrix multiplication a lot in other places, for example, the Markov chain literature. There, the vector is a row vector and the resulting vector is formed by dot products of the columns of the matrix with the original vector.

Post reply on HN