LinearAlgebra
Rank
compute the rank of a Matrix
Calling Sequence
Parameters
Description
Examples
Rank(A)
A
-
Matrix
If A does not have a floating-point datatype, then the Rank(A) function computes the rank of A by performing Gaussian elimination on the rows of A.
The rank of Matrix A is the number of non-zero rows in the resulting Matrix.
In the case that the Matrix A has a floating-point datatype, a singular value decomposition and analysis is performed.
This function is part of the LinearAlgebra package, and so it can be used in the form Rank(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[Rank](..).
with⁡LinearAlgebra:
A≔ScalarMatrix⁡n,3
A≔n000n000n
Rank⁡A
3
B≔−7,1,2|2,1,−1|3,0,−1|2,7,−3
B≔−723211072−1−1−3
Rank⁡B
2
numelems⁡RowSpace⁡B
F≔Matrix⁡15,13,825,25,13,1125,45,−13,725,datatype=float8
F≔0.2000000000000000.3333333333333330.3200000000000000.4000000000000000.3333333333333330.4400000000000000.800000000000000−0.3333333333333330.280000000000000
Rank⁡F
eqs≔u3−cos⁡q5⁢u5=0,cos⁡q4⁢u1+sin⁡q4⁢u2+u6+cos⁡q5⁢u4=0,−cos⁡q5⁢sin⁡q4⁢u1+cos⁡q5⁢cos⁡q4⁢u2+sin⁡q5⁢u3=0,sin⁡q5⁢sin⁡q4⁢u1−sin⁡q5⁢cos⁡q4⁢u2+cos⁡q5⁢u3−u5=0:
A,v≔GenerateMatrix⁡eqs,u1,u2,u3,u4,u5,u6
A,v≔0010−cos⁡q50cos⁡q4sin⁡q40cos⁡q501−cos⁡q5⁢sin⁡q4cos⁡q5⁢cos⁡q4sin⁡q5000sin⁡q4⁢sin⁡q5−cos⁡q4⁢sin⁡q5cos⁡q50−10,0000
Normalizer≔e↦simplify⁡e,trig
See Also
Download Help Document