Remix.run Logo
Viliam1234 2 hours ago

> 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.

yoda222 23 minutes ago | parent | next [-]

Not a mathematician, just an engineer that used matrix a lot (and even worked for MathWorks at one point), I would say that most mathematicians don't care. Matrix is 2D, they don't have a good way to be laid out in 1D (which is what is done here, by giving them linear indices). They should not be represented in 1D.

The only type of mathematicians that actually care are: - the one that use software where using one or the other and the "incorrect" algorithm may impact the performance significantly. Or worse, the one that would use software that don't use the same arbitrary choice (column major vs row major). And when I say that they care, it's probably a pain for them to think about it. - the one that write these kind of software (they may describe themselves as software engineer, but some may still call themselves mathematicians, applied mathematicians, or other things like that).

Now maybe what the author wanted to say is that some language "favored by mathematician" (Fortran, MATLAB, Julia, R) are column major, while language "favored by computer scientist" (C, C++) are row major

account42 2 hours ago | parent | prev | next [-]

Not a mathematician, but programmers definitely don't agree on whether matrices should be row-major or column-major.

vintermann an hour ago | parent [-]

I'm surprised we even agree that they should be top-down.

morcus 31 minutes ago | parent | prev | next [-]

Most fields of math that use matrices don't number each element of the matrix separately, and if they do there will usually be two subscripts (one for the row number and one for the column number).

Generally, matrices would be thought in terms of the vectors that make up each row or column.

gus_massa 2 hours ago | parent | prev [-]

Mathematician here. I never heard that.

(In many branches the idea is that you care about the abstract linear transformation and properties instead of the dirty coefficients that depend on the specific base. I don't expect a mathematician to have an strong opinion on the order. All are equivalent via isomorphism.)