I am having some problems grading free form linear algebra questions like

1) Given a vector v created via randomvector enter u orthogonal to v.

2) Given a plane with randomly chosen coefficients give a basis for the plane.

In the first case I am simply trying to test that the dot product is zero but am totally unsuccessful. I have tried extracting components, changing formats for the vector and so on, all to no avail. (I'm not even trying to also test they didn't just enter zero yet!)

Ideas on how to grade this and to generally debug when the grading involves a functional of the answer greatly appreciated.

Thanks!

JF.

]]>I am having some problems grading free form linear algebra questions like

1) Given a vector v created via randomvector enter u orthogonal to v.

2) Given a plane with randomly chosen coefficients give a basis for the plane.

In the first case I am simply trying to test that the dot product is zero but am totally unsuccessful. I have tried extracting components, changing formats for the vector and so on, all to no avail. (I'm not even trying to also test they didn't just enter zero yet!)

Ideas on how to grade this and to generally debug when the grading involves a functional of the answer greatly appreciated.

Thanks!

JF.

]]>Part 1) Text Entry: I assume that you have a working variable $v for the LinearAlgebra[RandomVector] command. If students enter [1,2,3] then use the grading code

u:=Vector($RESPONSE); evalb($v.u=0);

Part 1) Symbolic Entry: Similarly, where $v is the random vector, the student uses the Matrix/Vector entry button, then use the grading code

u:=convert($RESPONSE,Vector); evalb($v.u=0);

For 2), you just need to test that the two vectors in the basis are orthogonal and both satisfy the equation of the plane, correct? Suppose $plane represents the equation of the plane without z (e.g. $plane=3x+2y). In Symbolic mode, if the student enters both vectors separated by a comma, then try this:

r:={$RESPONSE}; evalb(eval($plane, [x = r[1][1], y = r[1][2]]) = r[1][3] and eval($plane, [x = r[2][1], y = r[2][2]]) = r[2][3] and u.v = 0);

If this does not help solve the issue, I would suggest exporting the question as you have designed it currently, and attaching the zip file here.

]]>Best, Steen