I would appreciate it if someone could assist me with coding the following problem.
Give an example of an idempotent matrix. Ideally, I would like students to input their answer using the format (row_1,...,row_m) using a matrix of any size, so that ([1,1],[0,0]) and ([2,-2,-4],[-1,3,4],[1,-2,-3]) would both be acceptable answers. (A matrix *A* is *idempotent* if *A*^2=*A*.) If I understand correctly, using a mathresponse problem is problematic in this case because there is some preprocessing of the students submission that makes it difficult to use in the answer algorithm, but one way around this is to use customresponse combined with the &cas() function. In order that Maxima understands the students submission, the expression 'matrix' needs to be appended to the front. Also, matrix exponentiation is denoted by A^^n in Maxima. If it is easier to test a numerical condition, one could verify that rank(A^^2 - A) = 0. Thanks, Justin P.S. Ideally, I would like to stipulate that students provide a nontrivial example (excluding the zero matrix and the identity matrix) but that is the topic of another discussion. Justin Gray | Senior Lecturer Department of Mathematics | Simon Fraser University 8888 University Drive, Burnaby | V5A 1S6 | Canada Tel: +1 778.782.4237
_______________________________________________ LON-CAPA-users mailing list LON-CAPA-users@mail.lon-capa.org http://mail.lon-capa.org/mailman/listinfo/lon-capa-users