# Thread: Solve system of 7 equations with 3 unknowns

1. ## Solve system of 7 equations with 3 unknowns

I want to solve this in some form of Ax=b , but getting this into a system of linear equations in matrix form is perplexing me....

thanks for any insight

equations:

x*cos((2*pi*50*z)/2000)) - y*sin((2*pi*50*z)/2000))=.008
x*cos((2*pi*60*z)/2000)) - y*sin((2*pi*60*z)/2000))=.009
x*cos((2*pi*70*z)/2000)) - y*sin((2*pi*70*z)/2000))=.006
x*cos((2*pi*80*z)/2000)) - y*sin((2*pi*80*z)/2000))=.005
x*cos((2*pi*90*z)/2000)) - y*sin((2*pi*90*z)/2000))=.0009
x*cos((2*pi*100*z)/2000)) - y*sin((2*pi*100*z)/2000))=.0008
x*cos((2*pi*110*z)/2000)) - y*sin((2*pi*110*z)/2000))=.0001

2. Originally Posted by jcf2506
I want to solve this in some form of Ax=b , but getting this into a system of linear equations in matrix form is perplexing me....

thanks for any insight

equations:

x*cos((2*pi*50*z)/2000)) - y*sin((2*pi*50*z)/2000))=.008
x*cos((2*pi*60*z)/2000)) - y*sin((2*pi*60*z)/2000))=.009
x*cos((2*pi*70*z)/2000)) - y*sin((2*pi*70*z)/2000))=.006
x*cos((2*pi*80*z)/2000)) - y*sin((2*pi*80*z)/2000))=.005
x*cos((2*pi*90*z)/2000)) - y*sin((2*pi*90*z)/2000))=.0009
x*cos((2*pi*100*z)/2000)) - y*sin((2*pi*100*z)/2000))=.0008
x*cos((2*pi*110*z)/2000)) - y*sin((2*pi*110*z)/2000))=.0001

If you have an equation of the form

$A\mathbf{x} = \mathbf{b}$

where $A$ is NOT a square matrix, you can create a square matrix by premulitplying both sides by $A^T$.

So $A^TA\mathbf{x} = A^T\mathbf{b}$.

Now that you have a square matrix on the LHS ( $A^TA$), you can premultiply both sides by its inverse (provided an inverse exists).

$(A^TA)^{-1}A^TA\mathbf{x} = (A^TA)^{-1}A^T\mathbf{b}$

$I\mathbf{x} = (A^TA)^{-1}A^T\mathbf{b}$

$\mathbf{x} = (A^TA)^{-1}A^T\mathbf{b}$.

Does this help?

3. ## clarification on reply to: solve system of 7 eqns

First of all, thank you so much for the help, your answer did clarify things immensely, but unfortunately part of my problem is setting up my Ax=b

what does A and x look like? I know b is a vector of all the answers and I know x will be some combination of my variables in vector form [x y z] , but I am not sure what A looks like to begin the operations you mentioned on the first response of A^TA etc

thanks again, all the best

4. Originally Posted by jcf2506
I want to solve this in some form of Ax=b , but getting this into a system of linear equations in matrix form is perplexing me....

thanks for any insight

equations:

x*cos((2*pi*50*z)/2000)) - y*sin((2*pi*50*z)/2000))=.008
x*cos((2*pi*60*z)/2000)) - y*sin((2*pi*60*z)/2000))=.009
x*cos((2*pi*70*z)/2000)) - y*sin((2*pi*70*z)/2000))=.006
x*cos((2*pi*80*z)/2000)) - y*sin((2*pi*80*z)/2000))=.005
x*cos((2*pi*90*z)/2000)) - y*sin((2*pi*90*z)/2000))=.0009
x*cos((2*pi*100*z)/2000)) - y*sin((2*pi*100*z)/2000))=.0008
x*cos((2*pi*110*z)/2000)) - y*sin((2*pi*110*z)/2000))=.0001
Try

$\left[\begin{matrix}\cos{\frac{2\pi\cdot 50z}{2000}} & -\sin{\frac{2\pi \cdot 50z}{2000}} \\ \cos{\frac{2\pi \cdot 60z}{2000}} & -\sin{\frac{2\pi \cdot 60z}{2000}} \\ \cos{\frac{2\pi \cdot 70z}{2000}} & -\sin{\frac{2\pi \cdot 70z}{2000}} \\ \cos{\frac{2\pi \cdot 80z}{2000}} & -\sin{\frac{2\pi \cdot 80z}{2000}}\end{matrix}\right]$ etc... as $A$, (it wouldn't let me fit it all on the page)

$\left[\begin{matrix}x \\ y \end{matrix}\right]$ as $\mathbf{x}$

and $\left[\begin{matrix}0.008 \\ 0.009 \\ 0.006 \\ 0.005 \\ 0.0009 \\ 0.0008 \\ 0.0001 \end{matrix}\right]$ as $\mathbf{b}$.