Hacker News new | ask | show | jobs
by contravariant 1326 days ago
That's as may be but M[i][j] and Mij still refer to the same element.
1 comments

This doesn't tell us anything about memory layout though.

If a mathematician actually has to write out their matrices, they do it on a piece of paper. Because it is a 2D medium, the each element can have two "neighbors" on in the next row, and one in the next column.

If they do their math on a computer, they have the same problem as the rest of us -- but, they probably just use BLAS, which is typically column major. Although, I think some of the more modern BLAS spinoffs accept a layout option:

https://www.intel.com/content/www/us/en/develop/documentatio...