回复 第1楼 的 bonny77:
If A is symmetric and positive definite, we can compute its Cholesky decomposition:
A=LL^T,
where L is lower triangle matrix with positive diagonal entries. Then we can solve two linear systems to get x:
L(L^T x) = z.
Note that L is lower triangle and L^T is upper triangle matrix, so the linear system is easy to solve.
If A is not psd, then we can compute the LU decomposition of A and solve linear system to get x.
In all cases, the computational cost is O(n^3).