Translating a Graph

Translate graphs using y = f(x - h) + k to shift any function horizontally by h and vertically by k units, needed when repositioning known curves.

y=f(xh)+ky = f(x - h) + k

Solve a problem with Translating a Graph

Type the problem. The solver will use Translating a Graph where Translating a Graph is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Translating a Graph takes
ff
hh
kk
xx
yy
Translating a Graph
SymbolMeaning
ffThe original function being translated; ff can represent any function such as x2x^2, x|x|, x\sqrt{x}, or a complex expression. If you forget which function ff represents, you will substitute the wrong rule into the formula.
hhThe horizontal shift amount in units; positive hh shifts the graph RIGHT, and negative hh shifts it LEFT. The sign is crucial—confusing hh reverses the direction of your translation.
kkThe vertical shift amount in units; positive kk shifts the graph UP, and negative kk shifts it DOWN. Note that the sign of kk is applied directly in the formula (positive kk adds, negative kk subtracts).
xxThe input variable (independent variable) of the original function; when translating, every instance of xx must be replaced with (xh)(x - h). Partial substitution in multi-term functions produces incorrect equations.
yyThe output variable (dependent variable) representing the result of the function; in y=f(xh)+ky = f(x - h) + k, the yy value reflects the result after both the horizontal and vertical transformations have been applied.

When to use it

Use this when a problem asks you to shift or move a graph you already know, or when a function must be adjusted based on changes to its coordinates.

Level

Usually taught in: Algebra II

Worked examples

1. Translate a parabola right and up

Problem

Translate the graph of y=x2y = x^2 right 2 units and up 3 units. Write the equation of the translated graph.
  1. y=f(xh)+ky = f(x - h) + k

    Start with the translation formula, where f(x)=x2f(x) = x^2, h=2h = 2 (for the rightward shift), and k=3k = 3 (for the upward shift).

  2. y=(x2)2+3y = (x - 2)^{2} + 3

    Substitute h=2h = 2 and k=3k = 3 into the formula, replacing xx with (x2)(x - 2) and adding 3.

  3. y=x24x+4+3y = x^{2} - 4x + 4 + 3

    Expand (x2)2(x - 2)^2 using the formula (ab)2=a22ab+b2(a - b)^2 = a^2 - 2ab + b^2, which gives x24x+4x^2 - 4x + 4.

  4. y=x24x+7y = x^{2} - 4x + 7

    Combine the constants: 4+3=74 + 3 = 7.

Answer: y=x24x+7y = x^{2} - 4x + 7

This example applies the basic translation formula to a quadratic function. Shifting right by 2 units means using (x2)(x - 2), and shifting up by 3 units means adding 3 to the result. The expanded form shows the final parabola equation in standard form.

2. Translate an absolute value function left and down

Problem

Write the equation of the graph of y=xy = |x| translated 3 units left and 2 units down.
  1. h=3,k=2h = -3, \quad k = -2

    Left movement means a negative shift, so h=3h = -3; downward movement means a negative vertical shift, so k=2k = -2.

  2. y=f(xh)+k=f(x(3))+(2)y = f(x - h) + k = f(x - (-3)) + (-2)

    Substitute h=3h = -3 and k=2k = -2 into the translation formula; subtracting a negative is the same as adding.

  3. y=f(x+3)2y = f(x + 3) - 2

    Simplify x(3)=x+3x - (-3) = x + 3 and write +(2)+(-2) as 2-2.

  4. y=x+32y = |x + 3| - 2

    Since the original function is f(x)=xf(x) = |x|, replace xx with (x+3)(x + 3) inside the absolute value.

Answer: y=x+32y = |x + 3| - 2

This example uses negative values for hh and kk. The key insight is that left shifts result in adding inside the function (because x(3)=x+3x - (-3) = x + 3), while down shifts subtract from the result. The absolute value function transforms exactly like any other function.

3. Translate a quadratic function in a game-scoring context

Problem

In a video game, a player's score on level nn is given by s(n)=n2+2n+10s(n) = n^2 + 2n + 10. After an update, the level counter starts at 5 (instead of 0), and all scores increase by 50 points. Write the new score function.
  1. h=5,k=50h = 5, \quad k = 50

    The level counter starting at 5 represents a horizontal shift of h=5h = 5 to the right; the 50-point bonus is a vertical shift of k=50k = 50 upward.

  2. snew(n)=(n5)2+2(n5)+10+50s_\text{new}(n) = (n - 5)^{2} + 2(n - 5) + 10 + 50

    Apply the formula: replace each instance of nn with (n5)(n - 5) in s(n)=n2+2n+10s(n) = n^2 + 2n + 10, then add the vertical shift k=50k = 50.

  3. (n5)2=n210n+25(n - 5)^{2} = n^{2} - 10n + 25

    Expand (n5)2(n - 5)^2 using (ab)2=a22ab+b2(a - b)^2 = a^2 - 2ab + b^2; here a=na = n and b=5b = 5, so n22(5)n+25=n210n+25n^2 - 2(5)n + 25 = n^2 - 10n + 25.

  4. 2(n5)=2n102(n - 5) = 2n - 10

    Distribute the 2 across the binomial: 2n25=2n102 \cdot n - 2 \cdot 5 = 2n - 10.

  5. snew(n)=n210n+25+2n10+10+50s_\text{new}(n) = n^{2} - 10n + 25 + 2n - 10 + 10 + 50

    Substitute the expanded expressions from the previous steps into the full formula.

  6. snew(n)=n2+(10+2)n+(2510+10+50)s_\text{new}(n) = n^{2} + (-10 + 2)n + (25 - 10 + 10 + 50)

    Collect like terms: combine all n2n^2 terms, all nn terms (10n+2n-10n + 2n), and all constants.

  7. snew(n)=n28n+75s_\text{new}(n) = n^{2} - 8n + 75

    Simplify: 10+2=8-10 + 2 = -8 and 2510+10+50=7525 - 10 + 10 + 50 = 75.

