I have matrix A of dimension [nXm] like
w1 w2 0
w3 0 w4
0 w5 0
a vector b with known value of size [mX1]:
10
5
3
and a vector c of size [nX1]
0
0
0
I want now to find on solution (finding values of w1, ..., w5) that fulfills the Equation:
A*b = c
using pyspark.
Since your set of equations are underdetermined. i.e. number of unknown variables are more than the number of equations, you will get parametrized solutions.
You can solve system of linear equations (underdetermined, overdetermined or unique) using
sympylibrary.I have adapted the following stackoverflow solution to given an example of how you can solve your equation.
https://stackoverflow.com/a/50048060/3238085
Output :
Verification :