@doc raw"""
    â„›(z::Number, tableau::AbstractButcherTableau) :: Number
    â„›(z::Number, solver::AbstractRungeKuttaSolver) :: Number

returns the stability function of `solver`:
```math
    R(z) = \frac{\det(I - z(A - \mathbb{1}b^\intercal))}{\det(I - zA)}.
```
"""
function â„›(z::Number, tableau::AbstractButcherTableau)
    @â†“ A, b, s = tableau
    ğ�Ÿ™ = ones(s)
    return det(I - z * (A - ğ�Ÿ™ * b')) / det(I - z * A)
end
â„›(z::Number, solver::AbstractRungeKuttaSolver) = â„›(z, solver.tableau)

"""
    â„›(Z::AbstractMatrix, tableau::AbstractButcherTableau) :: AbstractMatrix
    â„›(Z::AbstractMatrix, solver::AbstractRungeKuttaSolver) :: AbstractMatrix

returns the stability function of `solver`.
"""
function â„›(Z::AbstractMatrix, tableau::AbstractButcherTableau)
    @â†“ A, b, s = tableau
    ğ�Ÿ™ = ones(s)
    tmp = kron(ğ�Ÿ™, Z)
    tmp = (I - kron(A, Z)) \ tmp
    tmp = kron(b', Matrix(1.0I, size(Z)...)) * tmp
    return I + tmp
end
â„›(Z::AbstractMatrix, solver::AbstractRungeKuttaSolver) = â„›(Z, solver.tableau)
