### The square root function Background: The area of a square is found by squaring the length of its side. If y is the area of the square and x is the length of a side, then the following formula gives the area
y = x 2.
This formula is fine if we know the length x and want to find the area y, but what if we know the area y and want to find the length x? Well, first we give the unknown length a name. We call it the square root (literally the answer to the square problem) (root in mathematics means answer). Then we create a square root function to calculate it. The input to the function is the area of the square and the output is the length of a side.

Here is a formal definition of the square root function:

 Definition: The square root function is defined to take any positive number y as input and return the positive number x which would have to be squared (i.e. multiplied by itself), to obtain y. The square root of y is usually denoted like this: The symbol √ is called the radical symbol and the quantity inside it is called the argument of the square root. Note that in the Algebra Coach the square root of y must be typed in like this: sqrt (y). Some books denote the square root of y like this: √(y).

Example 1:   Evaluate . The argument, 16, of the square root function is easily expressed as 4 2, so the square root function returns the number 4. Example 2:   Evaluate . In this example the argument of the square root function is already expressed as some number squared, so the square root function simply returns that number. Example 3:   Evaluate . In this case the argument is a number which we don't know how to express as the square of some other number. Therefore we use a calculator or the Algebra Coach to evaluate the square root.  Graph: Here is a graph of the square root function.

Domain and range: The domain of the square root function is all non-negative real numbers and the range is all non-negative real numbers.

The square root function can be extended to the complex numbers, in which case the domain is all complex numbers. and x 2 are inverse functions

Click here for a review of inverse functions. The square function is the inverse of the square root function. However the square root function is the inverse of the square function only if the domain of the square function is restricted to the positive numbers.

The square root function is a one-to-one function that takes a non-negative number as input and returns the square root of that number as output. For example the number 9 gets mapped into the number 3. The square function takes any number (positive or negative) as input and returns the square of that number as output. For example the number 3 gets mapped into the number 9. Because the square function gives back the original number, it is the inverse of the square root function.

However the square function is a many-to-one function. For example both 3 and −3 get mapped into the number 9. Therefore the square function has no inverse. If it did, that mapping would be one-to-many and would not satisfy the ‘one range value’ requirement for a mapping to be a function.

This means that is always true for any x, but unless x happens to be a positive number. For example but .

Solving the equation x 2 = y for x by using the square root function

Suppose that x is unknown but that x 2 equals a known value y. Then finding x requires solving the following equation for x.
x 2 = y
There are two solutions. One solution is This is because means the number which when squared would produce y. But the original equation says that this number is x.

There is a second solution. Because a negative number squared is positive, another solution is the negative of the first solution. These two solutions are usually put together using the plus or minus symbol (±) and expressed like this: This is spoken as “x equals plus or minus the square root of y”. Click here to see an alternative solution of the equation x 2 = y that uses factoring.

Example 1:   The solutions of the equation x 2 = 16  are  x = ± 4

Example 2:   The solutions of the equation x 2 = 5.7 2  are  x = ± 5.7

Example 3:   The solutions of the equation x 2 = −16  are the imaginary numbers  x = ± 4 i

Example 4:   The solutions of the equation x 2 = −(5.7 2 )  are the imaginary numbers   x = ± 5.7 i

How to use the square root function in the Algebra Coach
• Type sqrt(x) into the textbox, where x is the argument. The argument must be enclosed in brackets.

• Set the relevant options:
• Set the 1/2 exponent option to this: • Set the exact / floating point option. In floating point mode the square root of any number is evaluated. In exact mode the square root of an integer is not evaluated if it would result in an approximate number.
• Turn on complex numbers if you want to be able to evaluate the square root of a complex number.

• Click the Simplify button.

Algorithm for the square root function

Click here to see the algorithm that computers use to evaluate the square root function.

### The power function

Before reading this section you may want to review the sections on exponents, where we explained what exponential notation is, and what it means for an exponent to be a negative number, zero, a fraction, or any real number in general.

 Definition: The power function is defined as the function that takes any number x as input, raises x to some power p, and returns x p as output.

In a way this function takes two numbers, x and p, as input, but we will consider the power p to be a parameter (that is, a number which is held constant during the course of a problem but which may vary from problem to problem). This diagram shows the input x, the parameter p, and the output x p. Let the output of the power function be called y, so that
y = x p.
Then, for example, if p = 2 then the power function becomes the so-called quadratic function y = x 2, and if p = 4 then the power function becomes the so-called quartic function y = x 4. We now investigate the value of the power function for various values of x and p. Graph: The 3-dimensional plot to the right shows the power function for part of its domain. The variable x (the base) is plotted from left to right and the parameter p (the power) is plotted from front to back. The output value of the power function, x p, is plotted in the vertical direction. Thus the height of the surface gives the value of the power function.

