1. 矩阵与行列式的区别:
矩阵是一个表格,行列式是一个数。矩阵的行数和列数可以不相等,但是行列式的行数和列数必须相等。
在“numpy”里矩阵的点积可以有两种不同表达方式。
axis = 1代表行相加,axis = 0代表列相加
argmin()和argmax()分别为求出矩阵中最小值和最大值的index.例如,矩阵A中最小值为“2”,其在矩阵中的index为0,而最大值为“13”,其在矩阵中的index为11。
diff()是用来依次求矩阵中元素之间的差值,得出的是一个差值矩阵。
arange(start,
stop,
step) Values are generated within the half-open interval [start,
stop), with spacing between values given by step.
Because the start is larger than the stop, so if a positive or default step is given, the computer would get contradiction.
sort() can only sort each row in a matrix.
Non-evenly division of a matrix is done by spliting the matrix into one with priority of containing more columns firstly then the others with less columns.
对于单纯形法,主要是通过增加辅助变量来将不等式变为等式,然后根据系数矩阵的秩确定基础向量和非基础向量,然后通过将非基础向量设置为0及约束条件排除矛盾解后,得到其可能的解,并逐一测试得到最大或者最小解。