Inequalities and Restrictions

In the Desmos graphing tools, you can use inequalities and restrictions to visualize your math with more control.

Inequalities

Use inequalities to shade above, below, or inside of lines and curves defined explicitly or implicitly.

Watch the video for an introduction to inequalities, and read on to learn more.

Getting Started with Inequalities

Inequalities add colorful shading to your Desmos graph. Use strict inequalities (\(\lt\) and \(\gt \)) for dotted lines and non-strict inequalities (\(\le\) and \(\ge\)) for solid lines.

In the example, the equation \(x^2+y^2\lt 4\) shades inside a circle with a dotted boundary line that’s centered at the origin with radius \(2\). The equation \(y\ge 2x+10\) shades above a solid line and \(y\le 2x-10\) shades below a solid line.

alt

 

Restrictions

Use curly brackets at the end of an expression to add a domain or range restriction in seconds, and apply multiple restrictions with inequalities for even more control over what you see on the graph paper.

Watch the video for an introduction to restrictions, and read on to learn more.

Domain and Range Restrictions

To limit the domain or range (\(x\)- or \(y\)- values of a graph), you can add curly brackets to the end of your equation. In the example graph, the blue line \(y=x-1\) is restricted to (\(x\)-values between \(-2\) and \(2\), and the sides of the red parabola \(y=x^2\) are restricted to \(y\)-values between \(1\) and \(5\).

Screenshot showing y=x-1 restricted to the domain -2 \lt x \le 2 and y=x^2 restricted to the range 1 \lt y \lt 5.

Multiple Restrictions with Inequalities

You can combine multiple inequality restrictions to control the domain and range of your function with even more precision.

For example, the equation \(x^2+y^2\le 25\) shades the interior of a circle with radius \(5\).

One strategy is to add the word and to an expression, such as \(\{x\gt 0\) and \(y\gt 0\}\) . This will display only the portion of the circle that satisfies both of these restrictions. That is, where both the \(x\)- and \(y\)-values are positive.

Another strategy is to add the word or to an expression, such as \(\{x\lt 0\) or \(y\lt 0\}\) . This will display the portion of the circle that satisfies either of these restrictions. That is, where the \(x\)-values are negative or the \(y\)-values are negative.

Screenshot of a circle with radius 5. The first quadrant is shaded with {x \lt 0}{y \lt 0} and the other quadrants are shaded with {x \lt 0, y \lt 0}.

Restrictions in 3D

In the 3D Graphing Calculator, you can use restrictions to graph lines or curves anywhere in the 3D plane.

Restricting a surface to a single \(x\)-, \(y\)-, or \(z\)- value graphs a “slice” of that surface. For example, if you start with the cone \(z^2=x^2+y^2\), restricting to the plane \(x=1\) will graph a hyperbola at the intersection of the cone and the plane. Explore this slice in our Slice a Surface quest.

Screenshot of the Slice a Surface quest which shows a slice of a cone in the shape of a hyperbola.

 

Math Art with Inequalities and Restrictions

Watch the video to learn techniques for using inequalities and restrictions in your math art.

 

Learn More

Please write in with any questions or feedback to support@desmos.com.