Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Lesson 2 of 27

Use feasible geometry to certify nearest points

Prove convex closure rules and the projection variational inequality.

Loading your saved responses…

Try the optional starting-point checks and targeted refreshers. You can continue directly into this lesson.

Try

Find the nearest point to z=(3,0) on the line x+y=1. Moving perpendicular to that line subtracts a multiple of (1,1). Solving (3−t)+(−t)=1 gives t=1, so the projection is p=(2,−1). For any other point p+d on the line, d has coordinate sum zero and is perpendicular to z−p=(1,1). The Pythagorean identity then proves that p is globally nearest, not merely a visually plausible point.

Predict

Predict what changes for a half-plane instead of a line. The displacement toward the projection need not be perpendicular to every feasible direction, because some directions point deeper into the set. The correct condition becomes an inequality. Also predict whether a closed set always has a unique nearest point: the two-point set {−1,1} has two equally near points to zero. Convexity is the additional geometric condition that removes this ambiguity in Euclidean projection.

Experiment

For C=[0,2] and z=4, the projection is p=2. Test the projection certificate (z−p)(x−p)≤0 at several feasible points.

Feasible xx−pCertificate product
0−2−4
1−1−2
200

The point checks illustrate a general proof: every feasible x≤2 makes the product nonpositive. A finite table alone would not establish the condition for all points in an arbitrary set. Change z to 1 and verify that its projection is itself, making every certificate product zero.

Understand

A set C is convex when (1−t)x+ty belongs to C for all x,y in C and t in [0,1]. Intersections of convex sets are convex because the segment remains in every constituent set. Affine sets, half-spaces and Euclidean balls are convex. Unions generally are not. Empty sets satisfy the segment definition vacuously, but projection and optimization existence require nonemptiness explicitly.

For a nonempty closed C in finite dimensions, restricting the distance search to a sufficiently large closed ball gives a compact search set, so a nearest point exists. If C is also convex, two distinct nearest points would have a midpoint with strictly smaller squared distance, contradicting minimality. For a feasible p, the exact projection characterization is (z−p)·(x−p)≤0 for every x in C. Necessity follows by differentiating the squared distance along the feasible segment from p toward x at its initial endpoint. Sufficiency follows by expanding ||z−x||² into ||z−p||²+||x−p||²−2(z−p)·(x−p).

Apply

Prove that projections are nonexpansive. If p=P_C(z) and q=P_C(w), apply the certificate once with x=q and once with x=p. Adding and rearranging gives ||p−q||²≤(p−q)·(z−w). Cauchy–Schwarz then gives ||p−q||≤||z−w||, with the zero-distance case handled directly. This stability property will support projected algorithms later. It depends on the same closed convex set for both projections.

As a counterexample exercise, project zero onto C={−2,2}. Both points minimize distance, and the convex projection inequality fails if either is tested against the other. The issue is not numerical accuracy: the needed segment between the two points is absent from the feasible set.

Continue

Use the projection certificate to turn a proposed nearest point into a proof. State the set’s nonemptiness, closedness and convexity rather than relying on a picture. Continue to Convex functions and certificates. There, a related supporting inequality will convert local derivative information into a global objective bound and explain why convex optimization has stronger guarantees than arbitrary nonlinear search.

Apply · explain · revise

Practice and reasoning

Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.

Project 7 onto [−2,4]. What is the projected point?

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

Project (4,0) onto x+y=2. What is the first coordinate?

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

Prove any intersection of convex sets is convex.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Prove the nearest point to z in a nonempty closed convex subset of Rⁿ exists and is unique.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Prove p=P_C(z) iff (z−p)·(x−p)≤0 for all x∈C, for closed convex C and p∈C.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Give a closed nonconvex set with a point having two nearest projections.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Reflect and continue

Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.