Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

kevinlui's site

7239 views
Kernel: SageMath 8.0

Problem 1

B = matrix([[1,1,11],[-1,0,15],[1,2,2017]])
B^(-1)
[ -1/66 -133/132 1/132] [ 508/495 1003/990 -13/990] [ -1/990 -1/1980 1/1980]
y = vector([1,-2,0])
B \ y
(2, -1, 0)

Problem 4

A = matrix([[1,2,-1,-3],[2,4,0,-4],[3,6,-1,-7]]) A
[ 1 2 -1 -3] [ 2 4 0 -4] [ 3 6 -1 -7]
A.rref()
[ 1 2 0 -2] [ 0 0 1 1] [ 0 0 0 0]

Problem 5

A = matrix([[2,4,-1,-2],[-1,-3,-1,0],[1,1,2,2],[2,6,2,0]]) A
[ 2 4 -1 -2] [-1 -3 -1 0] [ 1 1 2 2] [ 2 6 2 0]
B=A.rref() B
[ 1 0 0 1/2] [ 0 1 0 -1/2] [ 0 0 1 1] [ 0 0 0 0]
SB = A.columns()[:2] TB = A.columns()[2:]
V = VectorSpace(QQ, 4)
S = V.subspace(SB)
T = V.subspace(TB)
S, T
(Vector space of degree 4 and dimension 2 over Rational Field Basis matrix: [ 1 0 1 0] [ 0 1 1 -2], Vector space of degree 4 and dimension 2 over Rational Field Basis matrix: [ 1 0 -1 0] [ 0 1 -1 -2])
S.intersection(T)
Vector space of degree 4 and dimension 1 over Rational Field Basis matrix: [ 1 -1 0 2]
SB[0]-SB[1]
(-2, 2, 0, -4)