First of all, note that, like most dictionary definitions, this is not a complete sentence. To make it a complete sentence, we can read it as "[A function is] a variable so related...".
Second, note that the noun "variable" is implied in the prepositional phrase beginning with to, and in a few other places thereafter:
A variable so related to another [variable]...
Third, I think you may be getting tripped up by the adverb so, which is used in a nonintuitive way in this definition. It is used here in the sense of "in such a way" or "in the manner indicated":
A variable [that is] related to another [in such a way] that for each value assumed by one there is a value determined for the other.
This is roughly the same sense in which you use the word yourself: "...only to fail to do so."
The reason it's confusing here is that although the word "related" is being used here as a verb in the past tense, "related" can be used as an adjective as well. And when we see the construction "[noun] ([verb]) so [adjective]," the word so is usually used in a different sense--that of an intensifier indicating a greatness of degree:
...a man so old his hair was as white as snow.
Knowing all this, we can rewrite the definition in a way that may be clearer to you:
[A function is] a variable [that is] related to another [variable] [in such a way] that for each value assumed by one [variable] there is a value determined for the other [variable].