This is actually quite a deep-going question. To truly determine which variables (in an experiment, or in an observation of nature) depend of other variables is sometime very difficult and laborious. In math this may be easier. See detail below.
In pure mathematics, where variables do not necessarily carry a physical meaning, the determination is a matter of definition. A variable is defined to be dependent on another variable, for instance, y depends on x via the specific function, y = 10x + 10. The key is: this is given. Otherwise (if it were not given), suppose I gave you an equation a+b=10 and not told you which is the dependent and which the independent variable. You could think of each being either: a=10-b and b=10-a. Without this being defined, there is no clear way to determine dependency.
In science, on the other hand, the determination is made based on experimental design and based on certain plausible assumptions about natural dependencies. For example, if you design an experiment to measure some physical quantity, such a height of an individual, you can look at the that as a variable dependent on other variables, such as age, ie., what is the average height of a person given their particular age (say, 0, 1, 2,..., 18 years of age). It would be more of a stretch to measure the age as dependent variable of height.
I hope these thoughts are helpful.