Mathematica 符号矩阵 NullSpace 命令中的假设
当在符号矩阵上执行 Mathematica 的 NullSpace 命令时,Mathematica 对变量做出一些假设,我想知道它们是什么。
例如,
In[1]:= NullSpace[{{a, b}, {c, d}}]
Out[1]= {}
但未说明的假设是
a d != b c.
如何确定 NullSpace 命令使用哪些假设?
When executing Mathematica's NullSpace command on a symbolic matrix, Mathematica makes some assumptions about the variables and I would like to know what they are.
For example,
In[1]:= NullSpace[{{a, b}, {c, d}}]
Out[1]= {}
but the unstated assumption is that
a d != b c.
How can I determine what assumptions the NullSpace command uses?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可以说,基本假设是通过 PossibleZeroQ 的内部使用来强制执行的。如果该函数不能将表达式视为零,那么它将被视为非零,因此可以用作行缩减中的主元(这通常用于符号 NullSpace)。
---编辑---
提出了关于符号线性代数零测试中可能可见的内容的问题。默认情况下,对
PossibleZeroQ
的调用通过内部路由。PossibleZeroQ
后来建立在这些之上。在 Mathematica 内核代码开发中始终存在一个问题:什么应该经过主求值器循环以及什么(例如为了速度的目的)应该短路。只有前者很容易被追踪到。
人们可以通过指定非默认零测试来影响符号线性代数的过程。例如,可以
在
NullSpace
中使用ZeroTest->myTest
。---编辑结束---
The underlying assumptions, so to speak, are enforced by internal uses of
PossibleZeroQ
. If that function cannot deem an expression to be zero then it will be regarded as nonzero, hence eligible for use as a pivot in row reduction (which is generally what is used for symbolic NullSpace).---edit---
The question was raised regarding what might be visible in zero testing in symbolic linear algebra. By default the calls to
PossibleZeroQ
go through internal routes.PossibleZeroQ
was later built on top of those.There is always a question in Mathematica kernel code development of what should go through the main evaluator loop and what (e.g. for purposes of speed) should short circuit. Only the former is readily traced.
One can influence the process in symbolic linear algebra by specifying a non-default zero test. Could be e.g.
and then use
ZeroTest->myTest
inNullSpace
.---end edit---
发现了这一点:
在这种情况下,如果将矩阵扩展一列,就会出现假设:
在某些情况下也许有用
Found this:
In this case, if you expand your matrix by one column, the assumption shows up:
Perhaps useful in some situations