I am looking for a way that I can solve this with three inputs and nine outputs, not changing the number of outputs, all of the constraints are necessary. In matlab this can be done with three inputs and nine outputs. The error that I get is TypeError: fsolve: there is a mismatch between the input and output shape of the 'func' argument 'F'. What we do is change the 3x3 system to a 2x2 system by eliminating one of the variables using the elimination, then we solve the 2x2 system as we have done before. In my function above a, b, and y correspond to alpha, beta, and gamma respectively. Solving three-variable, three-equation linear systems is not more difficult than solving the two-variable systems, it does take longer. Math.sin(a)*math.sin(b)*s(y) - s(b)*math.sin(y), In Python, NumPy (Numerical Python), SciPy (Scientific Python) and SymPy (Symbolic Python) libraries can be used to solve systems of linear equations. R = [s(b)*s(y) + math.sin(a)*math.sin(b)*math.sin(y), Stack Exchange network consists of 179 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. I have been trying to use and a few other non-linear solvers but keep running into the issue that the input size, 3 corresponding to alpha, beta, and gamma is different than the output size.
![3x3 system of equations solver with work 3x3 system of equations solver with work](https://miro.medium.com/max/1400/1*6LRv9DMK9hXvwm5JVpTQuA.png)
![3x3 system of equations solver with work 3x3 system of equations solver with work](https://i.ytimg.com/vi/0JQeo0yC9OQ/maxresdefault.jpg)
The matrix of equations corresponds to another 3x3 matrix of values for each equation, named rot in the example code. I need to solve a 3x3 matrix of equations for three variables: alpha, beta, and gamma.