Inequalities
Inequalities can be used to shade above, below, or inside of lines and curves, defined explicitly or implicitly, and can add extra life to your Desmos math art. Get started with the video on the right, then dive deeper with the resources below.
Getting Started with Inequalities
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 solid lines. In the example shown, 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. Click on the image to explore the graph.
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 in the coordinate plane. Watch the video on the right to get started, and learn more with the resources below.
Domain and Range Restrictions
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, 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\). Explore domain and range restrictions by clicking on the image.
Multiple Restrictions with Inequalities
Multiple inequality restrictions can be combined to control the domain and range of your function with even more precision. Let’s consider the equation \(x^2+y^2\lt 25\), which shades the interior of a circle with radius \(5\).
One strategy is to add an expression such as \(\{x\gt 0\}\{y\gt 0\}\) to our equation, written as two separate restriction statements. 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.
We could also add the expression \(\{x\lt 0, y\lt 0\}\) to the end of our circle equation where inequalities are written within the same brackets, but separated by a comma. This restriction looks for regions that satisfy either of those inequalities. That is, where the \(x\)-values are negative or the \(y\)-values are negative.
To explore more, open the graph by clicking the image. What other specific regions can you shade?
Restrictions in 3D
In 3D, restrictions can be used 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 we 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. See this slice and create more in our Slice a Surface quest.
Math Art with Inequalities and Restrictions
Inequalities and restrictions give you the power to shade anywhere in your graph. Watch the video to learn techniques to help bring your math art to life with shading.
Learn More
- Explore Inequalities Example Graph
- Explore Restrictions Example Graph
- Functions
- Graphing and Connecting Coordinate Points
- Tables
Please write in with any questions or feedback to support@desmos.com.