 Linear - Maple Help

SolveTools

 Linear
 solve linear system of equations Calling Sequence Linear(eqns, vars, meth, notz) Parameters

 eqns - list or set; system of equations vars - list or set; variables to solve with respect to meth - (optional) equation of the form method=Method, where Method is one of the following: AlgebraicFunction, AlgebraicNumber, ComplexFloat, ComplexRational, Float, Polynomial, RadicalFunction, RadicalNumber, Rational, RationalDense, or RationalAlgebraicFunction; the algorithm to be used notz - (optional) expressions that must not equal zero Description

 • The Linear command solves system of linear equations.
 • Optional arguments can contain expressions which must not be zero, notz, and the method for solving the system.
 If method is not specified, Linear tries to dispatch to an algorithm according to the type of the system. The possible methods correspond to the following types of equations (the check is performed in this order).

 Equation type Method 1 $'\mathrm{polynom}'\left('\mathrm{rational}',\mathrm{vars}\right)$ Rational 2 $'\mathrm{polynom}'\left('\mathrm{numeric}',\mathrm{vars}\right)$ Float 3 $'\mathrm{polynom}'\left('\mathrm{complex}'\left('\mathrm{rational}'\right),\mathrm{vars}\right)$ ComplexRational 4 $'\mathrm{polynom}'\left('\mathrm{complex}'\left('\mathrm{numeric}'\right),\mathrm{vars}\right)$ ComplexFloat 5 $'\mathrm{ratpoly}'\left('\mathrm{rational}'\right)$ Polynomial 6 $'\mathrm{polynom}'\left('\mathrm{algnum}',\mathrm{vars}\right)$ AlgebraicNumber 7 $'\mathrm{ratpoly}'\left('\mathrm{radnum}',\mathrm{vars}\right)$ RadicalNumber 8 $'\mathrm{ratpoly}'\left('\mathrm{algnum}'\right)$ RationalAlgebraicFunction 9 $'\mathrm{algfun}'\left('\mathrm{rational}'\right)$ AlgebraicFunction 10 $'\mathrm{radfun}'\left('\mathrm{rational}'\right)$ RadicalFunction

 • If the method is not specified and the system is not of one of the above types, Linear uses the default universal method, which is a primitive fraction-free algorithm.
 • Most algorithms are intended to be used on large sparse systems, however, they also perform well on dense systems. The exception is the RationalDense method that is specifically optimized for dense systems of rational numbers, especially overconstrained systems with infinitely many solutions.
 • The algorithms used are Gaussian elimination with pivoting for stability for the numeric coefficients and primitive fraction-free for the algebraic and radical coefficients.
 • Many of the methods can also be called directly as exports of the SolveTools:-LinearSolvers module. Examples

 > $\mathrm{with}\left(\mathrm{SolveTools}\right):$
 > $\mathrm{Linear}\left(\left\{x+y,x-y-2\right\},\left\{x,y\right\}\right)$
 $\left\{{x}{=}{1}{,}{y}{=}{-1}\right\}$ (1)
 > $\mathrm{Linear}\left(\left[x+y,x-y-2\right],\left[x,y\right],\left[y+1\right]\right)$
 > $\mathrm{Linear}\left(\left\{x+y-5.,4x-3y-2\right\},\left\{x,y\right\}\right)$
 $\left\{{x}{=}{2.428571428}{,}{y}{=}{2.571428571}\right\}$ (2)
 > $\mathrm{Linear}\left(\left\{x+y-5,4x-3y-2-I\right\},\left\{x,y\right\},\mathrm{method}=\mathrm{ComplexFloat}\right)$
 $\left\{{x}{=}{2.428571428}{+}{0.1428571429}{}{I}{,}{y}{=}{2.571428571}{-}{0.1428571428}{}{I}\right\}$ (3)

The following example returns NULL since the system has polynomials of y as coefficients and there is no x such that equations hold for all values of y.

 > $\mathrm{Linear}\left(\left\{x+y-5,4x-3y-2\right\},\left\{x\right\}\right)$
 > $\mathrm{Linear}\left(\left\{x+y+z-{5}^{\frac{1}{2}},4x-3y-2\right\},\left\{x,y,z\right\}\right)$
 $\left\{{x}{=}\frac{{1}}{{2}}{+}\frac{{3}{}{y}}{{4}}{,}{y}{=}{y}{,}{z}{=}{-}\frac{{1}}{{2}}{-}\frac{{7}{}{y}}{{4}}{+}\sqrt{{5}}\right\}$ (4)
 > $\mathrm{Linear}\left(\left\{x+2\mathrm{RootOf}\left({v}^{2}-w,v\right)wy,5xw-3y+7\right\},\left\{x,y\right\}\right)$
 $\left\{{x}{=}{-}\frac{{14}{}{w}{}\left({10}{}{{w}}^{{3}}{-}{3}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{w}\right)\right)}{{100}{}{{w}}^{{5}}{-}{9}}{,}{y}{=}\frac{{7}{}\left({10}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{w}\right){}{{w}}^{{2}}{-}{3}\right)}{{100}{}{{w}}^{{5}}{-}{9}}\right\}$ (5) Compatibility

 • The method option was updated in Maple 2023.