In algebra, the continuant is a multivariate polynomial representing the determinant of a tridiagonal matrix and having applications in generalized continued fractions.
The n-th continuant                               K                      n                          (                  x                      1                          ,                          x                      2                          ,                …        ,                          x                      n                          )                 is defined recursively by
                              K                      0                          =        1        ;                                                      K                      1                          (                  x                      1                          )        =                  x                      1                          ;                                                      K                      n                          (                  x                      1                          ,                          x                      2                          ,                …        ,                          x                      n                          )        =                  x                      n                                    K                      n            −            1                          (                  x                      1                          ,                          x                      2                          ,                …        ,                          x                      n            −            1                          )        +                  K                      n            −            2                          (                  x                      1                          ,                          x                      2                          ,                …        ,                          x                      n            −            2                          )        .                        The continuant                               K                      n                          (                  x                      1                          ,                          x                      2                          ,                …        ,                          x                      n                          )                 can be computed by taking the sum of all possible products of x1,...,xn, in which any number of disjoint pairs of consecutive terms are deleted (Euler's rule). For example,                              K                      5                          (                  x                      1                          ,                          x                      2                          ,                          x                      3                          ,                          x                      4                          ,                          x                      5                          )        =                  x                      1                                    x                      2                                    x                      3                                    x                      4                                    x                      5                                  +                          x                      3                                    x                      4                                    x                      5                                  +                          x                      1                                    x                      4                                    x                      5                                  +                          x                      1                                    x                      2                                    x                      5                                  +                          x                      1                                    x                      2                                    x                      3                                  +                          x                      1                                  +                          x                      3                                  +                          x                      5                          .                It follows that continuants are invariant with respect to reversing the order of indeterminates: 
                              K                      n                          (                  x                      1                          ,                …        ,                          x                      n                          )        =                  K                      n                          (                  x                      n                          ,                …        ,                          x                      1                          )        .                The continuant can be computed as the determinant of a tridiagonal matrix:                              K                      n                          (        1        ,                …        ,                1        )        =                  F                      n            +            1                                  , the (n+1)-st Fibonacci number.                                                                        K                                  n                                            (                              x                                  1                                            ,                            …              ,                                            x                                  n                                            )                                                      K                                  n                  −                  1                                            (                              x                                  2                                            ,                            …              ,                                            x                                  n                                            )                                      =                  x                      1                          +                                                            K                                  n                  −                  2                                            (                              x                                  3                                            ,                            …              ,                                            x                                  n                                            )                                                      K                                  n                  −                  1                                            (                              x                                  2                                            ,                            …              ,                                            x                                  n                                            )                                      .                Ratios of continuants represent (convergents to) continued fractions as follows:The following matrix identity holds:For determinants, it implies thatand alsoA generalized definition takes the continuant with respect to three sequences a, b and c, so that K(n) is a polynomial of a1,...,an, b1,...,bn−1 and c1,...,cn−1. In this case the recurrence relation becomes
                              K                      0                          =        1        ;                                                      K                      1                          =                  a                      1                          ;                                                      K                      n                          =                  a                      n                                    K                      n            −            1                          −                  b                      n            −            1                                    c                      n            −            1                                    K                      n            −            2                          .                        Since br and cr enter into K only as a product brcr there is no loss of generality in assuming that the br are all equal to 1.
The extended continuant is precisely the determinant of the tridiagonal matrix
                                          (                                                                                a                                          1                                                                                                            b                                          1                                                                                        0                                                  …                                                  0                                                  0                                                                                                  c                                          1                                                                                                            a                                          2                                                                                                            b                                          2                                                                                        …                                                  0                                                  0                                                                              0                                                                      c                                          2                                                                                                            a                                          3                                                                                        …                                                  0                                                  0                                                                              ⋮                                                  ⋮                                                  ⋮                                                  ⋱                                                  ⋮                                                  ⋮                                                                              0                                                  0                                                  0                                                  …                                                                      a                                          n                      −                      1                                                                                                            b                                          n                      −                      1                                                                                                                    0                                                  0                                                  0                                                  …                                                                      c                                          n                      −                      1                                                                                                            a                                          n                                                                                            )                          .                In Muir's book the generalized continuant is simply called continuant.