Frequency ratio (x-axis scaling)
The frequency of each value obtained by the FFT is linearly related to the index of the output value through:
f(i) = (i-1)*sampling_frequency/N
Where N is the number of FFT points (i.e., N=length(y) ). In your case, N=2001 .
You can subtract the sampling rate from your definition of t as 1 / T, where T is the sampling time interval (T = 0.001 in your case). Thus, the sampling rate is 1000 Hz.
Note that since the value of t(i) also linearly related to the index i , through
t(i) = (i-1)*0.001
it is possible (although it is not necessary to advise, as this will simply obscure your code) to determine f = 1000*t*sampling_frequency/N Please note that you are missing the sampling_frequency/N member, which accordingly led to the display of tones with the wrong frequency (from the definition x should be peaks with a frequency of 10 Hz and 50 Hz and corresponding aliases at frequencies of 990 Hz and 950 Hz).
Amplitude Ratio (Y-axis Scaling)
Please note that the observed ratio is only approximate, therefore the following is not a mathematical proof, but simply an intuitive way to visualize the relationship between tone amplitudes in the time domain and peak values ββof the frequency domain.
Simplification of a problem to one tone:
x = A*sin(2*pi*f*t)
The approximate amplitude of the corresponding peak can be obtained using the Parseval theorem :

In the time domain (left side of the equation), the expression is approximately 0.5*N*(A^2) .
In the frequency domain (right side of the equation), making the following assumptions:
- spectral leakage effects are negligible.
- the spectral content of the tone is contained in only 2 pins (at the frequency
f and the corresponding smoothing frequency sampling_frequency-f ) summation is taken into account (all other bins are equal to ~ 0). Note that this is usually only done if the tone frequency is an exact (or nearly accurate) multiple of sampling_frequency/N
the expression on the right-hand side is approximately 2*(1/N)*abs(X(k))^2 for some value of k corresponding to the peak at frequency f .
Putting the two together, we get abs(X(k)) ~ 0.5*A*N In other words, the output amplitude shows a scaling factor of 0.5*N (or approximately 1000 in your case) relative to the amplitude in the time domain, as you noticed.
The idea is still applied with more than one tone (although the negligible assumption of spectral leakage ultimately breaks down).