<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 21, 2016 at 10:20 PM, Munson, Todd <span dir="ltr"><<a href="mailto:tmunson@mcs.anl.gov" target="_blank">tmunson@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
You can set up TAO to solve such a problem.<br>
<br>
However, your problem boils down to solving the<br>
linear system<br>
<br>
  w - V*lambda = 0<br>
  V'*w         = b<br>
<br>
Taking the Schur complement with respect to w, you get<br>
the system<br>
<br>
  V'*V*lambda = b<br>
<br>
You then form and invert V'*V, which is a 5x5 matrix<br>
and recover w = V*lambda.<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
That will get you the least 2-norm solution for your<br>
underdetermined system.<br></blockquote><div><br></div><div><div>Fantastic, this is is perfect for us,</div><div>Thanks,</div><div><br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
LSQR will solve the underdetermined system and give<br>
you the least norm solution if you don't want to<br>
do the matrix-matrix product and inverse.  LSQR<br>
may also be more stable.  See<br>
<br>
  <a href="http://web.stanford.edu/group/SOL/software/lsqr/" rel="noreferrer" target="_blank">http://web.stanford.edu/group/<wbr>SOL/software/lsqr/</a><br>
<br>
That site suggests using CRAIG in the underdetermined<br>
case, but I don't know if CRAIG is implemented<br>
in PETSc.<br>
<br>
Other norms are more difficult to obtain, but can<br>
be done.  One and infinity norms are recast as<br>
linear programming problems.  Matrix norms are<br>
equality constrained quadratic programs.<br>
p-norms with p >= 1 are convex<br>
nonlinear programs.<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
Todd.<br>
</font></span><div class="gmail-HOEnZb"><div class="gmail-h5"><br>
> On Sep 21, 2016, at 8:24 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov">mfadams@lbl.gov</a>> wrote:<br>
><br>
> I thought least squares was for tall skinny (overdetermined) solves? I have a short fat (5 x ~100) matrix to solve.<br>
><br>
> On Wed, Sep 21, 2016 at 4:24 PM, Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com">stefano.zampini@gmail.com</a>> wrote:<br>
> Mark,<br>
><br>
> You can use KSPLSQR<br>
><br>
> Stefano<br>
><br>
><br>
> Il 21 set 2016 11:21 PM, "Mark Adams" <<a href="mailto:mfadams@lbl.gov">mfadams@lbl.gov</a>> ha scritto:<br>
> I want to solve for w in V' w = b, where V is tall and skinny. So a short fat matrix "solve". This is underdetermined. I would like to minimize the two norm (or any norm) of w. This looks like an optimization problem, would TAO do this?<br>
> Mark<br>
><br>
<br>
</div></div></blockquote></div><br></div></div>