I'm dealing with the following problem:
Suppose that I gave a upper diagonal matrix A of the form: $A= \begin{bmatrix} a_{11} & a_{12}&\dots &a_{1n}\\ 0 & a_{22}&\dots &a_{2n} \\ \vdots & \vdots&\dots &\vdots\\ 0 & 0&\dots &a_{nn} \end{bmatrix}$
And a matrix $A'$ that is $A$ with only the diagonal elements multiplied by values $u_1,u_2,\dots,u_n$, but the upper diagonal elements stay intact, that is: $A' = \begin{bmatrix} u_1 a_{11} & a_{12}&\dots &a_{1n}\\ 0 & u_2 a_{22}&\dots &a_{2n} \\ \vdots & \vdots&\dots &\vdots\\ 0 & 0&\dots &u_n a_{nn} \end{bmatrix}$
How can I express $A'$ in terms of $A$?
Is there a way to express it in the form $A' =UA$? But then, what is the form of the matrix U?