Answer: snew(n)=n28n+75s_\text{new}(n) = n^{2} - 8n + 75

This problem demonstrates that translation applies to any function, not just simple ones. Understanding that 'the level counter starts at 5' means replacing the variable with (n5)(n - 5), and carefully expanding all instances of nn in multi-term functions, are essential skills for word-problem applications of translation.

Common mistakes

Where Translating a Graph usually goes wrong
Answer came out wrong
To shift the graph right 2 units, I write y=f(x+2)y = f(x + 2) because the shift amount is positive.
Use y=f(x2)y = f(x - 2) for a rightward shift of 2 units; in the formula, positive hh moves the graph to the right.
I translated the graph right 3 and down 5, so I wrote y=f(x3)y = f(x - 3).
Write both transformations: y=f(x3)+(5)y = f(x - 3) + (-5), or equivalently y=f(x3)5y = f(x - 3) - 5, to include the downward shift.
For f(x)=x2+3xf(x) = x^2 + 3x, translating right 1 and up 2 gives y=(x1)2+3x+2y = (x-1)^2 + 3x + 2.
Replace all instances of xx consistently: y=(x1)2+3(x1)+2y = (x-1)^2 + 3(x-1) + 2, then expand and simplify to get y=x2+x+1y = x^2 + x + 1.
The mistakeWhy it is wrongThe fix
To shift the graph right 2 units, I write y=f(x+2)y = f(x + 2) because the shift amount is positive.The formula y=f(xh)+ky = f(x - h) + k has a minus sign built in, so positive hh in (xh)(x - h) produces a rightward shift; using x+2x + 2 would shift LEFT, not right.Use y=f(x2)y = f(x - 2) for a rightward shift of 2 units; in the formula, positive hh moves the graph to the right.
I translated the graph right 3 and down 5, so I wrote y=f(x3)y = f(x - 3).The vertical shift is completely missing. The formula y=f(xh)+ky = f(x - h) + k requires both the horizontal component (xh)(x - h) and the vertical component kk.Write both transformations: y=f(x3)+(5)y = f(x - 3) + (-5), or equivalently y=f(x3)5y = f(x - 3) - 5, to include the downward shift.
For f(x)=x2+3xf(x) = x^2 + 3x, translating right 1 and up 2 gives y=(x1)2+3x+2y = (x-1)^2 + 3x + 2.The term 3x3x was not translated; every instance of xx in the original function must be replaced with (x1)(x - 1), not left unchanged.Replace all instances of xx consistently: y=(x1)2+3(x1)+2y = (x-1)^2 + 3(x-1) + 2, then expand and simplify to get y=x2+x+1y = x^2 + x + 1.

Tips and when to use something else

  • The signs in y=f(xh)+ky = f(x - h) + k can be counterintuitive: positive hh shifts the graph RIGHT, not left, and positive kk shifts it UP. The minus sign inside the function is part of the formula's convention.
  • Always substitute (xh)(x - h) for every instance of xx in the original function, even if it appears in multiple terms or within exponents; partial substitution is a common source of errors.
  • In word problems, identify what the independent variable represents (level number, time, distance, etc.) before determining hh and kk, as the shift amounts may be properties of the real-world scenario.
  • To shift and flip a graph simultaneously, use Reflecting a Graph and this translation method separately—apply reflections first, then translate, unless the problem specifies a different order.

Frequently asked questions

How do I know if I'm shifting left or right?
In y=f(xh)+ky = f(x - h) + k, if hh is positive, shift RIGHT; if hh is negative, shift LEFT. This is counterintuitive because of the minus sign in the formula, but remember: (x2)(x - 2) shifts right, and (x(3))=(x+3)(x - (-3)) = (x + 3) shifts left.
What's the difference between y=f(xh)y = f(x - h) and y=f(x)hy = f(x) - h?
These are completely different transformations. y=f(xh)y = f(x - h) changes the input, creating a horizontal shift; y=f(x)hy = f(x) - h changes the output, creating a vertical shift. Always apply horizontal shifts inside the function and vertical shifts outside.
Can I translate any function, or just parabolas and circles?
You can translate any function using y=f(xh)+ky = f(x - h) + k: parabolas, circles, absolute value, square roots, exponential functions, trigonometric functions, and more. The formula is completely general and works for any function ff.
When I translate a complex function like f(x)=2x23x+1f(x) = 2x^2 - 3x + 1, do I have to expand everything, or can I leave it as y=2(xh)23(xh)+1+ky = 2(x - h)^2 - 3(x - h) + 1 + k?
You can leave it in either form, depending on what the problem asks for. If the problem requests a simplified equation, expand and combine like terms. If it only asks for the translated equation, the form y=2(xh)23(xh)+1+ky = 2(x - h)^2 - 3(x - h) + 1 + k is acceptable and often clearer for showing the transformation.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18