% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eigen.R
\name{spectral_radius}
\alias{spectral_radius}
\title{Compute the spectral radius of a matrix}
\usage{
spectral_radius(A)
}
\arguments{
\item{A}{A square numeric matrix.}
}
\value{
A single numeric value giving the spectral radius of \code{A}.
}
\description{
Returns the spectral radius of a square matrix, defined as the maximum
modulus of its eigenvalues:
\deqn{\rho(A) = \max |\lambda_i|}
}
\details{
This function is primarily intended for use with matrix population models,
where the spectral radius corresponds to the stable growth rate
(i.e., \eqn{\lambda}) when the governing matrix is square and nonnegative.
It is also used to calculate net reproductive rate \eqn{R_0} from a
next generation matrix.
}
\examples{
A <- matrix(c(
  0, 1,
  0.5, 0
), nrow = 2, byrow = TRUE)

spectral_radius(A)

}
\references{
Horn, R. A. and Johnson, C. R. (2013). \emph{Matrix analysis}. Cambridge University Press.
}
