# (다른교재)-Ch-1-ex-1.2-8-(d)-New-허재석

## 2297 days ago by matrix

A=matrix(ZZ, 4, 4, [1, -1, 2, 0, 2, -2, 2, -4, -1, 1, -1, 2, -3, 1, -8, -10]) b=vector([7, 12, -4, -29]) print "[A: b] =" print A.augment(b) print print "RREF([A: b]) =" print A.augment(b).rref() print print "det(A)=", det(A), "∴has no solutions" print print "b' =", A.solve_right(b) #.solve_right()를 쓰면 행벡터 형태의 해를 얻습니다.
 [A: b] = [ 1 -1 2 0 7] [ 2 -2 2 -4 12] [ -1 1 -1 2 -4] [ -3 1 -8 -10 -29] RREF([A: b]) = [ 1 0 0 -1 0] [ 0 1 0 3 0] [ 0 0 1 2 0] [ 0 0 0 0 1] det(A)= 0 ∴has no solutions b' = Traceback (click to the left of this block for traceback) ... ValueError: matrix equation has no solutions [A: b] = [ 1 -1 2 0 7] [ 2 -2 2 -4 12] [ -1 1 -1 2 -4] [ -3 1 -8 -10 -29] RREF([A: b]) = [ 1 0 0 -1 0] [ 0 1 0 3 0] [ 0 0 1 2 0] [ 0 0 0 0 1] det(A)= 0 ∴has no solutions b' = Traceback (most recent call last): File "", line 1, in File "_sage_input_3.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("QT1tYXRyaXgoWlosIDQsIDQsIFsxLCAtMSwgMiwgMCwgMiwgLTIsIDIsIC00LCAtMSwgMSwgLTEsIDIsIC0zLCAxLCAtOCwgLTEwXSkKYj12ZWN0b3IoWzcsIDEyLCAtNCwgLTI5XSkKcHJpbnQgIltBOiBiXSA9IgpwcmludCBBLmF1Z21lbnQoYikKcHJpbnQgCnByaW50ICJSUkVGKFtBOiBiXSkgPSIKcHJpbnQgQS5hdWdtZW50KGIpLnJyZWYoKQpwcmludCAKcHJpbnQgImRldChBKT0iLCBkZXQoQSksICLiiLRoYXMgbm8gc29sdXRpb25zIgpwcmludApwcmludCAiYicgPSIsIEEuc29sdmVfcmlnaHQoYikJIy5zb2x2ZV9yaWdodCgp66W8IOyTsOuptCDtlonrsqHthLAg7ZiV7YOc7J2YIO2VtOulvCDslrvsirXri4jri6Qu"),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in File "/tmp/tmp6qIWJl/___code___.py", line 13, in exec compile(u'print "b\' =", A.solve_right(b)\t#.solve_right()\ub97c \uc4f0\uba74 \ud589\ubca1\ud130 \ud615\ud0dc\uc758 \ud574\ub97c \uc5bb\uc2b5\ub2c8\ub2e4. File "", line 1, in File "matrix2.pyx", line 322, in sage.matrix.matrix2.Matrix.solve_right (sage/matrix/matrix2.c:4748) File "matrix2.pyx", line 440, in sage.matrix.matrix2.Matrix._solve_right_general (sage/matrix/matrix2.c:5561) ValueError: matrix equation has no solutions