is.square.matrix: Test for square matrix

View source: R/is.square.matrix.R

is.square.matrixR Documentation

Test for square matrix

Description

The function returns TRUE if the argument is a square matrix and FALSE otherwise.

Usage

is.square.matrix(x)

Arguments

x

a matrix

Value

TRUE or FALSE

Author(s)

Frederick Novomestky fnovomes@poly.edu

References

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

Examples

A <- matrix( seq( 1, 12, 1 ), nrow=3, byrow=TRUE )
is.square.matrix( A )
B <- matrix( seq( 1, 16, 1 ), nrow=4, byrow=TRUE )
is.square.matrix( B )

matrixcalc documentation built on Sept. 15, 2022, 1:05 a.m.