commands → linearsolve

linearsolve(A,B,P)

The linearsolve command finds a solution to A*X = B, where A is a matrix and b can be a matrix or a vector. If no solution exists then null is returned. The optional third argument P specifies a modulus so that the solution is computed mod P.

Examples

A = [[1,2],[3,4]];
B = [5,6];
linearsolve(A,B);
	[-4, 9/2]