# solve-methods

From distr v2.3.1
by Peter Ruckdeschel

##### Methods for Function solve in Package `distr'

solve-methods using generalized inverses for various types of matrices

##### Usage

```
solve(a,b, ...)
## S3 method for class 'ANY,ANY':
solve(a, b, generalized =
getdistrOption("use.generalized.inverse.by.default"), tol = 1e-10)
## S3 method for class 'PosSemDefSymmMatrix,ANY':
solve(a, b, generalized =
getdistrOption("use.generalized.inverse.by.default"), tol = 1e-10)
## S3 method for class 'PosDefSymmMatrix,ANY':
solve(a, b, tol = 1e-10)
```

##### Arguments

- a
- matrix to be inverted / to be solved for RHS.
- b
- a numeric or complex vector or matrix giving the right-hand
side(s) of the linear system. If missing,
`b`

is taken to be an identity matrix and`solve`

will return the inverse of`a`

. - ...
- further arguments to be passed to specific methods (see
`solve`

). - generalized
- logical: should generalized / Moore-Penrose inverses be used? By default uses
the corresponding global option to be set by
`distroptions`

. - tol
- the tolerance for detecting linear dependencies in the
columns of
`a`

. Default is`.Machine$double.eps`

.

##### Details

The method for the Moore-Penrose inverse for
`signature(a = "PosSemDefSymmMatrix", b = "ANY")`

uses `eigen`

to find the eigenvalue
decomposition of `a`

and then simply "pseudo-inverts" the corresponding diagonal matrix built from
`eigen(a)$values`

, while for `signature(a = "ANY", b = "ANY")`

it uses the svd
decomposition of `a`

and then simply "pseudo-inverts" the corresponding diagonal matrix built from
`svd(a)$d`

.

##### concept

- pseudo inverse
- inverse
- svd
- eigenvalue decomposition

##### See Also

`solve`

for the default method, `eigen`

and `svd`

for the pseudo inversion

*Documentation reproduced from package distr, version 2.3.1, License: LGPL-3*

### Community examples

Looks like there are no examples yet.