Hacker News new | ask | show | jobs
by Chris2048 3272 days ago
There's a nuance here too.

in programming, y = f(x) = x^2 is one way; 'y' is a label for a function of one variable.

But in math there is no fixed typing, or distinctions. The symbolic equation represents a relationship.

Hence:

y(x) = x^2 <=> x(y) = (+/-) sqrt(y)

the domain and domain can be switched and the entire equation rearrange so that a 'variable' becomes a 'function'.

1 comments

Here is an interesting observation on what you wrote:

x(y) = (+/-) sqrt(y)

is not valid notation. On the left hand side you are stating that x is a function of y. But on the right hand side your usage of (+/-) indicates that y can go to two different values. Hence x is not a function of y. To be a function one must have each input going to a distinct output.

Yep, that was on purpose somewhat. A choice of +/- will essentially make a restricted codomain, to positives say.

That means switching the variables around switched domain/codomain.

An example where they are both the same:

y(x) = x + 1 <=> x(y) = y - 1