Solveeit Logo

Question

Question: How do you graph \(y=\left| x-2 \right|\) ?...

How do you graph y=x2y=\left| x-2 \right| ?

Explanation

Solution

First we will draw the graph of y=xy=x . if we know the graph of f(x)f\left( x \right) we can draw the graph of f(x)f\left( \left| x \right| \right) call it g(x)g\left( x \right) then we can draw g(x2)g\left( x-2 \right) which is f(x2)f\left( \left| x-2 \right| \right) by shifting the graph 2 units towards right.

Complete step by step answer:
To draw the graph of y=x2y=\left| x-2 \right| lets draw the graph of y=xy=x. The graph of y=xy=x is straight line passing through origin with slope 1.

If we y=f(x)y=f\left( x \right) then f(x)f\left( \left| x \right| \right) will be y=xy=\left| x \right| . The graph of f(x)f\left( \left| x \right| \right) is same as y=f(x)y=f\left( x \right) when x is greater than 0 and the graph of f(x)f\left( \left| x \right| \right) is symmetric about Y axis. Basically f(x)f\left( \left| x \right| \right) is f(x)f\left( x \right) when x is greater than 0 and f(x)f\left( -x \right) when x is less than 0.
So let’s draw the graph of y=xy=\left| x \right|

Let take g(x)g\left( x \right) as x\left| x \right| then g(x2)g\left( x-2 \right) will be x2\left| x-2 \right| . We know that if to draw graph of g(x2)g\left( x-2 \right) we need to shift the graph of g(x)g\left( x \right) 2 units toward right.
So if we shift the graph of x\left| x \right| 2 units towards right we will get the graph of x2\left| x-2 \right|
So let’s do that

The above graph is the graph of y=x2y=\left| x-2 \right| .

Note: We draw the graph by write the definition of y=x2y=\left| x-2 \right| .
x2\left| x-2 \right| = x2x-2 when x is greater equal to than 2
= 2x2-x when x is less than equal to 2
we can draw graph of x2x-2 when x is greater than or equal to 2

We can draw the graph of 2x2-x when x is less than or equal to 2

Merging 2 graphs