 linalg(deprecated)/linsolve - Maple Help

linalg(deprecated)

 linsolve
 solution of linear equations Calling Sequence linsolve(A, b, 'r', v) linsolve(A, B, 'r', v) Parameters

 A - matrix b - vector B - matrix r - (optional) name v - (optional) name Description

 • Important: The linalg package has been deprecated. Use the superseding packages LinearAlgebra[LinearSolve], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The function linsolve(A, b) finds the vector x which satisfies the matrix equation $A\x\=\b$. If A has n rows and m columns, then $\mathrm{vectdim}\left(b\right)$ must be n and $\mathrm{vectdim}\left(x\right)$ will be m, if a solution exists.
 • If $Ax=b$ has no solution or if Maple cannot find a solution, then the null sequence NULL is returned. If $Ax=b$ has many solutions, then the result will use global names (see below) to describe the family of solutions parametrically.
 • The call linsolve(A, B) finds the matrix X which solves the matrix equation $AX=B$ where each column of X satisfies $\mathrm{Acol}\left(X,i\right)=\mathrm{col}\left(B,i\right)$ . If $\mathrm{AX}=B$ has does not have a unique solution, then NULL is returned.
 • The optional third argument is a name which will be assigned the rank of A.
 • The optional fourth argument allows you to specify the seed for the global names used as parameters in a parametric solution.  If there is no fourth argument, the default, then the global names _t, _t, _t, ... will be used in the vector case, _t, _t, _t, ... in the matrix case (where _t[i] is used for the first column, _t[i] for the second, etc).  This is particularly useful when programming with linsolve.  If you declare v as a local variable and then call linsolve with fourth argument v, the resulting parameters (v, v, ...) will be local to the procedure.
 • An inert linear solver, Linsolve, is known to the mod function and can be used to solve systems of linear equations (matrix equations) modulo an integer m.
 • The command with(linalg,linsolve) allows the use of the abbreviated form of this command. Examples

Important: The linalg package has been deprecated. Use the superseding packages LinearAlgebra[LinearSolve], instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $A≔\left[\begin{array}{rr}1& 2\\ 1& 3\end{array}\right]:$
 > $b≔\left[\begin{array}{cc}1& -2\end{array}\right]:$
 > $\mathrm{linsolve}\left(A,b\right)$
 $\left[\begin{array}{cc}{7}& {-3}\end{array}\right]$ (1)
 > $B≔\left[\begin{array}{cc}1& 1\\ -2& 1\end{array}\right]:$
 > $\mathrm{linsolve}\left(A,B\right)$
 $\left[\begin{array}{cc}{7}& {1}\\ {-3}& {0}\end{array}\right]$ (2)
 > $A≔\left[\begin{array}{rr}5& 7\\ 0& 0\end{array}\right]:$
 > $b≔\left[\begin{array}{cc}3& 0\end{array}\right]:$
 > $\mathrm{linsolve}\left(A,b,'r'\right)$
 $\left[\begin{array}{cc}\frac{{3}}{{5}}{-}\frac{{7}{}{{\mathrm{_t}}}_{{1}}}{{5}}& {{\mathrm{_t}}}_{{1}}\end{array}\right]$ (3)
 > $\mathrm{linsolve}\left(A,b,'r',v\right)$
 $\left[\begin{array}{cc}\frac{{3}}{{5}}{-}\frac{{7}{}{{v}}_{{1}}}{{5}}& {{v}}_{{1}}\end{array}\right]$ (4)
 > $A≔\left[\begin{array}{rr}5& 7\\ 10& 14\end{array}\right]$
 ${A}{≔}\left[\begin{array}{cc}{5}& {7}\\ {10}& {14}\end{array}\right]$ (5)
 > $B≔\left[\begin{array}{rr}3& 0\\ 6& 0\end{array}\right]$
 ${B}{≔}\left[\begin{array}{cc}{3}& {0}\\ {6}& {0}\end{array}\right]$ (6)
 > $\mathrm{linsolve}\left(A,B\right)$
 $\left[\begin{array}{cc}\frac{{3}}{{5}}{-}\frac{{7}{}{\left({{\mathrm{_t}}}_{{1}}\right)}_{{1}}}{{5}}& {-}\frac{{7}{}{\left({{\mathrm{_t}}}_{{2}}\right)}_{{1}}}{{5}}\\ {\left({{\mathrm{_t}}}_{{1}}\right)}_{{1}}& {\left({{\mathrm{_t}}}_{{2}}\right)}_{{1}}\end{array}\right]$ (7)