View source: R/symmetric.pascal.matrix.R
symmetric.pascal.matrix | R Documentation |
This function returns an n by n symmetric Pascal matrix.
symmetric.pascal.matrix(n)
n |
Order of the matrix |
In mathematics, particularly matrix theory and combinatorics, the symmetric Pascal matrix is a square matrix from which you can derive binomial coefficients. The matrix is an order n symmetric matrix with typical element given by {S_{i,j}} = {{n!} \mathord{≤ft/ {\vphantom {{n!} {≤ft[ {r!\;≤ft( {n - r} \right)!} \right]}}} \right. } {≤ft[ {r!\;≤ft( {n - r} \right)!} \right]}} where n = i + j - 2 and r = i - 1. The binomial coefficients are elegantly recovered from the symmetric Pascal matrix by performing an LU decomposition as {\bf{S}} = {\bf{L}}\;{\bf{U}}.
An order n matrix.
If the argument n is not a positive integer, the function presents an error message and stops.
Frederick Novomestky fnovomes@poly.edu
Call, G. S. and D. J. Velleman, (1993). Pascal's matrices, American Mathematical Monthly, April 1993, 100, 372-376.
Edelman, A. and G. Strang, (2004). Pascal Matrices, American Mathematical Monthly, 111(3), 361-385.
S <- symmetric.pascal.matrix( 4 ) print( S )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.