I have Googled a few times and experimented on Desmos, but both attempts were to no avail, and now I come here. How is a piecewise function transformed to be "stretched" or "compressed"? What about other transformations?
I see what you're getting at based on our comment discussion now.
The conditions also change.
For example, say we have $f(x) = x^2$ if $x > 10$. Then $f(2x) = (2x)^2$ if $2x> 10$. (Other pieces are irrelevant for this discussion and the same thing happens to them, so it's sufficient to consider one piece.)
Similar reasoning for horizontal translations.
The explanation behind this is... Think of our example function $f$ in words like this:
$f$ of the input is equal to the input squared, if the input is greater than 10.
Now just replace the input with $x$ to get our original function. Replace the input with $2x$ to get the compressed function.