Matrix of a system

### 15.7.1 Matrix of a system

The syst2mat command turns a system of linear equations into its augmented matrix. (For this command, the augmented matrix of Ax=b has the column vector −b glued to the right of A.)

- syst2mat takes two as arguments:
  - eqns, a list of the equations or expressions (assumed to be equal to zero) of a linear system.
  - vars, a list of the variable names.
- syst2mat(eqns,vars) returns the augmented matrix of the system.

##### Remark.

Note that the variables must be purged before syst2mat is called.

#### Examples

syst2mat([x+y,x-y-2],[x,y])

⎡ ⎢ ⎣ |
1 | 1 | 0
1 | −1 | −2
| ⎤ ⎥ ⎦

syst2mat([x+y=0,x-y=2],[x,y])

⎡ ⎢ ⎣ |
1 | 1 | 0
1 | −1 | −2
| ⎤ ⎥ ⎦