Linsolve
inert matrix solve
Calling Sequence
Parameters
Description
Examples
Linsolve(A, b) mod n
Linsolve(A, b, 'r', 't') mod n
A
-
rectangular Matrix
b
Vector
'r'
(optional) name
't'
n
an integer, the modulus
The Linsolve function is a placeholder for representing the solution x to the linear system A⁢x=b.
The call Linsolve(A,b) mod n computes the solution vector b if it exists of the linear system A⁢x=b over a finite ring of characteristic n. This includes finite fields, GF⁡p, the integers mod p, and GF⁡pk where elements of GF⁡pk are expressed as polynomials in RootOfs.
If an optional third parameter r is specified, and it is a name, it is assigned the rank of the matrix A.
A linear system with an infinite set of solutions will be parametrized in terms of variables. Maple uses the global names _t[1], _t[2], ... are used by default. If an optional fourth parameter t is specified, and it is a name, the names t[1], t[2], etc. will be used instead.
A≔Matrix⁡1,2,3,1,3,0,1,4,3
A≔123130143
b≔Vector⁡1,2,3
b≔123
x≔Linsolve⁡A,bmod5
x≔410
A·x−bmod5
000
x≔Linsolve⁡A,b,r,tmod6
x≔5+3⁢t31+3⁢t3t3
r
2
A·x−bmod6
An example using GF(2^4).
alias⁡a=RootOf⁡y4+y+1mod2:
A≔Matrix⁡1,a,a2,1,a2,1,1,a3,a2
A≔1aa21a211a3a2
b≔Vector⁡1,a,a2
b≔1aa2
x≔Linsolve⁡A,bmod2
x≔0a3+10
z≔A·x−bmod2
z≔1+a⁢a3+1a2⁢a3+1+aa3⁢a3+1+a2
Expand⁡convert⁡z,listmod2
0,0,0
See Also
Gaussjord
Inverse
mod
Modular[LinearSolve]
Download Help Document