SharedMTH 505 / determinants.sagewsOpen in CoCalc
Author: Jonathan Mitchell
Views : 14
a = var('a') A = matrix([[1,-1,a],[2,2,1],[0,a,-3/2]]) show(A) show(det(A))
(11a2210a32)\displaystyle \left(\begin{array}{rrr} 1 & -1 & a \\ 2 & 2 & 1 \\ 0 & a & -\frac{3}{2} \end{array}\right)
2a2a6\displaystyle 2 \, a^{2} - a - 6
a = var('a') A = matrix([[1,-1,a],[-1,2,-a],[a,1,1]]) show(A) det(A)
(11a12aa11)\displaystyle \left(\begin{array}{rrr} 1 & -1 & a \\ -1 & 2 & -a \\ a & 1 & 1 \end{array}\right)
-a^2 + 1
A.substitute(a==1)
[ 1 -1 1] [-1 2 -1] [ 1 1 1]
L = var('L') A = matrix([[2-L,1,1],[2,3-L,2],[1,1,2-L]]) show(A) show(expand(det(A)))
(L+2112L+3211L+2)\displaystyle \left(\begin{array}{rrr} -L + 2 & 1 & 1 \\ 2 & -L + 3 & 2 \\ 1 & 1 & -L + 2 \end{array}\right)
L3+7L211L+5\displaystyle -L^{3} + 7 \, L^{2} - 11 \, L + 5