13.4 A DemoΒΆ
Before looking at the Implementation part of QuadraticForm, let’s try some examples.
Build a domain QF.
.. spadMathAnswer
Define a matrix to be used to construct a quadratic form.
.. spadMathAnswer
Construct the quadratic form. A package call $QF is necessary since there are other QuadraticForm domains.
.. spadMathAnswer
Looks like a matrix. Try computing the number of rows. FriCAS won’t let you.
.. spadMathAnswer
Create a direct product element v. A package call is again necessary, but FriCAS understands your list as denoting a vector.
.. spadMathAnswer
Compute the product vTAv.
.. spadMathAnswer
What is 3 times q minus q plus q?
.. spadMathAnswer