︠8a86ef33-f9e8-48f4-bd02-b76302152bc2︠ a = var('a'); b = var('b'); c = var('c'); d = var('d'); v1=vector((a,b)); v2=vector((c,b)) m=matrix([v1,v2]); m; M = m*m*m; M; ︡48cbbb39-57c3-4b2b-b293-24490a7fd47f︡{"stdout": "[(a*b + b^2)*c + (a^2 + b*c)*a (a*b + b^2)*b + (a^2 + b*c)*b]\n[(b^2 + b*c)*c + (a*c + b*c)*a (b^2 + b*c)*b + (a*c + b*c)*b]"}︡ ︠168affa1-9a31-4c1b-99b4-cf75bf47bd88︠ solve([M[0][0]==0, M[0][1]==0, M[1][0]==0, M[1][1]==0], a,b,c,d) ︡cd281825-6511-4f81-94f7-6e0b0212b8be︡{"stdout": "[[a == 0, b == 0, c == r28, d == r29], [a == r30, b == -r30, c == r30, d == r31]]"}︡ ︠f8ee79bf-44d9-4546-b1eb-98f9c12729dc︠ solve([(a*c+c*d)*(a*b+b*d) - (a*a+b*c)*(d*d+b*c) == 0],a,b,c,d) ︡7576212c-3ab8-4d97-92e8-fdb1953dd649︡{"stdout": "([{a: b*c/d}], [2])"}︡ ︠7fdbf0eb-14ba-49e5-b05b-66c837074c00︠ help(solve) ︡3415c852-ceb5-490f-bc94-fd9125b15fe2︡{"html": "
\n   Click to open help window   \n
"}︡ ︠2e05ae75-ef84-4093-8f86-df6aa5482df4︠ a,b,c,d,e,f,g,h,j,k,l,m,n,o,p,q,r = var('a,b,c,d,e,f,g,h,j,k,l,m,n,o,p,q,r') A = matrix([[a,b],[d,e]]) B = matrix([[j,k],[m,n]]) ︡a19927b9-16c8-4a01-a18a-2fb58695763d︡︡ ︠baa915ba-4e7e-41de-b54e-8590750fbb05︠ A*B ︡451b85cf-5360-41fc-aa82-b56b9013cbc5︡{"stdout": "[a*j + b*m + c*p a*k + b*n + c*q a*l + b*o + c*r]\n[d*j + e*m + f*p d*k + e*n + f*q d*l + e*o + f*r]\n[g*j + h*m + I*p g*k + h*n + I*q g*l + h*o + I*r]"}︡ ︠e4a12a5d-e6bb-4ab9-b918-de24a15ad8ca︠ B*A ︡d49d6e35-d4b9-46f4-9b05-1b05d70fd795︡{"stdout": "[a*j + d*k + g*l b*j + e*k + h*l c*j + f*k + I*l]\n[a*m + d*n + g*o b*m + e*n + h*o c*m + f*n + I*o]\n[a*p + d*q + g*r b*p + e*q + h*r c*p + f*q + I*r]"}︡ ︠928de546-1868-4ffa-9a0b-1a0e8144b284︠ (A*B).eigenvalues()==(B*A).eigenvalues() ︡4502a686-5482-4d33-b3d0-0aec724a84ae︡︡ ︠7f6c37f7-b188-4ad2-8815-1ef16ade640b︠ ︡111ca8bb-7cb1-4903-9c20-633764d6e194︡{"stdout": "[a*d + 1/2*b^2 + 1/2*c^2 - 1/2*(b + c)*sqrt(4*a*d + b^2 - 2*b*c + c^2), a*d + 1/2*b^2 + 1/2*c^2 + 1/2*(b + c)*sqrt(4*a*d + b^2 - 2*b*c + c^2)]"}︡ ︠82b52cbb-5893-493b-a40f-7f887a1192ff︠ ︡6f426159-657d-4d49-baec-49d07c145e3f︡{"stderr": "Traceback (most recent call last):\n File \"\", line 1, in \n File \"_sage_input_18.py\", line 10, in \n exec compile(u'open(\"___code___.py\",\"w\").write(\"# -*- coding: utf-8 -*-\\\\n\" + _support_.preparse_worksheet_cell(base64.b64decode(\"QSpC\"),globals())+\"\\\\n\"); execfile(os.path.abspath(\"___code___.py\"))' + '\\n', '', 'single')\n File \"\", line 1, in \n \n File \"/tmp/tmpeM3h2w/___code___.py\", line 2, in \n exec compile(u'A*B' + '\\n', '', 'single')\n File \"\", line 1, in \n \n File \"element.pyx\", line 2467, in sage.structure.element.Matrix.__mul__ (sage/structure/element.c:16791)\n File \"coerce.pyx\", line 795, in sage.structure.coerce.CoercionModel_cache_maps.bin_op (sage/structure/coerce.c:7489)\nTypeError: unsupported operand parent(s) for '*': 'Full MatrixSpace of 5 by 5 dense matrices over Real Double Field' and 'Full MatrixSpace of 2 by 2 dense matrices over Rational Field'"}︡