Skip to main content

Constant matrix

Returns a constant matrix: a matrix with all its entries equal to a given number.

Syntax

constant_matrix(Integer, Expression)
constant_matrix(Integer, Integer, Expression)

Description

Given an integer n and an expression e, constructs a matrix of dimensions n×n with all its entries equal to ee.

linear_algebra.constant_matrix1.calc.png

Given two integers nn and m and an expression ee, constructs a matrix of dimensions n×m with all its entries equal to ee.

linear_algebra.constant_matrix2.calc.png