ApCoCoA:IML.Solve

From CoCoAWiki
Jump to: navigation, search

<command>

 <title>IML.Solve</title>
 <short_description>Solves a system of linear equations.</short_description>
 

<syntax> IML.Solve(M:MAT, B:MAT):MAT </syntax>

 <description>

Please note: The function(s) explained on this page is/are using the ApCoCoAServer. You will have to start the ApCoCoAServer in order to use it/them. <par/> Let M and B be matrices defined over the ring of integers, a finite field or the field of rationals. This function tries to solve the linear equation system M*X = B by using the ApCoCoAServer supported by the IML library. <par/> The return value will be a solution vector of the linear equation system or an empty matrix if no solution has been found. <itemize>

 <item>@param M A matrix with components either of type INT, ZMOD or RAT.</item>
 <item>@param B A matrix with components either of type INT, ZMOD or RAT.</item>
 <item>@return A matrix X representing a solution vector of the linear equation system M*X = B if a solution exists or the empty matrix otherwise.</item>

</itemize> <example> Use ZZ/(19)[x]; M := BringIn(Mat([[1,3,4], [0,2,1]])); B := BringIn(Mat([[1], [2]])); IML.Solve(M, B);


Mat([

 [-2 % 19],
 [1 % 19],
 [0 % 19]

])


</example> <example> Use QQ[x]; M := Mat([ [1,3,4], [0,2,1], [1,3,4] ]); B := Mat([ [1], [2], [0] ]); IML.Solve(M, B);


Mat([

 [ ]

])


</example>

 </description>
 <see>Introduction to CoCoAServer</see>
 <see>LinAlg.Solve</see>
 <see>LinBox.Solve</see>
 <see>LinKer</see>
 <types>
   <type>matrix</type>
   <type>apcocoaserver</type>
 </types>
 <key>Solve</key>
 <key>IML.Solve</key>
 <key>iml.Solve</key>
 <key>solve linear equation system</key>
 <key>solve linear equation</key>
 <wiki-category>Package_iml</wiki-category>

</command>