Summary: Ejercicio 32.25 pgn209 Algebra linear Bernard Kolman 2005
kol2005pgn209ejc21.tm por Julian Camilo Daza
21. solve the ginven linear system by Cramer's rule
x + y + z - 2w = -4
2y + z + 3w = 4
2x + y - z + 2w = 5
x - y + w = 4
sage: M = matrix(QQ,[[1,1,1,-2],[0,2,1,3],[2,1,-1,2],[1,-1,0,1]])
sage: M
[ 1 1 1 -2]
[ 0 2 1 3]
[ 2 1 -1 2]
[ 1 -1 0 1]
sage: m = matrix(QQ,[[-4,1,1,-2],[4,2,1,3],[5,1,-1,2],[4,-1,0,1]])
sage: m
[-4 1 1 -2]
[ 4 2 1 3]
[ 5 1 -1 2]
[ 4 -1 0 1]
sage: n = matrix(QQ,[[1,-4,1,-2],[0,4,1,3],[2,5,-1,2],[1,4,0,1]])
sage: n
[ 1 -4 1 -2]
[ 0 4 1 3]
[ 2 5 -1 2]
[ 1 4 0 1]
sage: o = matrix(QQ,[[1,1,-4,-2],[0,2,4,3],[2,1,5,2],[1,-1,4,1]])
sage: o
[ 1 1 -4 -2]
[ 0 2 4 3]
[ 2 1 5 2]
[ 1 -1 4 1]
sage: p = matrix(QQ,[[1,1,1,-4],[0,2,1,4],[2,1,-1,5],[1,-1,0,4]])
sage: p
[ 1 1 1 -4]
[ 0 2 1 4]
[ 2 1 -1 5]
[ 1 -1 0 4]
Ahora para el valor de x:
sage: (m.determinant())/(M.determinant())
1
x=1
Ahora para el valor de y:
sage: (n.determinant())/(M.determinant())
-1
y=-1
Ahora para el valor de z:
sage: (o.determinant())/(M.determinant())
0
z=0
Ahora para el valor de w:
sage: (p.determinant())/(M.determinant())
2
w=2