OpenMath Content Dictionary: linalg1
Canonical URL:
http://www.openmath.org/cd/linalg1.ocd
CD Base:
http://www.openmath.org/cd
CD File:
linalg1.ocd
CD as XML Encoded OpenMath:
linalg1.omcd
Defines:
determinant , matrix_selector , outerproduct , scalarproduct , transpose , vector_selector , vectorproduct
Date:
2004-03-30
Version:
3
(Revision 1)
Review Date:
2006-03-30
Status:
official
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 .
Author: OpenMath Consortium
SourceURL: https://github.com/OpenMath/CDs
Operations on Matrices (independent of the matrix representation).
Role:
application
Description:
This symbol represents the vector product function. It takes two
three dimensional vector arguments and returns a three dimensional
vector. It is defined as follows: if we write a as [a_1,a_2,a_3] and
b as [b_1,b_2,b_3] then the vector product denoted
a x b = [a_2b_3 - a_3b_2 , a_3b_1 - a_1b_3 , a_1b_2 - a_2b_1].
Note that the vector product is often referred to as the cross product.
Commented Mathematical property (CMP):
if we write a as [a_1,a_2,a_3] and
b as [b_1,b_2,b_3] then the vector product denoted
a x b = [a_2b_3 - a_3b_2 , a_3b_1 - a_1b_3 , a_1b_2 - a_2b_1]
Formal Mathematical property (FMP):
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="linalg1" name="vectorproduct"/>
<OMV name="A"/>
<OMV name="B"/>
</OMA>
<OMA>
<OMS cd="logic1" name="and"/>
<OMA>
<OMS cd="arith1" name="minus"/>
<OMA>
<OMS cd="arith1" name="times"/>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 2 </OMI>
<OMV name="A"/>
</OMA>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 3 </OMI>
<OMV name="B"/>
</OMA>
</OMA>
<OMA>
<OMS cd="arith1" name="times"/>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 3 </OMI>
<OMV name="A"/>
</OMA>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 2 </OMI>
<OMV name="B"/>
</OMA>
</OMA>
</OMA>
<OMA>
<OMS cd="arith1" name="minus"/>
<OMA>
<OMS cd="arith1" name="times"/>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 3 </OMI>
<OMV name="A"/>
</OMA>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 1 </OMI>
<OMV name="B"/>
</OMA>
</OMA>
<OMA>
<OMS cd="arith1" name="times"/>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 1 </OMI>
<OMV name="A"/>
</OMA>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 3 </OMI>
<OMV name="B"/>
</OMA>
</OMA>
</OMA>
<OMA>
<OMS cd="arith1" name="minus"/>
<OMA>
<OMS cd="arith1" name="times"/>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 1 </OMI>
<OMV name="A"/>
</OMA>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 2 </OMI>
<OMV name="B"/>
</OMA>
</OMA>
<OMA>
<OMS cd="arith1" name="times"/>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 2 </OMI>
<OMV name="A"/>
</OMA>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 1 </OMI>
<OMV name="B"/>
</OMA>
</OMA>
</OMA>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="linalg1">vectorproduct</csymbol><ci>A</ci><ci>B</ci></apply>
<apply><csymbol cd="logic1">and</csymbol>
<apply><csymbol cd="arith1">minus</csymbol>
<apply><csymbol cd="arith1">times</csymbol>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">2</cn><ci>A</ci></apply>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">3</cn><ci>B</ci></apply>
</apply>
<apply><csymbol cd="arith1">times</csymbol>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">3</cn><ci>A</ci></apply>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">2</cn><ci>B</ci></apply>
</apply>
</apply>
<apply><csymbol cd="arith1">minus</csymbol>
<apply><csymbol cd="arith1">times</csymbol>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">3</cn><ci>A</ci></apply>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">1</cn><ci>B</ci></apply>
</apply>
<apply><csymbol cd="arith1">times</csymbol>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">1</cn><ci>A</ci></apply>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">3</cn><ci>B</ci></apply>
</apply>
</apply>
<apply><csymbol cd="arith1">minus</csymbol>
<apply><csymbol cd="arith1">times</csymbol>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">1</cn><ci>A</ci></apply>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">2</cn><ci>B</ci></apply>
</apply>
<apply><csymbol cd="arith1">times</csymbol>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">2</cn><ci>A</ci></apply>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">1</cn><ci>B</ci></apply>
</apply>
</apply>
</apply>
</apply>
</math>
Prefix
eq
(
vectorproduct
(
A ,
B )
,
and
(
minus
(
times
(
vector_selector
( 2 ,
A )
,
vector_selector
( 3 ,
B )
)
,
times
(
vector_selector
( 3 ,
A )
,
vector_selector
( 2 ,
B )
)
)
,
minus
(
times
(
vector_selector
( 3 ,
A )
,
vector_selector
( 1 ,
B )
)
,
times
(
vector_selector
( 1 ,
A )
,
vector_selector
( 3 ,
B )
)
)
,
minus
(
times
(
vector_selector
( 1 ,
A )
,
vector_selector
( 2 ,
B )
)
,
times
(
vector_selector
( 2 ,
A )
,
vector_selector
( 1 ,
B )
)
)
)
)
Popcorn
linalg1.vectorproduct($A, $B) = (linalg1.vector_selector(2, $A) * linalg1.vector_selector(3, $B) - linalg1.vector_selector(3, $A) * linalg1.vector_selector(2, $B) and linalg1.vector_selector(3, $A) * linalg1.vector_selector(1, $B) - linalg1.vector_selector(1, $A) * linalg1.vector_selector(3, $B) and linalg1.vector_selector(1, $A) * linalg1.vector_selector(2, $B) - linalg1.vector_selector(2, $A) * linalg1.vector_selector(1, $B))
Rendered Presentation MathML
A
×
B
=
A
2
B
3
-
A
3
B
2
∧
A
3
B
1
-
A
1
B
3
∧
A
1
B
2
-
A
2
B
1
Signatures:
sts
Role:
application
Description:
This symbol represents the scalar product function. It takes two
vector arguments and returns a scalar value. The scalar product of two
vectors a, b is defined as |a| * |b| * cos(\theta), where \theta is
the angle between the two vectors and |.| is a euclidean size
function. Note that the scalar product is often referred to as the dot
product.
Commented Mathematical property (CMP):
a.b = |a| * |b| * cos(\theta), where \theta is the angle between the
two vectors
that is |atan(a_2/a_1)-atan(b_2/b_1)|.
N.B. The FMP displays the two dimensional case only.
Formal Mathematical property (FMP):
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="linalg1" name="scalarproduct"/>
<OMV name="a"/>
<OMV name="b"/>
</OMA>
<OMA>
<OMS cd="arith1" name="times"/>
<OMA>
<OMS cd="arith1" name="root"/>
<OMA>
<OMS cd="arith1" name="plus"/>
<OMA>
<OMS cd="arith1" name="power"/>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 1 </OMI>
<OMV name="a"/>
</OMA>
<OMI> 2 </OMI>
</OMA>
<OMA>
<OMS cd="arith1" name="power"/>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 2 </OMI>
<OMV name="a"/>
</OMA>
<OMI> 2 </OMI>
</OMA>
</OMA>
<OMI> 2 </OMI>
</OMA>
<OMA>
<OMS cd="arith1" name="root"/>
<OMA>
<OMS cd="arith1" name="plus"/>
<OMA>
<OMS cd="arith1" name="power"/>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 1 </OMI>
<OMV name="b"/>
</OMA>
<OMI> 2 </OMI>
</OMA>
<OMA>
<OMS cd="arith1" name="power"/>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 2 </OMI>
<OMV name="b"/>
</OMA>
<OMI> 2 </OMI>
</OMA>
</OMA>
<OMI> 2 </OMI>
</OMA>
<OMA>
<OMS cd="transc1" name="cos"/>
<OMA>
<OMS cd="arith1" name="abs"/>
<OMA>
<OMS cd="arith1" name="minus"/>
<OMA>
<OMS cd="transc1" name="arctan"/>
<OMA>
<OMS cd="arith1" name="divide"/>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 2 </OMI>
<OMV name="a"/>
</OMA>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 1 </OMI>
<OMV name="a"/>
</OMA>
</OMA>
</OMA>
<OMA>
<OMS cd="transc1" name="arctan"/>
<OMA>
<OMS cd="arith1" name="divide"/>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 2 </OMI>
<OMV name="b"/>
</OMA>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI> 1 </OMI>
<OMV name="b"/>
</OMA>
</OMA>
</OMA>
</OMA>
</OMA>
</OMA>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="linalg1">scalarproduct</csymbol><ci>a</ci><ci>b</ci></apply>
<apply><csymbol cd="arith1">times</csymbol>
<apply><csymbol cd="arith1">root</csymbol>
<apply><csymbol cd="arith1">plus</csymbol>
<apply><csymbol cd="arith1">power</csymbol>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">1</cn><ci>a</ci></apply>
<cn type="integer">2</cn>
</apply>
<apply><csymbol cd="arith1">power</csymbol>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">2</cn><ci>a</ci></apply>
<cn type="integer">2</cn>
</apply>
</apply>
<cn type="integer">2</cn>
</apply>
<apply><csymbol cd="arith1">root</csymbol>
<apply><csymbol cd="arith1">plus</csymbol>
<apply><csymbol cd="arith1">power</csymbol>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">1</cn><ci>b</ci></apply>
<cn type="integer">2</cn>
</apply>
<apply><csymbol cd="arith1">power</csymbol>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">2</cn><ci>b</ci></apply>
<cn type="integer">2</cn>
</apply>
</apply>
<cn type="integer">2</cn>
</apply>
<apply><csymbol cd="transc1">cos</csymbol>
<apply><csymbol cd="arith1">abs</csymbol>
<apply><csymbol cd="arith1">minus</csymbol>
<apply><csymbol cd="transc1">arctan</csymbol>
<apply><csymbol cd="arith1">divide</csymbol>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">2</cn><ci>a</ci></apply>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">1</cn><ci>a</ci></apply>
</apply>
</apply>
<apply><csymbol cd="transc1">arctan</csymbol>
<apply><csymbol cd="arith1">divide</csymbol>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">2</cn><ci>b</ci></apply>
<apply><csymbol cd="linalg1">vector_selector</csymbol><cn type="integer">1</cn><ci>b</ci></apply>
</apply>
</apply>
</apply>
</apply>
</apply>
</apply>
</apply>
</math>
Prefix
eq
(
scalarproduct
(
a ,
b )
,
times
(
root
(
plus
(
power
(
vector_selector
( 1 ,
a )
, 2 )
,
power
(
vector_selector
( 2 ,
a )
, 2 )
)
, 2 )
,
root
(
plus
(
power
(
vector_selector
( 1 ,
b )
, 2 )
,
power
(
vector_selector
( 2 ,
b )
, 2 )
)
, 2 )
,
cos
(
abs
(
minus
(
arctan
(
divide
(
vector_selector
( 2 ,
a )
,
vector_selector
( 1 ,
a )
)
)
,
arctan
(
divide
(
vector_selector
( 2 ,
b )
,
vector_selector
( 1 ,
b )
)
)
)
)
)
)
)
Popcorn
linalg1.scalarproduct($a, $b) = arith1.root(linalg1.vector_selector(1, $a) ^ 2 + linalg1.vector_selector(2, $a) ^ 2, 2) * arith1.root(linalg1.vector_selector(1, $b) ^ 2 + linalg1.vector_selector(2, $b) ^ 2, 2) * cos(arith1.abs(arctan(linalg1.vector_selector(2, $a) / linalg1.vector_selector(1, $a)) - arctan(linalg1.vector_selector(2, $b) / linalg1.vector_selector(1, $b))))
Rendered Presentation MathML
a
.
b
=
a
1
2
+
a
2
2
b
1
2
+
b
2
2
cos
(
|
arctan
(
a
2
a
1
)
-
arctan
(
b
2
b
1
)
|
)
Signatures:
sts
Role:
application
Description:
This symbol represents the outer product function. It takes two vector
arguments and returns a matrix. It is defined as follows: if we write
the {i,j}'th element of the matrix to be returned as m_{i,j}, then:
m_{i,j}=a_i * b_j where a_i,b_j are the i'th and j'th elements of a, b
respectively.
Commented Mathematical property (CMP):
outerproduct(a,b)_{i,j} = a_i * b_j
Formal Mathematical property (FMP):
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="linalg1" name="matrix_selector"/>
<OMV name="i"/>
<OMV name="j"/>
<OMA>
<OMS cd="linalg1" name="outerproduct"/>
<OMV name="a"/>
<OMV name="b"/>
</OMA>
</OMA>
<OMA>
<OMS cd="arith1" name="times"/>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMV name="i"/>
<OMV name="a"/>
</OMA>
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMV name="j"/>
<OMV name="b"/>
</OMA>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="linalg1">matrix_selector</csymbol>
<ci>i</ci>
<ci>j</ci>
<apply><csymbol cd="linalg1">outerproduct</csymbol><ci>a</ci><ci>b</ci></apply>
</apply>
<apply><csymbol cd="arith1">times</csymbol>
<apply><csymbol cd="linalg1">vector_selector</csymbol><ci>i</ci><ci>a</ci></apply>
<apply><csymbol cd="linalg1">vector_selector</csymbol><ci>j</ci><ci>b</ci></apply>
</apply>
</apply>
</math>
Prefix
Popcorn
linalg1.matrix_selector($i, $j, linalg1.outerproduct($a, $b)) = linalg1.vector_selector($i, $a) * linalg1.vector_selector($j, $b)
Rendered Presentation MathML
Signatures:
sts
Role:
application
Description:
This symbol represents a unary function that denotes the transpose of
the given matrix or vector
Example:
A representation of the equation
transpose matrix([0,1],[2,3]) = matrix([0,2],[1,3])
N.B. in this example the row oriented view of matrix construction is being
assumed.
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="linalg1" name="transpose"/>
<OMA>
<OMS cd="linalg2" name="matrix"/>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 0 </OMI>
<OMI> 1 </OMI>
</OMA>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 2 </OMI>
<OMI> 3 </OMI>
</OMA>
</OMA>
</OMA>
<OMA>
<OMS cd="linalg2" name="matrix"/>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 0 </OMI>
<OMI> 2 </OMI>
</OMA>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 1 </OMI>
<OMI> 3 </OMI>
</OMA>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="linalg1">transpose</csymbol>
<apply><csymbol cd="linalg2">matrix</csymbol>
<apply><csymbol cd="linalg2">matrixrow</csymbol>
<cn type="integer">0</cn>
<cn type="integer">1</cn>
</apply>
<apply><csymbol cd="linalg2">matrixrow</csymbol>
<cn type="integer">2</cn>
<cn type="integer">3</cn>
</apply>
</apply>
</apply>
<apply><csymbol cd="linalg2">matrix</csymbol>
<apply><csymbol cd="linalg2">matrixrow</csymbol>
<cn type="integer">0</cn>
<cn type="integer">2</cn>
</apply>
<apply><csymbol cd="linalg2">matrixrow</csymbol>
<cn type="integer">1</cn>
<cn type="integer">3</cn>
</apply>
</apply>
</apply>
</math>
Prefix
Popcorn
linalg1.transpose(linalg2.matrix(linalg2.matrixrow(0, 1), linalg2.matrixrow(2, 3))) = linalg2.matrix(linalg2.matrixrow(0, 2), linalg2.matrixrow(1, 3))
Rendered Presentation MathML
Signatures:
sts
Role:
application
Description:
This symbol denotes the unary function which returns the determinant
of its argument, the argument should be a square matrix.
Commented Mathematical property (CMP):
The determinant of an identity matrix is 1
Formal Mathematical property (FMP):
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="logic1" name="implies"/>
<OMA>
<OMS cd="logic1" name="and"/>
<OMA>
<OMS cd="logic1" name="implies"/>
<OMA>
<OMS cd="relation1" name="neq"/>
<OMV name="i"/>
<OMV name="j"/>
</OMA>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="linalg1" name="matrix_selector"/>
<OMV name="i"/>
<OMV name="j"/>
<OMV name="M"/>
</OMA>
<OMS cd="alg1" name="zero"/>
</OMA>
</OMA>
<OMA>
<OMS cd="logic1" name="implies"/>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMV name="i"/>
<OMV name="j"/>
</OMA>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="linalg1" name="matrix_selector"/>
<OMV name="i"/>
<OMV name="j"/>
<OMV name="M"/>
</OMA>
<OMS cd="alg1" name="one"/>
</OMA>
</OMA>
</OMA>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="linalg1" name="determinant"/>
<OMV name="M"/>
</OMA>
<OMS cd="alg1" name="one"/>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="logic1">implies</csymbol>
<apply><csymbol cd="logic1">and</csymbol>
<apply><csymbol cd="logic1">implies</csymbol>
<apply><csymbol cd="relation1">neq</csymbol><ci>i</ci><ci>j</ci></apply>
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="linalg1">matrix_selector</csymbol><ci>i</ci><ci>j</ci><ci>M</ci></apply>
<csymbol cd="alg1">zero</csymbol>
</apply>
</apply>
<apply><csymbol cd="logic1">implies</csymbol>
<apply><csymbol cd="relation1">eq</csymbol><ci>i</ci><ci>j</ci></apply>
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="linalg1">matrix_selector</csymbol><ci>i</ci><ci>j</ci><ci>M</ci></apply>
<csymbol cd="alg1">one</csymbol>
</apply>
</apply>
</apply>
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="linalg1">determinant</csymbol><ci>M</ci></apply>
<csymbol cd="alg1">one</csymbol>
</apply>
</apply>
</math>
Prefix
implies
(
and
(
implies
(
neq
(
i ,
j )
,
eq
(
matrix_selector
(
i ,
j ,
M )
,
zero )
)
,
implies
(
eq
(
i ,
j )
,
eq
(
matrix_selector
(
i ,
j ,
M )
,
one )
)
)
,
eq
(
determinant
(
M )
,
one )
)
Popcorn
($i != $j ==> linalg1.matrix_selector($i, $j, $M) = alg1.zero) and ($i = $j ==> linalg1.matrix_selector($i, $j, $M) = alg1.one) ==> linalg1.determinant($M) = alg1.one
Rendered Presentation MathML
(
i
≠
j
⇒
M
i
j
=
0
)
∧
(
i
=
j
⇒
M
i
j
=
1
)
⇒
det
M
=
1
Signatures:
sts
Role:
application
Description:
This symbol represents the function which allows individual entries to
be selected from a vector, or a matrixrow. It takes two arguments. The
first argument is the position in the vector (or matrixrow) of the
required entry, the second argument is the vector (or matrixrow) in
question. The indexing is one based, i.e. the first element is indexed by one.
Example:
Representation of a specification of selection of the second element of the
specific vector [3,6,9].
N.B. in this example the row oriented view of vector construction is being
assumed
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI>2</OMI>
<OMA>
<OMS cd="linalg2" name="vector"/>
<OMI> 3 </OMI>
<OMI> 6 </OMI>
<OMI> 9 </OMI>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="linalg1">vector_selector</csymbol>
<cn type="integer">2</cn>
<apply><csymbol cd="linalg2">vector</csymbol>
<cn type="integer">3</cn>
<cn type="integer">6</cn>
<cn type="integer">9</cn>
</apply>
</apply>
</math>
Prefix
Popcorn
linalg1.vector_selector(2, linalg2.vector(3, 6, 9))
Rendered Presentation MathML
Example:
Representation of a specification of selection of the second element of the
specific matrixrow [0,1,0].
N.B. in this example the row oriented view of matrixrow construction is being
assumed
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="linalg1" name="vector_selector"/>
<OMI>2</OMI>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 0 </OMI>
<OMI> 1 </OMI>
<OMI> 0 </OMI>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="linalg1">vector_selector</csymbol>
<cn type="integer">2</cn>
<apply><csymbol cd="linalg2">matrixrow</csymbol>
<cn type="integer">0</cn>
<cn type="integer">1</cn>
<cn type="integer">0</cn>
</apply>
</apply>
</math>
Prefix
Popcorn
linalg1.vector_selector(2, linalg2.matrixrow(0, 1, 0))
Rendered Presentation MathML
Signatures:
sts
Role:
application
Description:
This symbol represents the function which allows individual entries to
be selected from a matrix. It takes three arguments, the first is the
index of the row and the second is the index of the column of the
required element, the third argument is the matrix in question. The
indexing is one based, i.e. the element in the top left hand corner is
indexed by (1,1).
Example:
Representation of a specification of selection of the top left hand entry to
the matrix M.
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="linalg1" name="matrix_selector"/>
<OMI> 1 </OMI>
<OMI> 1 </OMI>
<OMV name="M"/>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="linalg1">matrix_selector</csymbol>
<cn type="integer">1</cn>
<cn type="integer">1</cn>
<ci>M</ci>
</apply>
</math>
Prefix
Popcorn
linalg1.matrix_selector(1, 1, $M)
Rendered Presentation MathML
Signatures:
sts