poly | R Documentation |

Coefficients of a polynomial when roots are given or the characteristic polynomial of a matrix.

```
poly(x)
```

`x` |
a vector or matrix. For a vector, it specifies the roots of the polynomial. For a matrix, the characteristic polynomial is found. |

An array of the coefficients of the polynomial in order from highest to lowest polynomial power.

Original Octave version by Kurt Hornik. Conversion to R by Tom Short.

Octave Forge https://octave.sourceforge.io/

`polyval`

, `roots`

, `conv`

```
poly(c(1, -1))
poly(roots(1:3))
poly(matrix(1:9, 3, 3))
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.