# What is a recommended way to solve a linear equation?

**URL:** <https://discourse.julialang.org/t/what-is-a-recommended-way-to-solve-a-linear-equation/128420>\
**Category:** New to Julia\
**Tags:** question, linearalgebra, linearsolve\
**Created:** [April 26, 2025, 2:28am UTC](https://discourse.julialang.org/t/what-is-a-recommended-way-to-solve-a-linear-equation/128420 "2025-04-26T02:28:18Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![WalterMadelim](https://avatars.discourse-cdn.com/v4/letter/w/3e96dc/32.png) [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Post date:** [May 7, 2025, 3:56am UTC](https://discourse.julialang.org/t/what-is-a-recommended-way-to-solve-a-linear-equation/128420/22 "2025-05-07T03:56:19Z")

</div>

> [@stevengj](#):
>
> Is your matrix symmetric? Is it symmetric positive-definite (SPD)? If it is SPD, use sparse Cholesky.

Here is a gap. What if `A` is real-symmetric but not posdef. What algorithm would the built-in solver `A\b` resort to? And I know there is an idea to convert it to posdef:

1. left precondition: we solve (A^\top A) x =A^\top b
2. right precondition: we solve (AA^\top)y = b, then x := A^\top y

would these methods be competent? Allegedly the condition number is squared.

**PS** I want to look into the multiple dispatch of LinearAlgebra.jl, thus I need a tool like Debugger.jl, but I don’t know where is wrong currently → [ERROR: Debugger.jl requires a LineEditREPL type of REPL](https://discourse.julialang.org/t/error-debugger-jl-requires-a-lineeditrepl-type-of-repl/128760). ☹

---

_[View the full topic](https://discourse.julialang.org/t/what-is-a-recommended-way-to-solve-a-linear-equation/128420)._
