Did I find the right examples for you? yes no      Crawl my project      Python Jobs

# sympy.liealgebras.weyl_group.WeylGroup.matrix_form

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)
```This method takes input from the user in the form of products of the
generating reflections, and returns the matrix corresponding to the
element of the Weyl group.  Since each element of the Weyl group is
a reflection of some type, there is a corresponding matrix representation.
This method uses the standard representation for all the generating
reflections.

Example
=======
>>> from sympy.liealgebras.weyl_group import WeylGroup(more...)
```

```def test_weyl_group():
c = WeylGroup("A3")
assert c.matrix_form('r1*r2') == Matrix([[0, 0, 1, 0], [1, 0, 0, 0],
[0, 1, 0, 0], [0, 0, 0, 1]])
assert c.generators() == ['r1', 'r2', 'r3']
```
```    assert d.group_order() == 3840
assert d.element_order('r1*r2*r4*r5') == 12
assert d.matrix_form('r2*r3') ==  Matrix([[0, 0, 1, 0, 0], [1, 0, 0, 0, 0],
[0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]])
assert d.element_order('r1*r2*r1*r3*r5') == 6
e = WeylGroup("D5")
assert e.element_order('r2*r3*r5') == 4
assert e.matrix_form('r2*r3*r5') == Matrix([[1, 0, 0, 0, 0], [0, 0, 0, 0, -1],
```
```    assert f.element_order('r2*r1*r1*r2') == 1

assert f.matrix_form('r1*r2*r1*r2') == Matrix([[0, 1, 0], [0, 0, 1], [1, 0, 0]])
g = WeylGroup("F4")
assert g.matrix_form('r2*r3') == Matrix([[1, 0, 0, 0], [0, 1, 0, 0],
```