# Question 27991: Squared Distance with One Regular Linear Constraint Has an Exact Solution

[Return to catalogue page 140](https://ocme.evemisslab.com/en/questions/page/140/)

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261015-advance-20261119-r04-lagrange-multiplier-condition-foundations/#q-20261015-pulse-20261119-r04-0066)

This teaching derivation has second-context AI mathematical and bilingual semantic review, limited to the model and assumptions stated in this question. It has no human review or new Lean proof and does not promote the original question or MKO to Canonical truth.

R0054-27991 · q-20261015-pulse-20261119-r04-0066



## Original question and givens

Minimize squared Euclidean distance to center=[0, 1] subject to normal a=[1, 16], a dot x=18; require a nonzero normal. Give (center, constraint_gradient, constraint_rhs, normal_displacement_coefficient, solution_point, multiplier, objective_gradient, feasible, stationary, specified_problem_scope).


- G001 — Minimize squared Euclidean distance to center=[0, 1] subject to normal a=[1, 16], a dot x=18; require a nonzero normal. Give (center, constraint_gradient, constraint_rhs, normal_displacement_coefficient, solution_point, multiplier, objective_gradient, feasible, stationary, specified_problem_scope).





## Definition and scope

Use the original question domain, assumptions and cited MKO definitions. This item has second-context mathematical and bilingual review, with the model, answer and every arithmetic step independently recomputed from the original parameters; the source question remains a candidate.


- [mko-lagrange-multiplier-condition](https://ocme.evemisslab.com/en/mko/mko-lagrange-multiplier-condition/)





## Step-by-step derivation

S001 · impliesBefore

source roles = [lagrange-single-linear-constraint]

After

derived = [[center, constraint_gradient, constraint_rhs, normal_displacement_coefficient, solution_point, multiplier, objective_gradient, feasible, stationary, specified_problem_scope]]

Conditions: none

List the complete operation/mode field order without JavaScript or answer-shape inference;Boolean,string,null and an unclaimed result remain distinct.

Step identifiers and dependenciesRule: source_ordered_fields_without_JS · Uses: G001





S002 · calculationBefore

Lagrange single ORIGINAL normal squared norm ORIGINAL product0 := mul(1, 1)

After

Lagrange single ORIGINAL normal squared norm ORIGINAL product0 = 1

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S001





S003 · calculationBefore

Lagrange single ORIGINAL normal squared norm ORIGINAL running sum0 := sum(0, 1)

After

Lagrange single ORIGINAL normal squared norm ORIGINAL running sum0 = 1

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S002





S004 · calculationBefore

Lagrange single ORIGINAL normal squared norm ORIGINAL product1 := mul(16, 16)

After

Lagrange single ORIGINAL normal squared norm ORIGINAL product1 = 256

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S003





S005 · calculationBefore

Lagrange single ORIGINAL normal squared norm ORIGINAL running sum1 := sum(1, 256)

After

Lagrange single ORIGINAL normal squared norm ORIGINAL running sum1 = 257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S004





S006 · calculationBefore

Lagrange single ORIGINAL normal dot center ORIGINAL product0 := mul(1, 0)

After

Lagrange single ORIGINAL normal dot center ORIGINAL product0 = 0

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S005





S007 · calculationBefore

Lagrange single ORIGINAL normal dot center ORIGINAL running sum0 := sum(0, 0)

After

Lagrange single ORIGINAL normal dot center ORIGINAL running sum0 = 0

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S006





S008 · calculationBefore

Lagrange single ORIGINAL normal dot center ORIGINAL product1 := mul(16, 1)

After

Lagrange single ORIGINAL normal dot center ORIGINAL product1 = 16

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S007





S009 · calculationBefore

Lagrange single ORIGINAL normal dot center ORIGINAL running sum1 := sum(0, 16)

After

Lagrange single ORIGINAL normal dot center ORIGINAL running sum1 = 16

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S008





S010 · calculationBefore

Lagrange single ORIGINAL rhs minus center value := sub(18, 16)

After

Lagrange single ORIGINAL rhs minus center value = 2

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S009





S011 · calculationBefore

Lagrange single ORIGINAL normal displacement := div(2, 257)

After

Lagrange single ORIGINAL normal displacement = 2/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S010





S012 · calculationBefore

Lagrange single ORIGINAL normal shift0 := mul(2/257, 1)

After

Lagrange single ORIGINAL normal shift0 = 2/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S011





S013 · calculationBefore

Lagrange single ORIGINAL solution coordinate0 := sum(0, 2/257)

After

Lagrange single ORIGINAL solution coordinate0 = 2/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S012





S014 · calculationBefore

Lagrange single ORIGINAL normal shift1 := mul(2/257, 16)

After

Lagrange single ORIGINAL normal shift1 = 32/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S013





S015 · calculationBefore

Lagrange single ORIGINAL solution coordinate1 := sum(1, 32/257)

After

Lagrange single ORIGINAL solution coordinate1 = 289/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S014





S016 · calculationBefore

Lagrange single ORIGINAL multiplier2tau := mul(2, 2/257)

After

Lagrange single ORIGINAL multiplier2tau = 4/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S015





S017 · calculationBefore

Lagrange single ORIGINAL displacement coordinate0 := sub(2/257, 0)

After

Lagrange single ORIGINAL displacement coordinate0 = 2/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S016





S018 · calculationBefore

Lagrange single ORIGINAL objective gradient0 := mul(2, 2/257)

After

Lagrange single ORIGINAL objective gradient0 = 4/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S017





S019 · calculationBefore

Lagrange single ORIGINAL displacement coordinate1 := sub(289/257, 1)

After

Lagrange single ORIGINAL displacement coordinate1 = 32/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S018





S020 · calculationBefore

Lagrange single ORIGINAL objective gradient1 := mul(2, 32/257)

After

Lagrange single ORIGINAL objective gradient1 = 64/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S019





S021 · calculationBefore

Lagrange single ORIGINAL full feasibility ORIGINAL product0 := mul(1, 2/257)

After

Lagrange single ORIGINAL full feasibility ORIGINAL product0 = 2/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S020





S022 · calculationBefore

Lagrange single ORIGINAL full feasibility ORIGINAL running sum0 := sum(0, 2/257)

After

Lagrange single ORIGINAL full feasibility ORIGINAL running sum0 = 2/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S021





S023 · calculationBefore

Lagrange single ORIGINAL full feasibility ORIGINAL product1 := mul(16, 289/257)

After

Lagrange single ORIGINAL full feasibility ORIGINAL product1 = 4624/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S022





S024 · calculationBefore

Lagrange single ORIGINAL full feasibility ORIGINAL running sum1 := sum(2/257, 4624/257)

After

Lagrange single ORIGINAL full feasibility ORIGINAL running sum1 = 18

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S023





S025 · calculationBefore

Lagrange single ORIGINAL lambda times normal0 := mul(4/257, 1)

After

Lagrange single ORIGINAL lambda times normal0 = 4/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S024





S026 · calculationBefore

Lagrange single ORIGINAL lambda times normal1 := mul(4/257, 16)

After

Lagrange single ORIGINAL lambda times normal1 = 64/257

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S025





S027 · impliesBefore

source roles = [[0, 1], [1, 16], 18, 257, 16, 2/257, [2/257, 289/257], 4/257, [4/257, 64/257]]

After

derived = [Yes, Yes, ANY feasible y=x+v has a dot v=0;f(y)=f(x)+norm(v)^2]

Conditions: none

A nonzero normal gives norm²>0 and tau solves a dot(c+tau a)=rhs.The objective is squared distance WITHOUT1/2,so gradient and lambda contain2.For any feasible y=x+v,the cross term2tau(a dot v)=0 and the objective difference is||v||²>=0.This specified problem has a unique minimum,not general sufficiency of multiplier equations.

Step identifiers and dependenciesRule: Lagrange_specified_squared_distance_complete_orthogonality_certificate · Uses: G001, S026









## Reverse checks


- S027 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S026 · premise_and_result_audit — Recompute Lagrange single ORIGINAL lambda times normal1 with exact rational arithmetic, not rounded decimals.
- S025 · premise_and_result_audit — Recompute Lagrange single ORIGINAL lambda times normal0 with exact rational arithmetic, not rounded decimals.
- S024 · premise_and_result_audit — Recompute Lagrange single ORIGINAL full feasibility ORIGINAL running sum1 with exact rational arithmetic, not rounded decimals.
- S023 · premise_and_result_audit — Recompute Lagrange single ORIGINAL full feasibility ORIGINAL product1 with exact rational arithmetic, not rounded decimals.
- S022 · premise_and_result_audit — Recompute Lagrange single ORIGINAL full feasibility ORIGINAL running sum0 with exact rational arithmetic, not rounded decimals.
- S021 · premise_and_result_audit — Recompute Lagrange single ORIGINAL full feasibility ORIGINAL product0 with exact rational arithmetic, not rounded decimals.
- S020 · premise_and_result_audit — Recompute Lagrange single ORIGINAL objective gradient1 with exact rational arithmetic, not rounded decimals.
- S019 · premise_and_result_audit — Recompute Lagrange single ORIGINAL displacement coordinate1 with exact rational arithmetic, not rounded decimals.
- S018 · premise_and_result_audit — Recompute Lagrange single ORIGINAL objective gradient0 with exact rational arithmetic, not rounded decimals.
- S017 · premise_and_result_audit — Recompute Lagrange single ORIGINAL displacement coordinate0 with exact rational arithmetic, not rounded decimals.
- S016 · premise_and_result_audit — Recompute Lagrange single ORIGINAL multiplier2tau with exact rational arithmetic, not rounded decimals.
- S015 · premise_and_result_audit — Recompute Lagrange single ORIGINAL solution coordinate1 with exact rational arithmetic, not rounded decimals.
- S014 · premise_and_result_audit — Recompute Lagrange single ORIGINAL normal shift1 with exact rational arithmetic, not rounded decimals.
- S013 · premise_and_result_audit — Recompute Lagrange single ORIGINAL solution coordinate0 with exact rational arithmetic, not rounded decimals.
- S012 · premise_and_result_audit — Recompute Lagrange single ORIGINAL normal shift0 with exact rational arithmetic, not rounded decimals.
- S011 · premise_and_result_audit — Recompute Lagrange single ORIGINAL normal displacement with exact rational arithmetic, not rounded decimals.
- S010 · premise_and_result_audit — Recompute Lagrange single ORIGINAL rhs minus center value with exact rational arithmetic, not rounded decimals.
- S009 · premise_and_result_audit — Recompute Lagrange single ORIGINAL normal dot center ORIGINAL running sum1 with exact rational arithmetic, not rounded decimals.
- S008 · premise_and_result_audit — Recompute Lagrange single ORIGINAL normal dot center ORIGINAL product1 with exact rational arithmetic, not rounded decimals.
- S007 · premise_and_result_audit — Recompute Lagrange single ORIGINAL normal dot center ORIGINAL running sum0 with exact rational arithmetic, not rounded decimals.
- S006 · premise_and_result_audit — Recompute Lagrange single ORIGINAL normal dot center ORIGINAL product0 with exact rational arithmetic, not rounded decimals.
- S005 · premise_and_result_audit — Recompute Lagrange single ORIGINAL normal squared norm ORIGINAL running sum1 with exact rational arithmetic, not rounded decimals.
- S004 · premise_and_result_audit — Recompute Lagrange single ORIGINAL normal squared norm ORIGINAL product1 with exact rational arithmetic, not rounded decimals.
- S003 · premise_and_result_audit — Recompute Lagrange single ORIGINAL normal squared norm ORIGINAL running sum0 with exact rational arithmetic, not rounded decimals.
- S002 · premise_and_result_audit — Recompute Lagrange single ORIGINAL normal squared norm ORIGINAL product0 with exact rational arithmetic, not rounded decimals.
- S001 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.





## Result

([0, 1], [1, 16], 18, 2/257, [2/257, 289/257], 4/257, [4/257, 64/257], Yes, Yes, squared_distance_with_one_regular_linear_constraint_solved_exactly)

The full substitutions and premise checks give the original answer; source identity,format and status are unchanged.





## This question review and source binding

Review date: 2026-10-26

Original questions, answers, step expressions, numeric ASTs and historical records are retained. Source candidate labels remain historical and are not overwritten as formal proof.

Source hashes and review receipts
- input commit: 0f7be61e2c22317a4075561dc822c87d881a50db
- original question SHA-256: 2db6253c11bd7f6187aa46b77c4bbb47dd861af6a6e5f78e38c43149cc2a5fc1
- candidate record SHA-256: 66677326a95c6cbef21b69784eecf0e438b873ef35ca95bb093e3789ed85c4ab
- semantic review receipt SHA-256: 0a76d8e93c08bb16998a0483f3dfc0504f269fc3e1982e6cd868cab0a2856d54
- question-first witness SHA-256: 09127b736c225714dfa0b7ceb0e6a6e66df27438b480cad8217d3c2f99ce9437
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261015-pulse-20261119-r04-0066.json)




