An horizontal compression (or stretch) acts on the horizontal axis, which is related with variable x. Then, we have
Now, a vertical compression (or stretch) acts on the vertical axis, which is related with variable y (or f(x)). Then, we have
If we have the following expression:
![g(x)=(1)/(3)x^2+2](https://img.qammunity.org/2023/formulas/mathematics/college/kk75xf5toxh4c725a0oq8pzbqhd6g40wqv.png)
the parent function is
![f(x)=x^2](https://img.qammunity.org/2023/formulas/mathematics/high-school/ggqp4tf9ahbsgqhvjmgpjcoq74fanvke01.png)
so, in order to get g(x) from f(x), we need a translation up 2 units and a vertical stretch by 1/3, that is,
![f(x)\Rightarrow g(x)=(1)/(3)f(x)+2](https://img.qammunity.org/2023/formulas/mathematics/college/z0qzwdx0czwb85t7zact6opnxwae9io5zi.png)