System of equations

PROBLEM/QUESTION:
A school band ordered hats for $3 and large T-shirts for $5. They bought 150 items in all for $590. Graph a system of equations to find how many hats and T-shirts the band ordered.

**PLEASE HELP I DONT UNDERSTAND SYSTEM OF EQUATIONS



Answer :

You would make a system of equations, so the first would be "x+y=150" (x is the number of hats and y is the number of shirts). The second equation would be "3x+5y=590". You would solve the system by either substitution, elimination, or graphing it. 
   If you do it by substitution, you would solve one equation for either variable (the first equation would be easier to solve for either variable) and plug it into the other equation and solve it. So it would look like:  y=150-x      3x+5(150-x)=590    
   If you did it by elimination, you would line the variables in the equations up and make one variable (We'll use x) the opposite of the same variable in the other equation and add the equations together to make the chosen variable cancel out so you could solve for the other variable. So it would look like:   3x+5y=590
                                                                                           + -5x- 5y=-150
                                                                                         -----------------
                                                                                            -2x=440
                                                                                              x=-220
After you do that, you would plug that answer into one of the original equations and solve for the other variable. So it would look like:   -220+y=150
                                                                                     y=370
   If you did it by graphing you would simply graph both equations on the same graph and the point that they intersect at would be your answer.