### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Linear algebra (`numpy.linalg`) »

# numpy.linalg.cond

`numpy.linalg.``cond`(x, p=None)

  Compute the condition number of a matrix.

  The condition number of x is the norm of x times the norm of the inverse of x. The norm can be the usual L2 (root-of-sum-of-squares) norm or a number of other matrix norms.

  > Parameters: | x : array_like, shape (M, N) The matrix whose condition number is sought. p : {None, 1, -1, 2, -2, inf, -inf, ‘fro’} Order of the norm:
  > p | norm for matrices
  > --- | ---
  > None | 2-norm, computed directly using the SVD
  > ‘fro’ | Frobenius norm
  > inf | max(sum(abs(x), axis=1))
  > -inf | min(sum(abs(x), axis=1))
  > 1 | max(sum(abs(x), axis=0))
  > -1 | min(sum(abs(x), axis=0))
  > 2 | 2-norm (largest sing. value)
  > -2 | smallest singular value
  Returns: | c : float The condition number of the matrix. May be infinite.

### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Linear algebra (`numpy.linalg`) »