Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When calculating least-squares we use the form $$Xw=y$$ This gives us an approximation, and it can happen that the resulting $w$ will be such that $Xw \lt y$ (entry-wise).

Is there a way how to make every entry in $w$ big enough so that $Xw \ge y$?

And is it possible, at the same time, to make sure every entry in $Xw$ is less that some other number?

share|cite|improve this question
Readers: to set the context, I think OP is asking: Given a matrix $X$ and a vector $y$ of appropriate dimensions, find a vector $w$ such at $Xw \ge y$ entry-wise? – user2468 Apr 1 '12 at 19:51
If I understand the question well, you are looking for a $w$ solution to the following linear program: $\min_w \ 0 \quad \text{s.t.} \ y \leq Xw \leq z$ with $y$ and $z$ given. – Dominique Apr 8 '12 at 15:30
Hello,I think yes. Please excuse me, I am not good at maths and definitions, but I try to explain a bit more what I'd like to calculate. for example: I have Matrix X m*n(5x4), vector y (y1,y2,y3,y4,y5) and vector z (z1,z2,z3,z4,z5), their values are given. I need to find such (only one vector) w (w1,w2,w3,w4,w5) with the smallest error, in relation to the vector y, that: y1<= Xm1n1*w1 + Xm2n1*w2 + Xm3n1*w3 + Xm4n1*w4 + Xm5n1*w5 < z1 . . . y5<= Xm1n5*w1 + Xm2n5*w2 + Xm3n5*w3 + Xm4n5*w4 + Xm5n5*w5 < z5 .Also, the vector w must have positive values. Many thanks for your time. hugo – hugo Apr 9 '12 at 17:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.