---
title: "SparseSolve(_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/sparsesolve(_:_:)-5apxy"
---

# SparseSolve(_:_:)

Solves the system Ax=b for x, using the supplied SparseOpaqueFactorization_Complex_Float of A, in place.

## Declaration

```swift
func SparseSolve(_ Factored: SparseOpaqueFactorization_Complex_Float, _ xb: DenseVector_Complex_Float)
```

## Parameters

- `Factored`: A factorization of A.
- `xb`: On entry, the right-hand side b. On return, the solution vector x. If A has dimension m x n, then xb must have length k, where k=max(m,n).

## Discussion

Discussion If the factorization is A=QR and the system is underdetermined, the solution of minimum norm || x ||_2 is returned. If the factorization is A=QR and the system is overdetermined, the least squares solution arg min_x || Ax - b ||_2 is returned. In the case of a factorization of type=SparseCholeskyAtA, the factorization is in fact of A^T A, so the solution returned is for the system A^TAx=b.

## See Also

### Complex direct solving functions

- [SparseSolve(_:_:)](accelerate/sparsesolve(_:_:)-4fydu.md)
- [SparseSolve(_:_:)](accelerate/sparsesolve(_:_:)-1psgz.md)
- [SparseSolve(_:_:)](accelerate/sparsesolve(_:_:)-4fydu.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-3482l.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-3hev5.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-3qkkl.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-76ge0.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-7day5.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-7ltk8.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-85y2u.md)
- [SparseSolve(_:_:_:)](accelerate/sparsesolve(_:_:_:)-90ojf.md)
