Learn R Programming

matrixcalc (version 1.0-6)

is.symmetric.matrix: Test for symmetric numeric matrix

Description

This function returns TRUE if the argument is a numeric symmetric square matrix and FALSE otherwise.

Usage

is.symmetric.matrix(x)

Value

TRUE or FALSE.

Arguments

x

an R object

Author

Frederick Novomestky fnovomes@poly.edu

References

Bellman, R. (1987). Matrix Analysis, Second edition, Classics in Applied Mathematics, Society for Industrial and Applied Mathematics.

See Also

is.square.matrix

Examples

Run this code
A <- matrix( c( 1, 2, 3, 4 ), nrow=2, byrow=TRUE )
is.symmetric.matrix( A )
B <- matrix( c( 1, 2, 2, 1 ), nrow=2, byrow=TRUE )
is.symmetric.matrix( B )

Run the code above in your browser using DataLab