LinearAlgebra
GenerateEquations
generate equations from the coefficient Matrix
Calling Sequence
Parameters
Description
Examples
GenerateEquations(A, v, B)
A
-
m x n Matrix
v
list; specifies the n unknowns
B
(optional) m x 1 Vector
The GenerateEquations(A, v) function generates a list of linear equations from the coefficient Matrix A, using the variable names given in v.
If the optional m x 1 right-hand side Vector B is included in the calling sequence, then the list of linear equations is equivalent to the Matrix equation A·x=B, where the x[i] are equal to the corresponding v[i]. In this case, v must specify exactly n unknowns.
If the optional right-hand side Vector B is not included in the calling sequence, and v specifies exactly n unknowns, then the right-hand sides of the m linear equations are set to zero. The list of equations is then equivalent to A·x=ZeroVector⁡m.
If the optional right-hand side Vector B is not included in the calling sequence, and v specifies exactly n-1 unknowns, then the right-hand sides of the m linear equations are taken from the last column of the Matrix A. That is, the Matrix A is treated as an augmented matrix. The list of equations is then equivalent to A1..−1,1..−2·x=A1..−1,−1.
This function is part of the LinearAlgebra package, and so it can be used in the form GenerateEquations(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[GenerateEquations](..).
with⁡LinearAlgebra:
V≔Transpose⁡VandermondeMatrix⁡1,2,3,4
V≔1111123414916182764
GenerateEquations⁡V,w,x,y,z,0,−1,3,35
w+x+y+z=0,w+2⁢x+3⁢y+4⁢z=−1,w+4⁢x+9⁢y+16⁢z=3,w+8⁢x+27⁢y+64⁢z=35
UseHardwareFloats≔false:
A≔0.40,0.10,0.50|0.20,0.70,0.10|0.20,0.20,0.60
A≔0.400.200.200.100.700.200.500.100.60
GenerateEquations⁡A−1,v1,v2,v3
−0.60⁢v1+0.20⁢v2+0.20⁢v3=0,0.10⁢v1−0.30⁢v2+0.20⁢v3=0,0.50⁢v1+0.10⁢v2−0.40⁢v3=0
B≔a,c|b,d|1,1
B≔ab1cd1
GenerateEquations⁡B,x,y
a⁢x+b⁢y=1,c⁢x+d⁢y=1
See Also
LinearAlgebra[GenerateMatrix]
LinearAlgebra[LinearSolve]
LinearAlgebra[ZeroVector]
Matrix
Vector
Download Help Document