A function behaving as you state is a linear function, which means that the output varies directly with the input.
So, there exists some constant
such that your function is in the form

In fact, if you double the input, you have

And similarly

Note that this is a guess, it may happen that output doubles (triples) if you double (triple) the input, and still the function is not like
.
For example, the function

is such that

So, it may seems that doubling and tripling the input doubles and triples the output, but this is not true for every input, for example,

And so doubling the input didn't double the output.