Let $A\in \mathbb{R}^{m\times n}$, $m>n$, $rank(A)=n$, and $\forall 1 \leq i \leq m, 1 \leq j \leq n, A(i, j)>0$, $y=[1, 1, 1, ..., 1]^T$. Let $\beta=A(A^TA)^{-1}A^Ty$, how to prove that each element of $\beta$ is positive?
Actually, I have tried a lot of random simulation experiments of this question and no one exception has occured, but I don't know how to prove it theoretically. enter image description here
Here is the code:
'''
count = 0;
while count<1000000
count=count+1;
col=randi([2,20]);
A = 100*rand(10000,col);
[m,n] = size(A);
random_order = randperm(m);
A = A(random_order, :);
Y=ones(m,1);
W = inv(A'*A)*A'*Y;
y = A*W;
numNegatives = sum(y < 0);
miny=min(y);
if numNegatives>0
break
A
end
fprintf("%dth,%d rows,%d columns, %d Negatives\n",count,m, n, numNegatives)
end
'''
Results:
'''
999989th,10000 rows,12 columns, 0 Negatives
999990th,10000 rows,18 columns, 0 Negatives
999991th,10000 rows,4 columns, 0 Negatives
999992th,10000 rows,16 columns, 0 Negatives
999993th,10000 rows,12 columns, 0 Negatives
999994th,10000 rows,5 columns, 0 Negatives
999995th,10000 rows,14 columns, 0 Negatives
999996th,10000 rows,5 columns, 0 Negatives
999997th,10000 rows,2 columns, 0 Negatives
999998th,10000 rows,20 columns, 0 Negatives
999999th,10000 rows,16 columns, 0 Negatives
1000000th,10000 rows,19 columns, 0 Negatives
'''