Matrix - Maple Help

verify/Matrix

verify a relation between two Matrices

 Calling Sequence verify(expr1, expr2, Matrix) verify(expr1, expr2, 'Matrix'(ver))

Parameters

 expr1, expr2 - anything, assumed to be of type Matrix ver - verification for the Matrix elements

Description

 • The verify(expr1, expr2, Matrix) and verify(expr1, expr2, 'Matrix'(ver)) calling sequences return true if it can be determined that the Matrices satisfy a relation elementwise, either by testing for equality or by using the verification ver.
 • If true is returned, then each of the pairs of elements satisfied the relation. If false is returned, then at least one pair of elements did not satisfy the relation (a result of type verify(false)). Otherwise, FAIL is returned, indicating that for at least one pair of elements it could not be determined whether or not they satisfied the relation (a result of type verify(FAIL)).
 • The verification Matrix is symmetric and a verification 'Matrix'(ver) is symmetric if and only if the verification ver is symmetric.
 • Since Matrix is a Maple function, it must be enclosed in single quotes to prevent evaluation.
 • If either expr1 or expr2 is not of type Matrix, then false is returned.
 • The special verifications %NULL, seq, and &, can be used to verify an expression sequence in a Matrix. See verify/exprseq.

Examples

 > $\mathrm{u1}≔\mathrm{Matrix}\left(2,2,\left[\left[1,x\left(1-x\right)\right],\left[3,4\right]\right]\right)$
 ${\mathrm{u1}}{≔}\left[\begin{array}{cc}{1}& {x}{}\left({1}{-}{x}\right)\\ {3}& {4}\end{array}\right]$ (1)
 > $\mathrm{u2}≔\mathrm{Matrix}\left(2,2,\left[\left[1,x\left(1-x\right)\right],\left[3,4\right]\right]\right)$
 ${\mathrm{u2}}{≔}\left[\begin{array}{cc}{1}& {x}{}\left({1}{-}{x}\right)\\ {3}& {4}\end{array}\right]$ (2)
 > $\mathrm{evalb}\left(\mathrm{u1}=\mathrm{u2}\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{verify}\left(\mathrm{u1},\mathrm{u2},'\mathrm{Matrix}'\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{u3}≔\mathrm{Matrix}\left(2,2,\left[\left[1,x-{x}^{2}\right],\left[3,4\right]\right]\right)$
 ${\mathrm{u3}}{≔}\left[\begin{array}{cc}{1}& {-}{{x}}^{{2}}{+}{x}\\ {3}& {4}\end{array}\right]$ (5)
 > $\mathrm{verify}\left(\mathrm{u1},\mathrm{u3},'\mathrm{Matrix}'\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{verify}\left(\mathrm{u1},\mathrm{u3},'\mathrm{Matrix}\left(\mathrm{expand}\right)'\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{v1}≔\mathrm{Matrix}\left(2,2,\left[\left[0.3222,0.5001\right],\left[1.0320,0.9111\right]\right]\right)$
 ${\mathrm{v1}}{≔}\left[\begin{array}{cc}{0.3222}& {0.5001}\\ {1.0320}& {0.9111}\end{array}\right]$ (8)
 > $\mathrm{v2}≔\mathrm{Matrix}\left(2,2,\left[\left[0.3223,0.5000\right],\left[1.03205,0.911105\right]\right]\right)$
 ${\mathrm{v2}}{≔}\left[\begin{array}{cc}{0.3223}& {0.5000}\\ {1.03205}& {0.911105}\end{array}\right]$ (9)
 > $\mathrm{verify}\left(\mathrm{v1},\mathrm{v2},'\mathrm{Matrix}'\right)$
 ${\mathrm{false}}$ (10)
 > $\mathrm{verify}\left(\mathrm{v1},\mathrm{v2},'\mathrm{Matrix}\left(\mathrm{float}\left({10}^{6}\right)\right)'\right)$
 ${\mathrm{true}}$ (11)

Compatibility

 • The verify/Matrix command was updated in Maple 2015.