---
title: "Solutions of Systems of Linear Equations"
canonical: "https://docs.magma-maths.org/v2.30-1/Algebras/MatrixAlgebras/solution-equation.html"
source: "https://docs.magma-maths.org/v2.30-1/Algebras/MatrixAlgebras/solution-equation.md"
part: "Algebras"
chapter: "Matrix Algebras"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/index-algebras.md"}
  - {"title": "Matrix Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/MatrixAlgebras/index-matrix-algebras.md"}
prev: {"title": "Diagonalising Commutative Algebras over a Field", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/MatrixAlgebras/diag.md"}
next: {"title": "Presentations for Matrix Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/MatrixAlgebras/presentations.md"}
intrinsics:
  - {"name": "IsConsistent", "signature": "IsConsistent(A, w): ModMatRngElt, ModTupRng -> BoolElt, ModTupRngElt, ModTupRng"}
  - {"name": "IsConsistent", "signature": "IsConsistent(A, W): ModMatRngElt, [ ModTupRng ] -> BoolElt, [ ModTupRngElt ], ModTupRng"}
  - {"name": "Solution", "signature": "Solution(A, w): ModMatRngElt, ModTupRng -> ModTupRngElt, ModTupRng"}
  - {"name": "Solution", "signature": "Solution(A, W): ModMatRngElt, [ ModTupRng ] -> [ ModTupRngElt ], ModTupRng"}
---

# Solutions of Systems of Linear Equations

<a id="function-isconsistent-modmatrngelt-modtuprng"></a>
## `IsConsistent(A, w): ModMatRngElt, ModTupRng -> BoolElt, ModTupRngElt, ModTupRng`

Given a matrix $A$ belonging to $M_n(R)$ and a vector $w$ belonging to the tuple module $R^{(n)}$, return `true` iff the system of linear equations $v*A = w$ is consistent. If the system is consistent, then the function will also return:

**(a)**
A particular solution $v$;

**(b)**
The kernel $K$ of $A$ so that $(v + k) * A = w$ for $k\in K$.

<a id="function-isconsistent-modmatrngelt-modtuprng-2"></a>
## `IsConsistent(A, W): ModMatRngElt, [ ModTupRng ] -> BoolElt, [ ModTupRngElt ], ModTupRng`

Given a matrix $A$ belonging to $M_n(R)$ and a sequence $W$ of vectors belonging to the tuple module $R^{(m)}$, return `true` iff the system of linear equations $V[i]*A = W[i]$ for each $i$ is consistent. If the systems are all consistent, then the function will also return:

**(a)**
A solution sequence $V$;

**(b)**
The kernel $K$ of $A$ so that $(V[i] + k) * A = W[i]$ for $k\in K$.

<a id="function-solution-modmatrngelt-modtuprng"></a>
## `Solution(A, w): ModMatRngElt, ModTupRng -> ModTupRngElt, ModTupRng`

Given a matrix $A$ belonging to $M_n(R)$ and a vector $w$ belonging to the tuple module $R^{(n)}$, solve the system of linear equations $v*A = w$. The function returns two values:

**(a)**
A particular solution $v$;

**(b)**
The kernel $K$ of $A$ so that $(v + k) * A = w$ for $k\in K$.

<a id="function-solution-modmatrngelt-modtuprng-2"></a>
## `Solution(A, W): ModMatRngElt, [ ModTupRng ] -> [ ModTupRngElt ], ModTupRng`

Given a matrix $A$ belonging to $M_n(R)$ and a sequence $W$ of vectors belonging to the tuple module $R^{(n)}$, solve the system of linear equations $V[i]*A = W[i]$ for each $i$. The function returns two values:

**(a)**
A solution sequence $V$;

**(b)**
The kernel $K$ of $A$ so that $(V[i] + k) * A = W[i]$ for $k\in K$.
