# How to use TrangularView class in Eigen C++

For a nonsingular lower or upper triangular square matrix $A$, how to solve such linear system in Eigen:

$$A x = b$$

## 1 Answer

As documented here:

x = A.triangularView<Upper>().solve(b);


or

x = A.triangularView<Lower>().solve(b);

• thank you for answering so many of my Eigen related questions! – LCFactorization Feb 10 '14 at 9:49