TITLE: What's the difference between an independent and dependent variable?
QUESTION [5 upvotes]: A independent variable is "the input" and the dependent variable is the "output", atleast thats how it was explained to us.
But if you have some random function can't both variables be seen as "affecting" the other variable?
For example, in $ y = 1/x$, "x" could be seen as an input and "y" the output, but isn't the opposite also true. Why can't "y" be the input and "x" be the output? 
You could say that the dependent variable is the variable that has a unique independent variable associated with it, but thats not necessary true with the independent variable. (Think $y = x^2$. $x$ is the independent variable because for every $x$ value there is only one $y$ value, but there isn't a a unique $x$ value for every $y$ value)
But how can this definition be extended to functions that has unique domain values for all range values and unique range values for all domain values? Think $y= 1/x$.

REPLY [2 votes]: Note that $y=x^2$ is an equation, to be more precisely a statement form.  It states: “The second coordinate is the square of the first one.”  For the coordinates of a point that statement may be true -- for $(-2,4)$, e.g.-- or false for, say $(7,50)$. The set of points for which the statement form yields a true statement is called the solution set  of the statement form.  The statement form $y-x^2=0$ states: “The difference of the first coordinate and the square of the second equals zero.” is a different statement form, but has the same solution set as the first one.  
The second one is given in a so called implicit form, wheras the first is called an explicit form. Why bother about the to forms?  Well, if you want to determine the second coordinate of a point in the solution set, given the first coordinate is $7$, let's do it using the imlicit form. We have
$$y-7^2=0\iff y=49,$$
so you have to solve an equation. (That's the reason for why we call it implicit.). Using the explicit form we get immediately $y=7^2=49$ without solving any equation.
Your first example $y=1/x$: “The second coordinate is the reciprocal of the first one.” reads in implicit version $xy=1$: “The product of both coordinates equals one.”  Another explicit form is $x=1/y$.  So if you are able to isolate one coordinate in an implicit form, this coordinate is called dependent, the other independent.  In $x=1/y$ the coordinate $x$ is dependent and $y$ independent whereas in $y=1/y$ it's vice versa.
Now in $y-x^2=0$ you can't isolate $x$ in a closed form, here we have $\sqrt{y}=|x|$.  So if for example $y=25$ we have $\sqrt{25}=|x|\iff5=|x|\iff x=5\lor x=-5$, so we have to solve an equation anyway.  You may write $x=\pm\sqrt{y}$ and see that for all positive $y$ you'll get two values of $x$, so that explicit form is not a function, which mathematicians prefer. 
In the example $x^2+y^2=1$ given by James there doesn't exist any explicit form which is a function, for an obvious reason: the solution set is the unit circle, centered at the origin.
Facit: if a statement form allows an explicit form of one of the coordinates and that explicit form is a function, you are free to call the isolated coordinate dependent and the other independent.  I never use those attributes, because they are rather useless, won't gain any knowledge and are causing a lot of trouble as we see here.