Column Vectors vs. Row Vectors
Abstractly, a vector is neither a row nor a column. An n-dimensional vector is an ordered collection of n coordinates. An m by n matrix is an m-dimensional vector of n-dimensional vectors.<p>But when you define a matrix in most programming languages you can only really write it like this:<p><pre><code>    mat = [
        [1,2,3],
        [4,5,6],
        [7,8,9]
    ]
</code></pre>
Note that the inner vectors are laid out as rows, and the outer vector (the matrix) is laid out as a column.<p>Some languages have fancy syntax that omits the need for braces. But for those that don&#x27;t, this is clearly an array of 3 arrays of 3 ints. It&#x27;s only intuitive to think of this as an array of rows given how it&#x27;s laid out visually.<p>I also think in that context it would make more sense to index it as mat[row][col], or in other words row major indexing.<p>Because of that, it also makes sense to store the mat row-major, that is, laid out in memory as [1,2,3,4,5,6,7,8,9] so that mat[row][col] becomes mem[row*3 + col].<p>This is also how C does it. I think it was a mistake for OpenGL to break with that C convention given how close the relationship between C and OpenGL is. Mathematicians be damned.