Let and be two vectors. The value of the coefficient in the expression , which minimizes the length of the error vector , is
- (A)
- (B)
- (C)
- (D)
Let and be two vectors. The value of the coefficient in the expression , which minimizes the length of the error vector , is
ANSWER
, option (C).
Official answer: CSource: Official answer key, GATE 2023 EC (IIT Kanpur)
The error vector is . Its length is smallest when is the orthogonal projection of onto , i.e. when .
Orthogonality condition: .
The same result follows from calculus: . Setting gives the same , and the second derivative confirms it is a minimum.
Dot product: .
Squared norm: .
Therefore , which is option (C).
Check: , and , so is orthogonal to as required.
KEY IDEA
The error is shortest when it is perpendicular to , which makes the orthogonal projection of onto . So (least squares with a single unknown).
WATCH OUT FOR
Swapping the roles of the vectors and dividing by (which gives ), or inverting the ratio to get (option A). The denominator is the squared length of the vector you are projecting onto, here , so it is . A sign slip in the dot product leads to the negative options B or D.
From the GATE 2023 EC paper. Every question of this paper · Download the full paper · All 46 Linear algebra questions, with notes