For example in the front corner x = 0.25 and p = −4 so the height of the surface there is 0.25 −4 = 256, and in the back corner x = 4 and p = 4 so the height of the surface there is also 4 4 = 256.

Domain and range: Look at the picture to the right. This is the view looking straight down on the 3-D plot that was shown above. (The dotted rectangle is the part of the domain shown in the 3-D plot.) Everything shown in gray is part of the domain of the power function. This includes both the gray area on the right and the horizontal gray stripes on the left. Notice the following regions:
• If the base x is positive then any value of the power p is possible. Thus the entire gray rectangle is part of the domain. For this region the corresponding range is all positive real numbers.

• If the base x is zero then a negative power p would result in division by zero. Thus the red line is not part of the domain. However if p is zero or positive then there is no such problem. So this is part of the domain and the corresponding range is just zero.

• If the base x is negative then only certain powers p are possible:

• The power p can be any integer because this just means that you are multiplying x by itself p times. For example is p = 2 then the result is the quadratic function and when p = 4 the result is the quartic function.

• The power p can be any fraction m/n whose denominator n is odd, because x m/n just means that you are taking the m th power of the n th root of x, and the odd root of a negative number is another negative number. For example: Thus the gray horizontal lines are part of the domain of the power function. The corresponding range is all real numbers except zero.

• The power p cannot be a fraction whose denominator is even because this would mean that you are taking the square root of a negative number. For example: The power p also cannot be an irrational number. Thus the spaces between the gray horizontal lines are not part of the domain of the power function.

We can summarize all of the above points by stating that if the power p is a positive integer or a positive fraction with an odd denominator then the domain is all x. If the power p is a negative integer or a negative fraction with an odd denominator then the domain is all x except x = 0. For all other values of the power p the domain is positive x only.

The power function can be extended to the complex numbers, in which case the domain is all complex numbers x for all complex powers p, with one exception: x cannot equal zero if the power p is imaginary or has a negative real part. Click here to see why there is this exception.

The power functions with powers p and 1/p are inverses

If a function is one-to-one then it has an inverse. The power function x p is one-to-one if we restrict x to be positive and if the power p is not zero. This picture shows that its inverse is the power function x 1/p: The final simplification results from the properties of exponents. The power function x 1/p is often called the pth root function.

If x is also allowed to be negative then the power function is one-to-one for certain powers p (e.g. odd powers such as p = 3), but many-to-one for others (e.g. even powers such as p = 2) and in those cases it does not have an inverse. For example with the result that both The problem is the second case where −3 doesn't get mapped back into −3.

The situation is even more complicated if x is allowed to be a complex number. Then the power function with odd powers becomes many-to-one as well. For example DeMoire's theorem shows that there are 3 complex numbers which when cubed give −8. If we then take the cube root of −8 there are two possible outcomes: The result of taking the cube root depends on what mode the Algebra Coach is in. In exact mode it returns the number −2. In floating-point mode the fraction 1/3 becomes the floating point number 0.333… and the algorithm for evaluating the power function over the complex numbers is used and it returns the number 1 + 1.732 i.

Solving the Equation x p = c for x by using the power function

Suppose that x is unknown but that x p equals a known value c. Then finding x requires solving this equation for x:
x p = c
There are many cases, depending on what the power p is, whether c is positive or negative, whether we are looking only for a positive solution for x or all real solutions or all complex solutions. By far the simplest case is if c is positive and if we are only looking for a positive, real solution for x. Then there is only one solution and that solution is:
x = c 1/p.
This follows from the fact that the power functions with powers p and 1/p are inverses.

If we are looking for all real solutions then the only other possible solution is a negative solution and the easiest way to find it is to just try the negative of previous solution. If it satisfies the equation then it is also a solution; if it doesn't then it is not. For example the positive solution of the equation x 4 = 16 is x = 2, and if we try −2 we find that it is also a solution. On the other hand, the positive solution of the equation x 3 = 8 is also x = 2, but if we try −2 then we find that it is not.

If c is negative then temporarily drop its − sign and find the one positive solution for x. Then attach a − sign to this solution and see if it satisfies the original equation. If it does then you have found the only real solution. If it doesn't then there is no real solution.

In all other cases the solution x = c 1/p will be complex and may be one of many possible complex solutions. Click here to see an example.

How to use the power function in the Algebra Coach
• Type x ^ p into the textbox, where x is base and p is the power. Put brackets around x or p if required.

• Set the relevant options:
• Set the exact / floating point option. In floating point mode any power is evaluated. In exact mode a power is not evaluated if it would result in an approximate number.
• Set the 1/2 exponent option to this: • Set the negative exponent option as desired.
• Turn on complex numbers if the base or power is complex or if you expect the value returned by the power function to be a complex number.

• Click the Simplify button.

Algorithm for the power function

Click here to see the algorithm that computers use to evaluate the power function.

If you found this page in a web search you won’t see the