Inequalities and Restrictions

Inequalities

Use inequalities to automatically shade above or below lines and curves. Combine implicit relations and inequalities to shade the interior of a circle, or the concave part of a hyperbola. Add extra life to your Desmos math art with a bit of inequality-based shading. Get started with the video on the right, then dive deeper with the resources and challenges below.

With inequalities, you can add colored shading to your Desmos graph. Use strict inequalities (\(\lt\) and \(\gt \)) for dotted lines and non-strict inequalities (\(\le\) and \(\ge \)) for a solid line.

Showing graph of three shaded regions.  Line 1: x^{2}+y^{2}<4. Line 2:y\ge2x+10. Line 3: y\le2x-10. Screenshot.

 

For more intricate graphs, you can also use inequalities with restrictions to shade selected parts of the graph.

Showing graph of three shaded regions.  Line 1: y>x^{2}+2\left\{y<4\right\}. Line 2:-6\le x\le-2\left\{-1<y<1\right\}. Line 3: 0\le y\le2x-4\left\{x<4\right\}. Screenshot.

Domain and Range Restrictions

Use curly braces at the end of an expression to add a domain or range restriction in seconds. From piecewise functions and implicit relations, to including sliders within your restrictions, Desmos makes it easy to control what you see in the coordinate plane. Get started with the video on the right, then dive deeper with the resources and challenges below.

Restriction showing y=2x\left\{1<x<3\right\}. Screenshot.

To limit the domain or range (x or y values of a graph), you can add the restriction to the end of your equation in curly brackets {}. In the example graph above the line y=2x is restricted for x values between 1 and 3.

Graph showing y=x^{2}\left\{1<y<5\right\}. Screenshot.

You can also use restrictions on the range of a function and any defined parameter.

Graph showing x^{2}+y^{2}\le20\left\{x<0\right\}\left\{y>0\right\}. Screenshot.

It's also possible to add multiple restrictions to the same expression line regardless of what parameter is being restricted.

 

Learn More

Explore Inequalities Example Graph

Explore Restrictions Example Graph

Functions

Graphing and Connecting Coordinate Points

Saving and Managing Graphs

Tables

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