Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 3

Plotting Points in 2D and 3D

Recommended resources

Welcome to the third lesson in our journey through the mathematical foundations of computer science and AI. In our last session, you learned about functions, which are the rules that describe relationships between variables. We ended with the idea that we need a way to visualize these abstract rules. Today, we'll build that visual framework.

This lesson is dedicated to learning how to represent and interpret points in 2D and 3D Cartesian coordinate systems. This might seem like a basic geometry topic, but it is the absolute bedrock for countless advanced applications. In robotics, it's how a robot knows where it is and where other objects are in a room. In computer graphics, it's how every pixel on your screen gets its position. And in data science, it's how we visualize complex datasets to find patterns. Mastering this is a crucial step toward your goals.

1. The 2D Coordinate Plane: A Visual Stage

At its heart, a coordinate system is a way to give a unique address to any point on a surface or in space. The most common system, which you've likely seen before, is the 2D Cartesian plane. It's formed by two number lines that intersect at a right angle.

To get a clear and intuitive understanding of how this system works, let's start with a fantastic video from Math Antics. It builds the entire concept from the ground up.

Algebra Basics: Graphing On The Coordinate Plane - Math Antics

This video brilliantly explains the coordinate plane, how points are described, and the process of plotting them.

Please watch the following segments: Start with the introduction that builds the coordinate plane from a simple number line: "The Coordinate Plane". Next, learn about the naming conventions and the format for coordinates: the section on axes and ordered pairs. Finally, see the practical methods for plotting points: the demonstration of plotting coordinates.

As the video explained, the 2D coordinate system is defined by a few key elements:

  • The Origin: The point where the two axes intersect, with the address (0, 0).
  • The x-axis: The horizontal number line. Positive values are to the right of the origin, and negative values are to the left.
  • The y-axis: The vertical number line. Positive values are above the origin, and negative values are below.
  • An Ordered Pair (x, y): The unique address of a point. The first number, , tells you the horizontal position, and the second number, , tells you the vertical position. The order is critical; the point (3, 5) is completely different from (5, 3).

The axes divide the plane into four regions called quadrants, which are numbered using Roman numerals (I, II, III, IV) starting from the top-right and moving counter-clockwise. Knowing the quadrant tells you the signs of the coordinates:

  • Quadrant I: (+x, +y)
  • Quadrant II: (-x, +y)
  • Quadrant III: (-x, -y)
  • Quadrant IV: (+x, -y)

2. Stepping into Three Dimensions

The 2D plane is great for graphing functions and plotting simple data, but the world we live in—and the world a robot operates in—is three-dimensional. To represent points in space, we need to add a third axis.

This leap from 2D to 3D is conceptually simple but can be tricky to visualize on a flat screen. We take our 2D plane (with the x and y axes) and lay it flat, then add a third axis, the z-axis, that runs perpendicular to it.

This image shows the transition from a 2D system with a point P(a,b) to a 3D system with a point P(a,b,c). The x and y axes form a "floor," and the z-axis represents height.

A point in 3D space is described by an ordered triple (x, y, z).

  • The x-coordinate is the signed distance from the yz-plane.
  • The y-coordinate is the signed distance from the xz-plane.
  • The z-coordinate is the signed distance from the xy-plane.

Let's explore the theory behind this extension from a resource written for game developers, a field that constantly deals with 3D spaces.

Cartesian Coordinate Systems

This text explains the extension from 2D to 3D space and how points are located within it.

First, read the introduction to 3D space, which discusses adding the third axis and the concept of coordinate planes: the section on 3D space. Focus on understanding the xy-plane, xz-plane, and yz-plane. Then, read the following section on how to pinpoint a location in 3D: Specifying Locations in 3D.


3. Representing and Interpreting Points in 3D

Reading about plotting in 3D is one thing; seeing it done is another. The process involves drawing a series of lines parallel to the axes to correctly position the point in space. The following video gives an excellent visual demonstration of this technique.

The 3D Coordinate System | Calculus 3 Lesson 4 - JK Math

This video from the "JK Math" channel provides a clear, step-by-step guide to visualizing and plotting points in a 3D coordinate system.

First, watch the segment that visually introduces the 3D system, showing how the z-axis is added and how the three coordinate planes (xy, xz, yz) divide the space: from extending to 3D to showing the three planes. Next, watch the detailed demonstration of how to plot a point with non-zero coordinates, like (1, 2, 3). Pay close attention to the use of parallel lines to find the final position: plotting a point in 3D. Then, see how simple equations like x=3 or z=2 are not lines (as in 2D) but entire planes in 3D: the section on planes. This is a great way to reinforce what a coordinate means. Finally, watch the examples of plotting points that lie on the axes or on the coordinate planes (where one or two coordinates are zero): the section with plotting examples.

To summarize the plotting technique:

  1. Start with the (x, y) coordinates. Find the value on the x-axis and draw a line parallel to the y-axis. Find the value on the y-axis and draw a line parallel to the x-axis. Their intersection gives you the (x, y) location on the "floor" (the xy-plane).
  2. From that intersection point, move up or down parallel to the z-axis by the distance given by the z-coordinate. That is your final point (x, y, z).

Just as the 2D plane has four quadrants, 3D space is divided by the three coordinate planes into eight regions called octants.


4. A Key Detail: Left-Handed vs. Right-Handed Systems

In 2D, any coordinate system can be rotated to look like any other. In 3D, this is not the case. There are two fundamentally different types of coordinate systems: right-handed and left-handed. This distinction is critical in fields like computer graphics, robotics, and physics, as using the wrong one can cause objects to appear as mirror images or rotate in the wrong direction.

Let's return to the "3D Math Primer" for a clear explanation.

Cartesian Coordinate Systems

This section explains the crucial difference between left-handed and right-handed coordinate systems using a simple and intuitive "hand rule."

Please read the section Left-handed versus Right-handed Coordinate Spaces. Try using your own hands to follow the explanation.

The key idea is that if you align the fingers of your right hand with the positive axes, you cannot rotate your hand to make it match a left-handed system. Most mathematics and physics contexts (including this course) use a right-handed system by default. However, some graphics libraries (like Microsoft's DirectX) and game engines use a left-handed system. It's a convention you must always be aware of when working in 3D.


Conclusion

Today, you've established the visual foundation for much of the mathematics to come. We've built the stage upon which we can draw graphs, place objects, and represent data.

Here are the key takeaways from our lesson:

  • A 2D Cartesian system uses an ordered pair (x, y) to specify a point's location on a plane relative to an origin and two perpendicular axes.
  • A 3D Cartesian system extends this with a third axis, using an ordered triple (x, y, z) to specify a point's location in space.
  • Coordinates represent the signed distance from the axes (in 2D) or from the coordinate planes (in 3D).
  • Plotting points in 3D is a systematic process of moving along directions parallel to the axes.
  • 3D coordinate systems have a handedness (left or right), a crucial property in many applications like robotics and graphics.

Now that we have our "canvas"—the coordinate system—we can begin to plot more interesting and powerful mathematical objects. In our next lesson, we will explore some of the most important families of functions you'll encounter in science and engineering: polynomial, exponential, and logarithmic functions, and learn how to sketch their graphs.