Student[NumericalAnalysis]

 return a leading submatrix of a square matrix

Parameters

 A - Matrix; a square matrix n - posint; indicates the sub-level of leading principal submatrix

Description

 • The LeadingPrincipalSubmatrix command returns the n-th leading principal submatrix of A.
 • The LeadingPrincipalSubmatrix is a special case of the LinearAlgebra[SubMatrix] command.

Examples

 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{NumericalAnalysis}\right]\right):$
 > $A≔\mathrm{Matrix}\left(\left[\left[1,4,7,10\right],\left[4,5,8,6\right],\left[7,8,10,5\right],\left[5,3,5,8\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{cccc}{1}& {4}& {7}& {10}\\ {4}& {5}& {8}& {6}\\ {7}& {8}& {10}& {5}\\ {5}& {3}& {5}& {8}\end{array}\right]$ (1)
 > $\mathrm{LeadingPrincipalSubmatrix}\left(A,3\right)$
 $\left[\begin{array}{ccc}{1}& {4}& {7}\\ {4}& {5}& {8}\\ {7}& {8}& {10}\end{array}\right]$ (2)
 > $\mathrm{LeadingPrincipalSubmatrix}\left(A,2\right)$
 $\left[\begin{array}{cc}{1}& {4}\\ {4}& {5}\end{array}\right]$ (3)
 > $\mathrm{LeadingPrincipalSubmatrix}\left(A,1\right)$
 $\left[\begin{array}{c}{1}\end{array}\right]$ (4)