linalg1 http://www.openmath.org/cd/linalg1.ocd 2003-04-01 2001-03-12 2 0 official alg1 arith1 linalg2 logic1 relation1 transc1 Operations on Matrices (independent of the matrix representation). vectorproduct 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. 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] 2 3 3 2 3 1 1 3 1 2 2 1 scalarproduct 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. 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. 1 2 2 2 2 1 2 2 2 2 2 1 2 1 outerproduct 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. outerproduct(a,b)_{i,j} = a_i * b_j transpose This symbol represents a unary function that denotes the transpose of the given matrix or vector 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. 0 1 2 3 0 2 1 3 determinant This symbol denotes the unary function which returns the determinant of its argument, the argument should be a square matrix. The determinant of an identity matrix is 1 vector_selector 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. 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 2 3 6 9 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 2 0 1 0 matrix_selector 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). Representation of a specification of selection of the top left hand entry to the matrix M. 1 1