Suppose there is a matrix equation such that:

$Ax = b$

where $A$ is given, which is an upper triangular matrix, and $b$ is given.

Then, $x$ and $b$ are perturbed by vectors $p$ and $q$ such that:

$A(x+p) = (b+q)$

The question asks to solve for $p$ in terms of $q$.

To approach this, I am thinking of finding $x$ by using the first equation, and then plug that $x$ into the second equation. Then, I can solve $p$ in terms of $q$. Do you think this (plugging in $x$ to the second equation) is acceptable? That is, is $x$ the same in both equations?

-

## migrated from stackoverflow.comJun 6 '11 at 23:30

This question came from our site for professional and enthusiast programmers.

Is this a homework question? If so, please tag it as such. –  Nemo Jun 6 '11 at 18:37

Matrix multiplication distributes over addition... So:

A(x+p) = b+q
Ax + Ap = b + q


But since Ax = b, subtract that from the last equation to get:

Ap = q


If A is upper-triangular, solving this for p in terms of q is simple using back substitution.

(Am I missing something?)

-
Thanks a lot for your answer! Yes that was what I was thinking about. However, the question actually asks us to "find the solution". So in this case, the solution is p, not x? I just find it a little bit strange since p and q are described here as "perturbations". Is this possible? –  Erik Jun 6 '11 at 18:33
In this case, the Ax and b cancel, so p is determined entirely by q (independent of x). Usually in perturbation theory, the operators are non-linear, so the problem is not trivial; you start with a solution x,b and "perturb" it, so that the solution depends on your starting point x. As phrased, this appears to be a trivial question. –  Nemo Jun 6 '11 at 18:39
+! - a terrific answer. –  duffymo Jun 6 '11 at 19:21