number in the ith row and the jth column. In the computer memory, all elements are stored linearly using contiguous addresses. Therefore, in order to store a two-dimensional matrix a, two dimensional address space must be mapped to one-dimensional address space. In the computer's memory matrices are stored in either row-major or column-major order form. In 3D graphics The choice of representation for 4×4 matrices commonly used in 3D graphics affects the implementation of matrix/vector operations in systems with packed SIMD instructions: Row major With row-major matrix order, it is easy to transform vectors using dot product operations, since the coefficients of each component are sequential in memory. Consequently, this layout may be desirable if a processor supports dot product operations natively. It is also possible to efficiently use a '3×4' affine transformation matrix without padding or awkward permutes. Column major With column-major order, a "matrix × vector" multiply can be implemented with vectorized multiply-add operations, if the vector's components are broadcast to each SIMD lane. It is also easy to access the basis vectors represented by a transformation matrix as individual column vectors, as these are contiguous in memory. See also Row- and column-major order Sparse matrix Skyline matrix Locality of reference References External links a description of sparse matrices in R. Matrices Arrays