Answer:
Notes that sound bad together can be dissonant. The dissonance is caused by the acoustic waves interfering with each other. On the interval of an octave, the note with higher pitch has a wavelength that is half as long as the lower note. As for scales, think of the individual notes as Lego bricks.
Explanation:
I calculated it logically