For a regression line through the origin with the equation:
$$ \tilde{y}=\tilde{\beta_1}x $$
How did we use OLS to get the below equation? I know it is by minimising the SSR but I can't seem to work it out by plugging in the values into the formula for SSR.
$$ \sum (y_i -\tilde{\beta_1}x_i)^2 $$
And furthermore, how do we use calculus to get the first order condition for equation directly above?
First order condition:
$$ \sum x_i(y_i-\tilde{\beta_1}x_i) = 0 $$
Is it a partial derivative? If so, where did the exponent (2) go?