I have given a nxn
upper triangular matrix R
and I want to solve the system of equations Rx=0
where x
is a vector of size n
. Moreover the lowermost diagonalement of R
is 0
(R(n,n)=0
). Therefore I want to set x(n)=1
.
I tried some loops but I do not know how to solve it.
Thank you for your help.
It's guaranteed that R has a zero eigenvalue, and the solution you want is a multiple of the eigenvector corresponding to that eigenvalue. Let's create some matrix R first:
Now let's get the eigenvalues and eigenvectors:
The eigenvectors are the diagonal elements of E
Now pull out the correct eigenvector
and make sure its final element is equal to 1
You can check that this is the solution you want