Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Matrix representation
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{About|the layout of matrices in the memory of computers|the representation of [[group (mathematics)|groups]] and [[algebra over a field|algebras]] by matrices in linear algebra|representation theory}} [[File:Row_and_column_major_order.svg|thumb|upright|Illustration of [[row- and column-major order]] ]] '''Matrix representation''' is a method used by a [[computer language]] to store column-vector [[matrix (mathematics)|matrices]] of more than one dimension in [[computer storage|memory]]. [[Fortran]] and [[C (programming language)|C]] use different schemes for their native arrays. [[Fortran]] uses "Column Major", in which all the elements for a given column are stored contiguously in memory. [[C (programming language)|C]] uses "Row Major", which stores all the elements for a given row contiguously in memory. [[LAPACK]] defines various matrix representations in memory. There is also [[Sparse matrix representation]] and [[Morton-order matrix representation]]. According to the documentation, in [[LAPACK]] the [[unitary matrix]] representation is optimized.<ref name=utexas>{{cite web|title=Representation of Orthogonal or Unitary Matrices|url=http://www.ma.utexas.edu/documentation/lapack/node117.html|publisher=University of Texas at Austin|accessdate=14 September 2011}}</ref><ref>{{cite journal |first=R. |last=Lehoucq |title=The Computation of Elementary Unitary Matrices |journal=ACM Transactions on Mathematical Software |volume=22 |issue=4 |year=1996 |pages=393β400 |doi=10.1145/235815.235817 |hdl=1911/101830 |hdl-access=free }}</ref> Some languages such as [[Java programming language|Java]] store matrices using [[Iliffe vector]]s. These are particularly useful for storing [[irregular matrix|irregular matrices]]. Matrices are of primary importance in [[linear algebra]]. == Basic mathematical operations == {{Main|Matrix (mathematics)#Basic operations}} An m Γ n (read as m by n) order [[Matrix (mathematics)|matrix]] is a set of numbers arranged in m rows and n columns. Matrices of the same order can be added by adding the corresponding elements. Two matrices can be multiplied, the condition being that the number of columns of the first matrix is equal to the number of rows of the second matrix. Hence, if an m Γ n matrix is multiplied with an n Γ r matrix, then the resultant matrix will be of the order m Γ r.<ref name=ramana>{{cite book|last=Ramana|first=B.V|title=Higher Engineering Mathematics|year=2008|publisher=Tata Mcgraw-Hill|location=New Delhi|isbn=978-0-07-063419-0}}</ref> Operations like row operations or column operations can be performed on a matrix, using which we can obtain the inverse of a matrix. The inverse may be obtained by determining the adjoint as well.<ref name=ramana /> rows and columns are the different classes of matrices == 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 instruction]]s: === 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 vector]]s 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== {{Reflist}} ==External links== *[http://developer.r-project.org/Sparse.html a description of sparse matrices] in R. [[Category:Matrices (mathematics)]] [[Category:Arrays]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:About
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:Main
(
edit
)
Template:Reflist
(
edit
)