分享知识、传播快乐、增长见闻、留下美好,大家好,这里是Leanringyard学院。今天小编将继续为大家带来Mathematica入门教程系列文章,今天的主题就是:Mathematica学习8。Share knowledge, spread happiness, increase knowledge and leave beauty. Hello, everyone, this is leanringyard college. In today’s and later articles, Xiaobian will continue to bring you a series of Mathematica introductory tutorials. Today’s topic is: getting started with Mathematica tutorial 8.
01内容提要 Executive summary
前面我们介绍了矩阵的输入方式,还有怎样求一些特殊矩阵的函数,本期内容重点进入实操演练,在实际应用中进一步加深巩固矩阵命令这一板块知识的印象。现在就开启我们的学习之旅吧!Earlier, we introduced the input method of matrix and how to find some special matrix functions. This issue focuses on practical exercises to further deepen the impression of consolidating the knowledge of matrix commands in practical application. Start our learning journey now!
02矩阵输入 Matrix input
在Mathematica分别使用,列表和函数的方式输入下图所示的四个矩阵。In Mathematica, input the four matrices shown in the figure below in the form of list and function respectively.
具体结果如下所示,其中主要用到的函数就是MatrixForm[](矩阵格式)。The specific results are as follows. The main function used is matrixform [] (matrix format)
除此之外,我们可以充分利用Mathematica的便捷功能,点击显示为选择矩阵就可以直接将列表的列表转化为矩阵形式。点击更多发现还可以求矩阵的行列式,秩,逆矩阵等。In addition, we can make full use of the convenient functions of Mathematica. Click the display as selection matrix to directly convert the list of the list into matrix form. Click more to find that you can also find the determinant, rank, inverse matrix, etc.
针对矩阵B,我们观察到矩阵B是对角元素矩阵,这样就有多了一种输入方式。For matrix B, we observe that matrix B is a diagonal element matrix, so there is another input mode.
扩散一下思维,如果是将B改为3×3的单位矩阵,我们又可以怎样来进行表示呢?Mathematica中直接使用单位矩阵就可以实现单位矩阵的输入。Spread your mind. If you change B to 3 × How can we express the identity matrix of 3? The input of identity matrix can be realized by using identity matrix directly in Mathematica.
03计算 Calculation
基于以上A和B矩阵,分别求取其逆矩阵,行列式,秩、转置方程、特征值以及迹。经过判断,矩阵A的秩不等于3,而且行列式为0,所以不存在逆矩阵。Based on the above a and B matrices, the inverse matrix, determinant, rank, transpose equation, eigenvalue and trace are obtained respectively.After judgment, the rank of matrix A is not equal to 3, and the determinant is 0, so there is no inverse matrix.
计算AB,A+B,这里按照矩阵的运算规则计算即可:Calculate AB, a + B, which can be calculated according to the operation rules of the matrix:
04雅可比与海塞矩阵 Jacobian and Hesse matrix
从前面几期的内容,得知雅可比矩阵是由一阶偏导以一定方式构成的矩阵,以图片的函数为例,计算此题的雅可比矩阵:From the contents of previous issues, it is known that the Jacobian matrix is a matrix composed of first-order partial derivatives in a certain way. Taking the function of the picture as an example, calculate the Jacobian matrix of this problem:
答案如下:The answer:
海塞矩阵可以用来判断多元函数的极值,它是多元函数在某一领域内的二阶连续偏导数构成的矩阵,以下图为例,计算海塞矩阵:Hessian matrix can be used to judge the extreme value of multivariate function. It is a matrix composed of second-order continuous partial derivatives of multivariate function in a certain field. Take the following figure as an example to calculate Hessian matrix:
答案如下:The answer:
判定得到该海塞矩阵为正定矩阵,所以具有极小值:It is determined that the Hessian matrix is a positive definite matrix, so it has a minimum value:
今天的分享就到这里了。如果您对今天的文章有独特的想法,欢迎给我们留言,让我们相约明天,祝您今天过得开心快乐!That’s it for today’s sharing.If you have unique ideas about today’s article, please leave us a message,Let us meet tomorrow,I wish you a happy day today!
参考资料:谷歌翻译、百度百科,Mathematica软件
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!