GenerateMatrix - Maple Help

Student[LinearAlgebra]

 GenerateMatrix
 generate the coefficient Matrix from linear equations

 Calling Sequence GenerateMatrix(eqns, vars, options)

Parameters

 eqns - list or set of (linear) equations vars - list or set of variables in which the equations occur options - (optional) parameters; for a complete list, see LinearAlgebra[GenerateMatrix]

Description

 • The GenerateMatrix(eqns, vars) command generates the augmented coefficient Matrix or coefficient Matrix and right hand side Vector from the linear system of equations eqns in the unknowns vars.  The augmented form is the default, and the last column of this Matrix is the right-hand side values from the original list of equations.
 • The non-augmented form is returned if the result is assigned to two variables (see the second example below) or if the augmented = false option is provided.

Examples

 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{LinearAlgebra}\right]\right):$
 > $\mathrm{sys}≔\left[3x\left[1\right]+2x\left[2\right]+3x\left[3\right]-2x\left[4\right]=1,x\left[1\right]+x\left[2\right]+x\left[3\right]=3,x\left[1\right]+2x\left[2\right]+x\left[3\right]-x\left[4\right]=2\right]:$
 > $\mathrm{var}≔\left[x\left[1\right],x\left[2\right],x\left[3\right],x\left[4\right]\right]:$
 > $\mathrm{GenerateMatrix}\left(\mathrm{sys},\mathrm{var}\right)$
 $\left[\begin{array}{ccccc}{3}& {2}& {3}& {-2}& {1}\\ {1}& {1}& {1}& {0}& {3}\\ {1}& {2}& {1}& {-1}& {2}\end{array}\right]$ (1)
 > $A,b≔\mathrm{GenerateMatrix}\left(\mathrm{sys},\mathrm{var}\right)$
 ${A}{,}{b}{≔}\left[\begin{array}{cccc}{3}& {2}& {3}& {-2}\\ {1}& {1}& {1}& {0}\\ {1}& {2}& {1}& {-1}\end{array}\right]{,}\left[\begin{array}{c}{1}\\ {3}\\ {2}\end{array}\right]$ (2)
 > $A≔\mathrm{GenerateMatrix}\left(\mathrm{sys},\mathrm{var}\right)$
 ${A}{≔}\left[\begin{array}{ccccc}{3}& {2}& {3}& {-2}& {1}\\ {1}& {1}& {1}& {0}& {3}\\ {1}& {2}& {1}& {-1}& {2}\end{array}\right]$ (3)