OpenMath Content Dictionary: linalg4mat

Canonical URL:
http://www.openmath.org/cd/linalg4mat.ocd
CD Base:
http://www.openmath.org/cd
CD File:
linalg4mat.ocd
CD as XML Encoded OpenMath:
linalg4mat.omcd
Defines:
banded, constant, diagonal_matrix, identity, scalar, sparse, zero
Date:
2004-11-30
Version:
4 (Revision 2)
Review Date:
2006-03-30
Status:
experimental


     This document is distributed in the hope that it will be useful, 
     but WITHOUT ANY WARRANTY; without even the implied warranty of 
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

     The copyright holder grants you permission to redistribute this 
     document freely as a verbatim copy. Furthermore, the copyright
     holder permits you to develop any derived work from this document
     provided that the following conditions are met.
       a) The derived work acknowledges the fact that it is derived from
          this document, and maintains a prominent reference in the 
          work to the original source.
       b) The fact that the derived work is not the original OpenMath 
          document is stated prominently in the derived work.  Moreover if
          both this document and the derived work are Content Dictionaries
          then the derived work must include a different CDName element,
          chosen so that it cannot be confused with any works adopted by
          the OpenMath Society.  In particular, if there is a Content 
          Dictionary Group whose name is, for example, `math' containing
          Content Dictionaries named `math1', `math2' etc., then you should 
          not name a derived Content Dictionary `mathN' where N is an integer.
          However you are free to name it `private_mathN' or some such.  This
          is because the names `mathN' may be used by the OpenMath Society
          for future extensions.
       c) The derived work is distributed under terms that allow the
          compilation of derived works, but keep paragraphs a) and b)
          intact.  The simplest way to do this is to distribute the derived
          work under the OpenMath license, but this is not a requirement.
     If you have questions about this license please contact the OpenMath
     society at http://www.openmath.org.

This CD contains symbols which represent a number of special types of matrix.

November 2004, A.M. Cohen constructed this CD from parts of the former experimental CD linalg5 by adding the symbol sparse. The other part of the former linalg5 have gone to linalg5s. The descriptions have been slightly edited.


identity

Role:
application
Description:

This symbol denotes a unary function which is used to construct the (nxn) identity matrix where n is the single argument. The argument n must be a natural number.

Commented Mathematical property (CMP):
for all M | identity(rowcount M) * M = M * identity(columncount M) = M
Formal Mathematical property (FMP):
M . identity ( rowcount ( M ) ) M = M M identity ( columncount ( M ) ) = M
Example:
A representation of the 2x2 identity matrix [[1,0],[0,1]]
identity ( 2 )
Signatures:
sts


[Next: zero] [Last: sparse] [Top]

zero

Role:
application
Description:

This symbol denotes a function with two arguments, m and n, which should be natural numbers. When applied to m and n, it represents the m x n zero matrix.

Commented Mathematical property (CMP):
for all M | M + zero(rowcount M,columncount M) = M
Formal Mathematical property (FMP):
M . M + zero ( rowcount ( M ) , columncount ( M ) ) = M
Commented Mathematical property (CMP):
for all M | zero(rowcount M,rowcount M) * M = M * zero(columncount M,columncount M) = zero(rowcount M,columncount M)
Formal Mathematical property (FMP):
M . zero ( rowcount ( M ) , rowcount ( M ) ) M = zero ( rowcount ( M ) , columncount ( M ) ) M zero ( columncount ( M ) , columncount ( M ) ) = zero ( rowcount ( M ) , columncount ( M ) )
Example:
A representation of the 2x2 zero matrix [[0,0],[0,0]]
zero ( 2 , 2 )
Signatures:
sts


[Next: diagonal_matrix] [Previous: identity] [Top]

diagonal_matrix

Role:
application
Description:

This symbol denotes an n_ary function which is used to construct an (nxn) diagonal matrix, that is a matrix where every non-diagonal element is zero, the diagonal elements are equal to the n arguments.

Commented Mathematical property (CMP):
given a diagonal matrix, it is equal to its transpose
Example:
The diagonal matrix with diagonal elements [1,2,3]
diagonal_matrix ( 1 , 2 , 3 )
Signatures:
sts


[Next: scalar] [Previous: zero] [Top]

scalar

Role:
application
Description:

This symbol represents a square matrix which is a scalar constant times the identity matrix. It should take two arguments, the first and second specify the number of rows and columns in the matrix, respectively, and the third specifies the scalar multiplier.

Commented Mathematical property (CMP):
The scalar matrix of size n, where the scalar multiple is s, is equal to s * identity(n).
Formal Mathematical property (FMP):
scalar ( n , s ) = s identity ( n )
Example:
scalar ( 4 , 1.5 )
Signatures:
sts


[Next: constant] [Previous: diagonal_matrix] [Top]

constant

Role:
application
Description:

This symbol represents a matrix which has all entries of the same value. It takes three arguments, the first is the rowcount of the matrix, the second is the column count, and the third is the constant which determines every element.

Commented Mathematical property (CMP):
The rank of a non-zero constant matrix is equal to 1.
Formal Mathematical property (FMP):
v 0 rank ( constant ( n , n , v ) ) = 1
Signatures:
sts


[Next: banded] [Previous: scalar] [Top]

banded

Role:
application
Description:

This symbol represents a square (p,q) banded matrix. It takes one argument. A (p,q) banded matrix should always be square. The lower non-zero subdiagonal is the first element of the argument, whilst the highest non-zero super-diagonal is given by the last element of the argument. The argument determines the band of possibly non-zero entries which are positioned around the diagonal. It should be a vector of vectors, we note that they will not all be the same length, however the length of the vectors determine p and q. The longest element specifies the diagonal of the matrix and hence the size of the matrix. Every element not in the band is zero.

Example:
A specification of the (2,1) banded matrix: [ [1 2 3 0 0], [4 5 6 7 0], [0 8 9 10 11], [0 0 12 13 14], [0 0 0 15 16] ]
banded ( ( ( 4 , 8 , 12 , 15 ) , ( 1 , 5 , 9 , 13 , 16 ) , ( 2 , 6 , 10 , 14 ) , ( 3 , 7 , 11 ) ) )
Signatures:
sts


[Next: sparse] [Previous: constant] [Top]

sparse

Role:
application
Description:

The sparse symbol is a constructor for sparse matrices. It is (n+1)-ary, where the first argument is the rowcount (row dimension) of the matrix, the second argument is the columncount (column dimension) of the matrix and every following argument specifies a possibly non-zero element in the following way. The argument is a list which should have length three. The first element in the list is the row index, the second element is the column index (one based), whilst the third element in the list is the value. Every other element of the matrix is implicitly zero.

Example:
This example shows a representation of the sparse matrix [ [0,0,0], [1,0,7] ]
sparse ( 2 , 3 , ( 2 , 1 , 1 ) , ( 2 , 3 , 7 ) )
Signatures:
sts


[First: identity] [Previous: banded] [Top]