{{{id=1| 3+4 /// 7 }}} {{{id=2| M=matrix([[1,2],[3,4]]) show(M) /// }}} {{{id=3| N=matrix(3,2,[1,2,3,4,5,6]) show(N) /// }}} {{{id=4| A=matrix(2,2,[1,x,0,2]) A /// [1 x] [0 2] }}} {{{id=5| N[1,0] /// 3 }}} {{{id=6| show(parent(A)) /// }}} {{{id=7| A+M /// [ 2 x + 2] [ 3 6] }}} {{{id=8| A*M /// [3*x + 1 4*x + 2] [ 6 8] }}} {{{id=9| identity_matrix(10) /// [1 0 0 0 0 0 0 0 0 0] [0 1 0 0 0 0 0 0 0 0] [0 0 1 0 0 0 0 0 0 0] [0 0 0 1 0 0 0 0 0 0] [0 0 0 0 1 0 0 0 0 0] [0 0 0 0 0 1 0 0 0 0] [0 0 0 0 0 0 1 0 0 0] [0 0 0 0 0 0 0 1 0 0] [0 0 0 0 0 0 0 0 1 0] [0 0 0 0 0 0 0 0 0 1] }}} {{{id=10| zero_matrix(2,5) /// [0 0 0 0 0] [0 0 0 0 0] }}} {{{id=11| B=matrix(20,20,{(0,0):1,(3,4):-4}) show(B) /// }}} {{{id=12| A /// [1 x] [0 2] }}} {{{id=13| A[1] /// (0, 2) }}} {{{id=14| A.row(1) /// (0, 2) }}} {{{id=15| A.column(1) /// (x, 2) }}} {{{id=16| M /// [1 2] [3 4] }}} {{{id=17| M[1,1]=42 /// }}} {{{id=18| M /// [ 1 2] [ 3 42] }}} {{{id=19| H=matrix(6,6,lambda i,j: 1/(i+j+1)) H /// [ 1 1/2 1/3 1/4 1/5 1/6] [ 1/2 1/3 1/4 1/5 1/6 1/7] [ 1/3 1/4 1/5 1/6 1/7 1/8] [ 1/4 1/5 1/6 1/7 1/8 1/9] [ 1/5 1/6 1/7 1/8 1/9 1/10] [ 1/6 1/7 1/8 1/9 1/10 1/11] }}} {{{id=20| H1=matrix(6,6,lambda i,j: i+j) H1 /// [ 0 1 2 3 4 5] [ 1 2 3 4 5 6] [ 2 3 4 5 6 7] [ 3 4 5 6 7 8] [ 4 5 6 7 8 9] [ 5 6 7 8 9 10] }}} {{{id=21| b=matrix(6,1,lambda i,j: 1/(i+1)^2) b /// [ 1] [ 1/4] [ 1/9] [1/16] [1/25] [1/36] }}} {{{id=22| H^(-1)*b /// [ 71/15] [ -35] [ 140] [ -280] [ 525/2] [-462/5] }}} {{{id=23| H\b /// [ 71/15] [ -35] [ 140] [ -280] [ 525/2] [-462/5] }}} {{{id=24| H.inverse() /// [ 36 -630 3360 -7560 7560 -2772] [ -630 14700 -88200 211680 -220500 83160] [ 3360 -88200 564480 -1411200 1512000 -582120] [ -7560 211680 -1411200 3628800 -3969000 1552320] [ 7560 -220500 1512000 -3969000 4410000 -1746360] [ -2772 83160 -582120 1552320 -1746360 698544] }}} {{{id=25| H.inverse()*b /// [ 71/15] [ -35] [ 140] [ -280] [ 525/2] [-462/5] }}} {{{id=26| H.solve_right(b) /// [ 71/15] [ -35] [ 140] [ -280] [ 525/2] [-462/5] }}} {{{id=27| A=matrix([[1,2,3],[2,4,5],[0,0,1]]) A /// [1 2 3] [2 4 5] [0 0 1] }}} {{{id=28| rank(A) /// 2 }}} {{{id=29| A \ vector([1,2,0]) /// (1, 0, 0) }}} {{{id=30| A.right_kernel() /// Free module of degree 3 and rank 1 over Integer Ring Echelon basis matrix: [ 2 -1 0] }}} {{{id=31| V=QQ^5 V /// Vector space of dimension 5 over Rational Field }}} {{{id=32| v1=V([1,1,1,0,0]) v2=V([1,-1,1,0,0]) v3=V([1,0,1,0,0]) v1 /// (1, 1, 1, 0, 0) }}} {{{id=33| show(parent(v1)) /// }}} {{{id=36| /// }}} {{{id=34| U=V.subspace([v1,v2,v3]) U /// Vector space of degree 5 and dimension 2 over Rational Field Basis matrix: [1 0 1 0 0] [0 1 0 0 0] }}} {{{id=35| U.basis() /// [ (1, 0, 1, 0, 0), (0, 1, 0, 0, 0) ] }}} {{{id=37| v4=V([0,0,0,1,0]) v4 /// (0, 0, 0, 1, 0) }}} {{{id=38| v4 in U /// False }}} {{{id=39| v1 in U /// True }}} {{{id=40| W=V.subspace([V(v4)]) W /// Vector space of degree 5 and dimension 1 over Rational Field Basis matrix: [0 0 0 1 0] }}}
Ist $\mathrm{dim}(U)\leq \mathrm{dim}(V)$?
{{{id=41| U <= V /// True }}} {{{id=42| W <=U /// True }}}$U+W$ ist der kleinste Untervektorraum von $V$, welcher $U$ und $W$ enthält.
{{{id=43| U+W /// Vector space of degree 5 and dimension 3 over Rational Field Basis matrix: [1 0 1 0 0] [0 1 0 0 0] [0 0 0 1 0] }}} {{{id=44| U.intersection(W) /// Vector space of degree 5 and dimension 0 over Rational Field Basis matrix: [] }}} {{{id=46| Qx=QQ[x] /// }}} {{{id=47| x=Qx(x) /// }}} {{{id=48| pp=[1+x+x^2,1-x+x^2,x^3-x,2+x^3] show(pp) /// }}} {{{id=49| p0=pp[0] p0 /// x^2 + x + 1 }}} {{{id=50| pp[3].coefficients() /// [2, 1] }}} {{{id=51| kv0=[p.coefficients(sparse=False) for p in pp] kv0 /// [[1, 1, 1], [1, -1, 1], [0, -1, 0, 1], [2, 0, 0, 1]] }}} {{{id=52| n=max([p.degree() for p in pp]) +1 n /// 4 }}} {{{id=53| def verlaengern(v,n): for i in range(len(v),n): v.append(0) return v /// }}} {{{id=54| kv=[verlaengern(v,n) for v in kv0] kv /// [[1, 1, 1, 0], [1, -1, 1, 0], [0, -1, 0, 1], [2, 0, 0, 1]] }}} {{{id=55| kv0 /// [[1, 1, 1, 0], [1, -1, 1, 0], [0, -1, 0, 1], [2, 0, 0, 1]] }}} {{{id=56| def linearunabhaengig(pp): n=max([p.degree() for p in pp]) +1 kv0=[p.coefficients(sparse=False) for p in pp] kv=[verlaengern(v,n) for v in kv0] r=rank(matrix(kv)) return (r==len(pp)) /// }}} {{{id=57| linearunabhaengig(pp) /// True }}} {{{id=58| g=(1..4) g ///