For a linear regression of Y on X, when is the regression of X on Y linear? When is it non-linear? Suppose we have two random variables $X_1$ and $X_2$ that both have finite expectations, that may or may not be correlated, and that are known to be linearly related (i.e., I mean their sum forms a straight line of constant slope) according to the equation,
$$
Y = aX_1 + bX_2 .
$$
We know, by construction, that $E[Y|X_1=x_1]$ is is a straight line with constant slope. Then, when is $E[X_1|Y=y]$ also linear in the same sense?
Based on  simulations, I believe that $E[X_1|Y=y]$ will be a straight line with constant slope if $X_1$ and $X_2$ are i.i.d., but I can't find a proof. It is certainly linear when $X_1$ and $X_2$ are both independent Normal.
One simple example of when $E[X_1|Y=y]$ is not linear (does not have constant slope) is when $X_1\sim Uniform[-c_1,c_1]$ and $X_2\sim Uniform[-c_2,c_2]$ when $c_1\neq c_2$. In this case, $E[X_1|Y=y]$ has a zigzag shape, increasing initially for small y then flattening out at zero for a while then increasing again.
So, is there a proof that $E[X_1|Y=y]$ is a straight line with constant slope for i.i.d. $X_1$ and $X_2$, and are there instances when $E[X_1|Y=y]$ is linear but $X_1$ and $X_2$ are not i.i.d.?
Any help is much appreciated!
EDIT: Here are examples below demonstrating a case when $E[X_1|Y=y]$ is not linear (i.e., does not form a straight line with constant slope despite $E[Y|X_1]$ being linear), specifically with $X_1 \sim Uniform[-2,2]$ and $X_2 \sim Uniform[-3,3]$ and coefficients a = b = 1. The first two plots are simulated data, where the black line is a moving average. The third plot is the actual numerical solution found by computing the conditional pdf and integrating.




So I figured out an answer that I'll leave here in case anyone else has the same question. As a non-math person I could use some help making this more precise, and I would still like to have a citation for this theorem, since this must be a well known result.
Suppose $X_1$ and $X_2$ are iid and $Y = X_1+X_2$, then $E[X_1|Y=y]$ must be a straight line with slope 1/2.
Proof: Solving for $X_1$ and taking the conditional expectation gives
$$
E[X_1|Y=y]=y-E[X_2|Y=y]
$$
If $X_1$ and $X_2$ are iid, then $E[X_1|Y=y]=E[X_2|Y=y]=y/2$, which is a straight line with constant slope equal to 1/2.
