Tell me more ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How are matrices usually represented within computer systems? For example, Google stores extremely large matrices on their servers for maintaining an index of web pages and determining the importance of those web pages.

Not necessarily in Google's case, in what data format are "living" matrices (read: not stuck in code) commonly stored?

share|improve this question
A useful keyword here might be "sparse matrix". – Zhen Lin Feb 25 '12 at 16:44
I think this is off topic, perhaps some other site on the SE network would fit better. – Asaf Karagila Feb 25 '12 at 17:17
1  
Perhaps you're right, I'll try StackOverflow – Calvin Froedge Feb 25 '12 at 17:27
3  
Having realized this, how about deleting your question? I think you have the power to do so, at least so long as nobody has answered it. (BTW, I doubt very much that google's way of storing their matrix is “typical” in any way, shape or form.) – Harald Hanche-Olsen Feb 25 '12 at 17:55
5  
Or try here: scicomp.stackexchange.com – yasmar Feb 25 '12 at 18:15
show 1 more comment

closed as off topic by Asaf Karagila, jspecter, Kannappan Sampath, Alex Becker, J. M. Mar 24 '12 at 14:10

Questions on Mathematics Stack Exchange are expected to relate to math within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

2 Answers

There are two main ways of storing matrices in computer RAM. Those are columnwise and rowwise. Columnwise way works by decomposing matrix to columns and store subsequent element of columns underincreasing memory locations np.:

$$[c_{11}, c_{12}, c_{13}], [c_{21}, c_{23}, c_{24}]$$

is stored in continues block of memory like this: $$c_{11}, c_{12}, c_{13}, c_{21}, c_{23}, c_{24}$$

share|improve this answer
2  
These are storage schemes for dense matrices. – user2468 Feb 25 '12 at 20:18

There is a matrix data structure for seemingly every matrix algorithm. Wikipedia LAPACK points us to a list at Netlib of the various matrix types in that software package, each of which has its particular data structure. The "packed" types are sparse matrices. In addition, when finding multiple particular solutions with the same matrix, it will first be transformed into an appropriate one of many matrix decompositions.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.