How to find one solution of $Ax = b$, where $A$ is a $(m, n)$ matrix and $x$ a vector of size $(n, 1)$. $A$, $x$ and $b$ are matrices of integers entries.
How to check whether is a solution exists?
How to find one solution of $Ax = b$, where $A$ is a $(m, n)$ matrix and $x$ a vector of size $(n, 1)$. $A$, $x$ and $b$ are matrices of integers entries.
How to check whether is a solution exists?
Copyright © 2021 JogjaFile Inc.
First thought I had up to now: Lets look at the first row $[a_1, a_2, \ldots , a_n]$ of the matrix $A$. Then obviously $gcd(a_1,\ldots,a_n)$ must divide $b_1$. If not, there are no solution. This can be applied to every row.
The other way around $gcd(x_1,\ldots,x_m)$ must (by the same argument) divide every $b_i$.