# Solve system of 7 equations with 3 unknowns

• Jan 22nd 2010, 08:52 PM
jcf2506
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
• Jan 22nd 2010, 09:48 PM
Prove It
Quote:

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

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

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

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

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

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

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

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

Does this help?
• Jan 23rd 2010, 08:53 AM
jcf2506
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
• Jan 23rd 2010, 07:26 PM
Prove It
Quote:

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

$\displaystyle \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 $\displaystyle A$, (it wouldn't let me fit it all on the page)

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

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