<p>In <strong class="pkg">GAP</strong>, Matrices can be represented by lists of row vectors, see <a href="chap23_mj.html#X82C7E6CF7BA03391"><span class="RefLink">23</span></a>. (For a more general way to represent vectors and matrices, see Chapter <a href="chap26_mj.html#X856C23B87E50F118"><span class="RefLink">26</span></a>). The row vectors must all have the same length, and their elements must lie in a common ring. However, since checking rectangularness can be expensive functions and methods of operations for matrices often will not give an error message for non-rectangular lists of lists –in such cases the result is undefined.</p>
<p>Because matrices are just a special case of lists, all operations and functions for lists are applicable to matrices also (see chapter <a href="chap21_mj.html#X7B256AE5780F140A"><span class="RefLink">21</span></a>). This especially includes accessing elements of a matrix (see <a href="chap21_mj.html#X7921047F83F5FA28"><span class="RefLink">21.3</span></a>), changing elements of a matrix (see <a href="chap21_mj.html#X8611EF768210625B"><span class="RefLink">21.4</span></a>), and comparing matrices (see <a href="chap21_mj.html#X8016D50F85147A77"><span class="RefLink">21.10</span></a>).</p>
<p>Note that, since a matrix is a list of lists, the behaviour of <code class="func">ShallowCopy</code> (<a href="chap12_mj.html#X846BC7107C352031"><span class="RefLink">12.7-1</span></a>) for matrices is just a special case of <code class="func">ShallowCopy</code> (<a href="chap12_mj.html#X846BC7107C352031"><span class="RefLink">12.7-1</span></a>) for lists (see <a href="chap21_mj.html#X7ED7C0738495556F"><span class="RefLink">21.7</span></a>); called with an immutable matrix <var class="Arg">mat</var>, <code class="func">ShallowCopy</code> (<a href="chap12_mj.html#X846BC7107C352031"><span class="RefLink">12.7-1</span></a>) returns a mutable matrix whose rows are identical to the rows of <var class="Arg">mat</var>. In particular the rows are still immutable. To get a matrix whose rows are mutable, one can use <code class="code">List( <var class="Arg">mat</var>, ShallowCopy )</code>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InfoMatrix</code></td><td class="tdright">( info class )</td></tr></table></div>
<p>The info class for matrix operations is <code class="func">InfoMatrix</code>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMatrix</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>By convention <em>matrix</em> is a list of lists of equal length whose entries lie in a common ring.</p>
<p>For technical reasons laid out at the top of Chapter <a href="chap24_mj.html#X812CCAB278643A59"><span class="RefLink">24</span></a>, the filter <code class="func">IsMatrix</code> is a synonym for a table of ring elements, (see <code class="func">IsTable</code> (<a href="chap21_mj.html#X80872FAF80EB5DF9"><span class="RefLink">21.1-4</span></a>) and <code class="func">IsRingElement</code> (<a href="chap31_mj.html#X84BF40CA86C07361"><span class="RefLink">31.14-16</span></a>)). This means that <code class="func">IsMatrix</code> returns <code class="keyw">true</code> for tables such as <code class="code">[[1,2],[3]]</code>. If necessary, <code class="func">IsRectangularTable</code> (<a href="chap21_mj.html#X79581E0387F7F7A9"><span class="RefLink">21.1-5</span></a>) can be used to test whether an object is a list of homogeneous lists of equal lengths manually.</p>
<p>Note that matrices may have different multiplications, besides the usual matrix product there is for example the Lie product. So there are categories such as <code class="func">IsOrdinaryMatrix</code> (<a href="chap24_mj.html#X7CF42B8A845BC6A9"><span class="RefLink">24.2-2</span></a>) and <code class="func">IsLieMatrix</code> (<a href="chap24_mj.html#X86EC33E17DD12D0E"><span class="RefLink">24.2-3</span></a>) that describe the matrix multiplication. One can form the product of two matrices only if they support the same multiplication.</p>
<p>Note that the empty list <code class="code">[]</code> and more complex <q>empty</q> structures such as <code class="code">[[]]</code> are <em>not</em> matrices, although special methods allow them be used in place of matrices in some situations. See <code class="func">EmptyMatrix</code> (<a href="chap24_mj.html#X8508A7EA812BA0CC"><span class="RefLink">24.5-3</span></a>) below.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsOrdinaryMatrix</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>An <em>ordinary matrix</em> is a matrix whose multiplication is the ordinary matrix multiplication.</p>
<p>Each matrix in internal representation is in the category <code class="func">IsOrdinaryMatrix</code>, and arithmetic operations with objects in <code class="func">IsOrdinaryMatrix</code> produce again matrices in <code class="func">IsOrdinaryMatrix</code>.</p>
<p>Note that we want that Lie matrices shall be matrices that behave in the same way as ordinary matrices, except that they have a different multiplication. So we must distinguish the different matrix multiplications, in order to be able to describe the applicability of multiplication, and also in order to form a matrix of the appropriate type as the sum, difference etc. of two matrices which have the same multiplication.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsLieMatrix</code>( <var class="Arg">mat</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>A <em>Lie matrix</em> is a matrix whose multiplication is given by the Lie bracket. (Note that a matrix with ordinary matrix multiplication is in the category <code class="func">IsOrdinaryMatrix</code> (<a href="chap24_mj.html#X7CF42B8A845BC6A9"><span class="RefLink">24.2-2</span></a>).)</p>
<p>Each matrix created by <code class="func">LieObject</code> (<a href="chap64_mj.html#X87F121978775AF48"><span class="RefLink">64.1-1</span></a>) is in the category <code class="func">IsLieMatrix</code>, and arithmetic operations with objects in <code class="func">IsLieMatrix</code> produce again matrices in <code class="func">IsLieMatrix</code>.</p>
<h4>24.3 <span class="Heading">Operators for Matrices</span></h4>
<p>The rules for arithmetic operations involving matrices are in fact special cases of those for the arithmetic of lists, given in Section <a href="chap21_mj.html#X845EEAF083D43CCE"><span class="RefLink">21.11</span></a> and the following sections, here we reiterate that definition, in the language of vectors and matrices.</p>
<p>Note that the additive behaviour sketched below is defined only for lists in the category <codeclass="func">IsGeneralizedRowVector</code> (<a href="chap21_mj.html#X87ABCEE9809585A0"><span class="RefLink">21.12-1</span></a>), and the multiplicative behaviour is defined only for lists in the category <code class="func">IsMultiplicativeGeneralizedRowVector</code> (<a href="chap21_mj.html#X7FBCA5B58308C158"><span class="RefLink">21.12-2</span></a>) (see <a href="chap21_mj.html#X84D642967B8546B7"><span class="RefLink">21.12</span></a>).</p>
<p>returns the sum of the two matrices <var class="Arg">mat1</var> and <var class="Arg">mat2</var>, Probably the most usual situation is that <var class="Arg">mat1</var> and <var class="Arg">mat2</var> have the same dimensions and are defined over a common field; in this case the sum is a new matrix over the same field where each entry is the sum of the corresponding entries of the matrices.</p>
<p>In more general situations, the sum of two matrices need not be a matrix, for example adding an integer matrix <var class="Arg">mat1</var> and a matrix <var class="Arg">mat2</var> over a finite field yields the table of pointwise sums, which will be a mixture of finite field elements and integers if <var class="Arg">mat1</var> has bigger dimensions than <var class="Arg">mat2</var>.</p>
<p>returns the sum of the scalar <var class="Arg">scalar</var> and the matrix <var class="Arg">mat</var>. Probably the most usual situation is that the entries of <var class="Arg">mat</var> lie in a common field with <var class="Arg">scalar</var>; in this case the sum is a new matrix over the same field where each entry is the sum of the scalar and the corresponding entry of the matrix.</p>
<p>More general situations are for example the sum of an integer scalar and a matrix over a finite field, or the sum of a finite field element and an integer matrix.</p>
<p>returns the product of the scalar <var class="Arg">scalar</var> and the matrix <var class="Arg">mat</var>. Probably the most usual situation is that the elements of <var class="Arg">mat</var> lie in a common field with <var class="Arg">scalar</var>; in this case the product is a new matrix over the same field where each entry is the product of the scalar and the corresponding entry of the matrix.</p>
<p>More general situations are for example the product of an integer scalar and a matrix over a finite field, or the product of a finite field element and an integer matrix.</p>
<p>returns the product of the row vector <var class="Arg">vec</var> and the matrix <var class="Arg">mat</var>. Probably the most usual situation is that <var class="Arg">vec</var> and <var class="Arg">mat</var> have the same lengths and are defined over a common field, and that all rows of <var class="Arg">mat</var> have some common length <span class="SimpleMath">\(m\)</span>; in this case the product is a new row vector of length <span class="SimpleMath">\(m\)</span> over the same field which is the sum of the scalar multiples of the rows of <var class="Arg">mat</var> with the corresponding entries of <var class="Arg">vec</var>.</p>
<p>More general situations are for example the product of an integer vector and a matrix over a finite field, or the product of a vector over a finite field and an integer matrix.</p>
<p>returns the product of the matrix <var class="Arg">mat</var> and the row vector <var class="Arg">vec</var>. (This is the standard product of a matrix with a <em>column</em> vector.) Probably the most usual situation is that the length of <var class="Arg">vec</var> and of all rows of <var class="Arg">mat</var> are equal, and that the elements of <var class="Arg">mat</var> and <var class="Arg">vec</var> lie in a common field; in this case the product is a new row vector of the same length as <var class="Arg">mat</var> and over the same field which is the sum of the scalar multiples of the columns of <var class="Arg">mat</var> with the corresponding entries of <var class="Arg">vec</var>.</p>
<p>More general situations are for example the product of an integer matrix and a vector over a finite field, or the product of a matrix over a finite field and an integer vector.</p>
<p>This form evaluates to the (Cauchy) product of the two matrices <var class="Arg">mat1</var> and <var class="Arg">mat2</var>. Probably the most usual situation is that the number of columns of <var class="Arg">mat1</var> equals the number of rows of <var class="Arg">mat2</var>, and that the elements of <var class="Arg">mat</var> and <var class="Arg">vec</var> lie in a common field; if <var class="Arg">mat1</var> is a matrix with <span class="SimpleMath">\(m\)</span> rows and <span class="SimpleMath">\(n\)</span> columns and <var class="Arg">mat2</var> is a matrix with <span class="SimpleMath">\(n\)</span> rows and <span class="SimpleMath">\(o\)</span> columns, the result is a new matrix with <span class="SimpleMath">\(m\)</span> rows and <span class="SimpleMath">\(o\)</span> columns. The element in row <span class="SimpleMath">\(i\)</span> at position <span class="SimpleMath">\(j\)</span> of the product is the sum of <span class="SimpleMath">\(\textit{mat1}[i][l] * \textit{mat2}[l][j]\)</span>, with <span class="SimpleMath">\(l\)</span> running from <span class="SimpleMath">\(1\)</span> to <span class="SimpleMath">\(n\)</span>.</p>
<p>returns the inverse of the matrix <var class="Arg">mat</var>, which must be an invertible square matrix. If <var class="Arg">mat</var> is not invertible then <code class="keyw">fail</code> is returned.</p>
<p>In general, <code class="code"><var class="Arg">left</var> / <var class="Arg">right</var></code> is defined as <code class="code"><var class="Arg">left</var> * <var class="Arg">right</var>^-1</code>. Thus in the above forms the right operand must always be invertible.</p>
<p>Powering a square matrix <var class="Arg">mat</var> by an integer <var class="Arg">int</var> yields the <var class="Arg">int</var>-th power of <var class="Arg">mat</var>; if <var class="Arg">int</var> is negative then <var class="Arg">mat</var> must be invertible, if <var class="Arg">int</var> is <code class="code">0</code> then the result is the identity matrix <code class="code">One( <var class="Arg">mat</var> )</code>, even if <var class="Arg">mat</var> is not invertible.</p>
<p>Powering a square matrix <var class="Arg">mat1</var> by an invertible square matrix <var class="Arg">mat2</var> of the same dimensions yields the conjugate of <var class="Arg">mat1</var> by <var class="Arg">mat2</var>, i.e., the matrix <code class="code"><var class="Arg">mat2</var>^-1 * <var class="Arg">mat1</var> * <var class="Arg">mat2</var></code>.</p>
<p>Powering a row vector <var class="Arg">vec</var> by a matrix <var class="Arg">mat</var> is in every respect equivalent to <code class="code"><var class="Arg">vec</var> * <var class="Arg">mat</var></code>. This operations reflects the fact that matrices act naturally on row vectors by multiplication from the right, and that the powering operator is <strong class="pkg">GAP</strong>'s standard for group actions.
<p>returns the commutator of the square invertible matrices <var class="Arg">mat1</var> and <var class="Arg">mat2</var> of the same dimensions and over a common field, which is the matrix <code class="code"><var class="Arg">mat1</var>^-1 * <var class="Arg">mat2</var>^-1 * <var class="Arg">mat1</var> * <var class="Arg">mat2</var></code>.</p>
<p>The following cases are still special cases of the general list arithmetic defined in <a href="chap21_mj.html#X845EEAF083D43CCE"><span class="RefLink">21.11</span></a>.</p>
<p>A scalar <var class="Arg">scalar</var> may also be added, subtracted, multiplied with, or divided into a list <var class="Arg">matlist</var> of matrices. The result is a new list of matrices where each matrix is the result of performing the operation with the corresponding matrix in <var class="Arg">matlist</var>.</p>
<p>A matrix <var class="Arg">mat</var> may also be multiplied with a list <var class="Arg">matlist</var> of matrices. The result is a new list of matrices, where each entry is the product of <var class="Arg">mat</var> and the corresponding entry in <var class="Arg">matlist</var>.</p>
<p>Dividing a list <var class="Arg">matlist</var> of matrices by an invertible matrix <var class="Arg">mat</var> evaluates to <code class="code"><var class="Arg">matlist</var> * <var class="Arg">mat</var>^-1</code>.</p>
<p>returns the product of the vector <var class="Arg">vec</var> and the list of matrices <var class="Arg">mat</var>. The lengths <var class="Arg">l</var> of <var class="Arg">vec</var> and <var class="Arg">matlist</var> must be equal. All matrices in <var class="Arg">matlist</var> must have the same dimensions. The elements of <var class="Arg">vec</var> and the elements of the matrices in <var class="Arg">matlist</var> must lie in a common ring. The product is the sum over <code class="code"><var class="Arg">vec</var>[<var class="Arg">i</var>] * <var class="Arg">matlist</var>[<var class="Arg">i</var>]</code> with <var class="Arg">i</var> running from 1 to <var class="Arg">l</var>.</p>
<p>For the mutability of results of arithmetic operations, see <a href="chap12_mj.html#X7F0C119682196D65"><span class="RefLink">12.6</span></a>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DimensionsMat</code>( <var class="Arg">mat</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>is a list of length 2, the first being the number of rows, the second being the number of columns of the matrix <var class="Arg">mat</var>. If <var class="Arg">mat</var> is malformed, that is, it is not a <code class="func">IsRectangularTable</code> (<a href="chap21_mj.html#X79581E0387F7F7A9"><span class="RefLink">21.1-5</span></a>), returns <code class="keyw">fail</code>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DefaultFieldOfMatrix</code>( <var class="Arg">mat</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>For a matrix <var class="Arg">mat</var>, <code class="func">DefaultFieldOfMatrix</code> returns either a field (not necessarily the smallest one) containing all entries of <var class="Arg">mat</var>, or <code class="keyw">fail</code>.</p>
<p>If <var class="Arg">mat</var> is a matrix of finite field elements or a matrix of cyclotomics, <code class="func">DefaultFieldOfMatrix</code> returns the default field generated by the matrix entries (see <a href="chap59_mj.html#X81B54A8378734C33"><span class="RefLink">59.3</span></a> and <a href="chap18_mj.html#X79E25C3085AA568F"><span class="RefLink">18.1</span></a>).</p>
<p>These methods assume implicitly that <var class="Arg">mat</var> is defined over an integral domain whose quotient field is implemented in <strong class="pkg">GAP</strong>. For matrices defined over an arbitrary commutative ring with one see <code class="func">DeterminantMatDivFree</code> (<a href="chap24_mj.html#X80693FAB7D541804"><span class="RefLink">24.4-6</span></a>).</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DeterminantMatrixDestructive</code>( <var class="Arg">mat</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DeterminantMatDestructive</code>( <var class="Arg">mat</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Does the same as <code class="func">DeterminantMatrix</code> (<a href="chap24_mj.html#X8488D69A7ADDB4E2"><span class="RefLink">24.4-4</span></a>), with the difference that it may destroy its argument. The matrix <var class="Arg">mat</var> must be mutable.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DeterminantMatrixDivFree</code>( <var class="Arg">mat</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DeterminantMatDivFree</code>( <var class="Arg">mat</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>return the determinant of a square matrix <var class="Arg">mat</var> over an arbitrary commutative ring with one using the division free method of Mahajan and Vinay <a href="chapBib_mj.html#biBMV97">[MV97]</a>.</p>
<p>Is <code class="keyw">true</code> if the matrix object <var class="Arg">M</var> either has zero columns or zero rows, and <code class="keyw">false</code> otherwise. In other words, a matrix object is empty if it has no entries.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMonomialMatrix</code>( <var class="Arg">mat</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>A matrix is monomial if and only if it has exactly one nonzero entry in every row and every column.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IdentityMat</code>( <var class="Arg">m</var>[, <var class="Arg">R</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>returns a (mutable) <var class="Arg">m</var><span class="SimpleMath">\(\times\)</span><var class="Arg">m</var> identity matrix over the ring given by <var class="Arg">R</var>. Here, <var class="Arg">R</var> can be either a ring, or an element of a ring. By default, an integer matrix is created.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NullMat</code>( <var class="Arg">m</var>, <var class="Arg">n</var>[, <var class="Arg">R</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>returns a (mutable) <var class="Arg">m</var><span class="SimpleMath">\(\times\)</span><var class="Arg">n</var> null matrix over the ring given by by <var class="Arg">R</var>. Here, <var class="Arg">R</var> can be either a ring, or an element of a ring. By default, an integer matrix is created.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EmptyMatrix</code>( <var class="Arg">char</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>is an empty (ordinary) matrix in characteristic <var class="Arg">char</var> that can be added to or multiplied with empty lists (representing zero-dimensional row vectors). It also acts (via the operation <code class="func">\^</code> (<a href="chap31_mj.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>)) on empty lists.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DiagonalMat</code>( <var class="Arg">vector</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>returns a diagonal matrix <var class="Arg">mat</var> with the diagonal entries given by <var class="Arg">vector</var>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DiagonalMatrix</code>( [<var class="Arg">filt</var>, ]<var class="Arg">R</var>, <var class="Arg">vector</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DiagonalMatrix</code>( <var class="Arg">vector</var>[, <var class="Arg">M</var>] )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: a square matrix or matrix object with column number equal to the length of the dense list <var class="Arg">vector</var>, whose diagonal entries are given by the entries of <var class="Arg">vector</var>, and whose off-diagonal entries are zero.</p>
<p>If a semiring <var class="Arg">R</var> is given then it will be the base domain (see <code class="func">BaseDomain</code> (<a href="chap26_mj.html#X8662026C7CCDB446"><span class="RefLink">26.3-1</span></a>)) of the returned matrix. In this case, a filter <var class="Arg">filt</var> can be specified that defines the internal representation of the result (see <code class="func">ConstructingFilter</code> (<a href="chap26_mj.html#X85ABF33684865ED5"><span class="RefLink">26.3-2</span></a>)). The default value for <var class="Arg">filt</var> is determined from <var class="Arg">R</var>.</p>
<p>If a matrix object <var class="Arg">M</var> is given then the returned matrix will have the same internal representation and the same base domain as <var class="Arg">M</var>.</p>
<p>If only <var class="Arg">vector</var> is given then it is used to compute a default for <var class="Arg">R</var>.</p>
<p>If the <code class="func">ConstructingFilter</code> (<a href="chap26_mj.html#X85ABF33684865ED5"><span class="RefLink">26.3-2</span></a>) value of the result implies <code class="func">IsCopyable</code> (<a href="chap12_mj.html#X811EFD727EBD1ADC"><span class="RefLink">12.6-1</span></a>) then the result is fully mutable.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PermutationMat</code>( <var class="Arg">perm</var>, <var class="Arg">dim</var>[, <var class="Arg">F</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>returns a matrix in dimension <var class="Arg">dim</var> over the field given by <var class="Arg">F</var> (i.e. the smallest field containing the element <var class="Arg">F</var> or <var class="Arg">F</var> itself if it is a field) that represents the permutation <var class="Arg">perm</var> acting by permuting the basis vectors as it permutes points.</p>
<p>They differ only w.r.t. the mutability of the result.</p>
<p><code class="func">TransposedMat</code> is an attribute and hence returns an immutable result. <code class="func">TransposedMatMutable</code> is guaranteed to return a new <em>mutable</em> matrix.</p>
<p><code class="func">TransposedMatImmutable</code> is a synonym of <code class="func">TransposedMat</code>, and <code class="func">TransposedMatOp</code> is a synonym of <code class="func">TransposedMatMutable</code>, in analogy to operations such as <code class="func">Zero</code> (<a href="chap31_mj.html#X8040AC7A79FFC442"><span class="RefLink">31.10-3</span></a>).</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TransposedMatDestructive</code>( <var class="Arg">mat</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>If <var class="Arg">mat</var> is a mutable matrix, then the transposed is computed by swapping the entries in <var class="Arg">mat</var>. In this way <var class="Arg">mat</var> gets changed. In all other cases the transposed is computed by <code class="func">TransposedMat</code> (<a href="chap24_mj.html#X7C52A38C79C36C35"><span class="RefLink">24.5-7</span></a>).</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ KroneckerProduct</code>( <var class="Arg">mat1</var>, <var class="Arg">mat2</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>The Kronecker product of two matrices is the matrix obtained when replacing each entry <var class="Arg">a</var> of <var class="Arg">mat1</var> by the product <code class="code"><var class="Arg">a</var>*<var class="Arg">mat2</var></code> in one matrix.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ReflectionMat</code>( <var class="Arg">coeffs</var>[, <var class="Arg">conj</var>][, <var class="Arg">root</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Let <var class="Arg">coeffs</var> be a row vector. <code class="func">ReflectionMat</code> returns the matrix of the reflection in this vector.</p>
<p>More precisely, if <var class="Arg">coeffs</var> is the coefficients list of a vector <span class="SimpleMath">\(v\)</span> w.r.t. a basis <span class="SimpleMath">\(B\)</span> (see <code class="func">Basis</code> (<a href="chap61_mj.html#X837BE54C80DE368E"><span class="RefLink">61.5-2</span></a>)) then the returned matrix describes the reflection in <span class="SimpleMath">\(v\)</span> w.r.t. <span class="SimpleMath">\(B\)</span> as a map on a row space, with action from the right.</p>
<p>The optional argument <var class="Arg">root</var> is a root of unity that determines the order of the reflection. The default is a reflection of order 2. For triflections one should choose a third root of unity etc. (see <code class="func">E</code> (<a href="chap18_mj.html#X8631458886314588"><span class="RefLink">18.1-1</span></a>)).</p>
<p><var class="Arg">conj</var> is a function of one argument that conjugates a ring element. The default is <code class="func">ComplexConjugate</code> (<a href="chap18_mj.html#X7BE001A0811CD599"><span class="RefLink">18.5-2</span></a>).</p>
<p>The matrix of the reflection in <span class="SimpleMath">\(v\)</span> is defined as</p>
<p class="center">\[
M = I_n + <var class="Arg">conj</var>(v^{tr}) \cdot (<var class="Arg">root</var>-1) /
(v \cdot <var class="Arg">conj</var>(v^{tr})) \cdot v
\]</p>
<p>where <span class="SimpleMath">\(n\)</span> is the length of the coefficient list.</p>
--> --------------------
--> maximum size reached
--> --------------------
¤ Dauer der Verarbeitung: 0.126 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.