XML technologies / MathML / Content markup / Operators and functions / Linear algebra

(Excerpt from "The MathML Handbook" by Pavi Sandhu)

The following content elements represent various operators or functions used in linear algebra: determinant, transpose, selector, vectorproduct, scalarproduct, and outerproduct.

The determinant and transpose elements represent the determinant and transpose of a matrix, respectively. The matrix itself is represented using the matrix and matrixrow elements, as discussed under Vectors and matrices.

For example, given a matrix:

Linear algebra: matrix 1

the equations that describe the transpose and determinant of A are given below:

Linear algebra: matrix 2

<apply>
  <eq/>
  <apply>
    <transpose/>
    <ci type="matrix">A</ci>
  </apply>
  <matrix>
    <matrixrow><cn>1</cn><cn>3</cn></matrixrow>
    <matrixrow><cn>2</cn><cn>4</cn></matrixrow>
  </matrix>
</apply>

Linear algebra: equation 1

<apply>
  <eq/>
  <apply>
    <determinant/>
    <ci type="matrix">A</ci>
  </apply>
  <cn>2</cn>
</apply>

The selector element is used to select a specific part of a list, vector, or matrix. This element can take one, two, or three arguments. The first argument identifies the object whose element is being selected. The remaining arguments specify the index number of the item in that object.

For matrices, the second argument specifies the row and the third argument specifies the column. For example, the element in the first row and second column of a matrix A is represented as shown below:

Linear algebra: equation 2

<apply>
  <selector/>
  <ci type="matrix">A</ci>
  <cn>1</cn>
  <cn>2</cn>
</apply>

If the selector element is given with three arguments and the first argument identifies a vector or list, the third argument is ignored.

The vectorproduct, scalarproduct, and outerproduct elements represent the vector product, the scalar product, and the outerproduct of vectors, respectively. Here is an example showing the scalar product of two vectors:

Linear algebra: equation 3

<apply>
  <eq/>
  <apply>
    <scalarproduct/>
    <ci type="vector"> A </ci>
    <ci type="vector"> B </ci>
  </apply>
  <apply>
    <times/>
    <ci>a</ci>
    <ci>b</ci>
    <apply>
      <cos/>
      <ci>&theta;</ci>
    </apply>
  </apply>
</apply>

   

 

 

 

 

back to top