Tag Info

Hot answers tagged

8

I needed this decomposition to answer another question, so I broke down and implemented it myself. The code is more or less a straightforward translation of the pseudocode in Golub/Van Loan: LDLT[mat_?SymmetricMatrixQ] := Module[{n = Length[mat], mt = mat, v, w}, Do[ If[j > 1, w = mt[[j, ;; j - 1]]; v = ...


7

$MachinePrecision is different from MachinePrecision. The former calls for an arbitrary precision calcluation, done at the same precision as the machine-precision one. The main reason one would want to use this is to enable precision tracking, which is absent for a true machine-precision calculation using MachinePrecision. And, there is your answer. ...


3

This is a somewhat high-brow way of showing the Cayley-Hamilton theorem, through the power of holomorphic functional calculus. As I mentioned in this answer, one of the standard ways to define a matrix function is through a Cauchy-like construction: $$f(\mathbf A) = \frac{1}{2\pi i} \oint_\gamma f(z)\, (z \mathbf I- \mathbf A)^{-1}\,\mathrm dz$$ where the ...


2

We can set up your problem as follows, including the requirement that all vector elements be rational and non-zero: matrix = Table[Indexed[a, {i, j}], {i, 1, 6}, {j, 1, 6}]; instance = FindInstance[ Flatten@{ Equal @@@ Table[{matrix[[i, 1]]^2, Total[matrix[[i, 2 ;;]]^2]}, {i, 1, 6, 1}], Table[Indexed[a, {i, j}] != 0, {i, 1, 6}, {j, 1, 6}] ...



Only top voted, non community-wiki answers of a minimum length are eligible