0

I'm having trouble with number 5 of this question below. I managed do do the other 4 though. This question comes from Trefethen & Bau - Numerical Linear Algebra.

$$ A = \begin{bmatrix} 1 & 1 \\ 1 & 1.0001\\ 1 & 1.0001\\ \end{bmatrix} \,\,\, B= \begin{bmatrix} 2 \\ 0.0001 \\4.0001 \end{bmatrix} $$

  1. What are the matrices $A^\dagger$ and $P$ for this matrix? (P is projection matrix, $A^\dagger$ is psuedo inverse.
  2. Find the exact solution $x$ and $y = Ax$ to the least squares problem $Ax \approx B$
  3. What are $K(A), \eta, \theta$
  4. What are the four condition numbers $\frac{1}{cos\theta}, \frac{K(A)}{\eta cos \theta}, \frac{K(A)}{cos\theta}, K(A) + \frac{K(A)^2 tan\theta}{\eta}$
  5. Give examples of perturbations $\delta B$ and $\delta A$ that approximately obtain these four condition numbers.

Here are the solutions I came up with:

$ K(A) = 42429.24 \\ \theta = 0.6847029 \\ \eta = 1 $

$ \text{sensitivity y to pertubations in B}\\ \frac{1}{cos \theta} = 1.290977236078941992048 $

$ \text{sensitivity x to perturbations in B}\\ \frac{k}{\eta cos \theta} = 54775.17703596802311949 $

$ \text{sensitivity y to perturbations in A}\\ \frac{k}{cos \theta} = 54775.17706639764946885 $

$ \text{sensitivity x to perturbations in A}\\ k + \frac{k ^ 2 tan \theta} {\eta} = 1469883252.857317209244 $

I'm really not sure how to go about number 5. Trying to get the intuition of this problem. Appreciate any help.

I did the work for this in R programming language, here is the code I used for reference:

library(pracma) #pinv
options(digits = 22)
A = matrix(
    c(
        1, 1,
        1, 1.0001,
        1, 1.0001
    ), nrow = 3, ncol = 2, byrow = TRUE
)
B = c(2, 0.0001, 4.0001)
pinv(A)
       [,1]  [,2]  [,3]
[1,]  10001 -5000 -5000
[2,] -10000  5000  5000

#condition Number k = norm(A, type = "2") * norm(pinv(A), "2") [1] 42429.24 kappa(A) [1] 42431.65

theta

x = pinv(A) %% B y = A %%(pinv(A)%*% B) cos^-1( ||y|| / ||b|| ) acos( norm(y, "2") / norm(B, "2") ) theta = acos( norm(y, "2") / norm(B, "2") ) [1] 0.6847029

eta

eta = (norm(A, "2") * norm(x, "2")) / norm(y, "2") [1] 1

#sensitivity y to pertubations in B 1 / cos(theta) [1] 1.290977236078941992048 #sensitivity x to pertubations in B k / (eta * cos(theta)) [1] 54775.17703596802311949 #sensitivity y to pertubations in A k / (cos(theta)) [1] 54775.17706639764946885 #eta is close to 1 #sensitivity x to pertubations in A k + (k ^ 2 * tan(theta)) / eta [1] 1469883252.857317209244

Frank
  • 880
  • 1
    Multiple part problems generally fare worse on Math.SE than Questions that take problems one at a time. You've left some important details in subproblems, making it difficult to get clarifications and work out what help is needed. – hardmath Aug 21 '20 at 14:59
  • I think all the details are in the code, but I figured it was a long shot getting some answer. Thanks for the input. – Frank Aug 21 '20 at 20:08
  • It's a topic that interests me, and if the actual problem you want help with were easier to parse, I'd probably give it a good try. As it currently reads, you've written some code to address many (perhaps all) parts of the exercise from Trefethen & Bau. The title and opening sentence point to "trouble with number 5 of this question", It's unclear however where you want Readers to help. The remarks just in front of the code block say you're "not sure how to go about number 5." Are the definitions unclear, or how a "perturbation" is related to the condition numbers (and the exact solution)? – hardmath Aug 22 '20 at 01:06
  • Thanks again for helping me iron out the details. I'm unsure how to find a perturbation in $A$, for example, which will give an exact change in $X$ of $1469883252$. Maybe I should delete the question and rewrite it to try and ask that more specifically? – Frank Aug 22 '20 at 14:54
  • You don't have to delete the Question in order to rewrite it (and in fact that would likely be counterproductive). You can leave the existing text and insert a one or two paragraph opening that goes with more focus on what "trouble with number 5" is about. That would allow Readers to jump in with the sort of suggestions you want, while referencing your previous efforts as needed. – hardmath Aug 22 '20 at 15:33

0 Answers0