News for hackers. Stuff that matters.
Re:Matrices can be your Friends by zaik on Monday October 13, 2025 @12:59PM (#45570665)
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)

Re:Matrices can be your Friends by larodi on Tuesday October 14, 2025 @04:10AM (#45577455)
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…
Re:Matrices can be your Friends by SAI_Peregrinus on Tuesday October 14, 2025 @10:46AM (#45580726)
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 by bmacho on Wednesday October 15, 2025 @11:01AM (#45593683)
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 by larodi on Wednesday October 15, 2025 @12:32PM (#45595071)
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