To find the coordinates of the vector (-3,1) in the basis given by (-1,0) and (1,1), we first need to create a matrix with the basis vectors as columns. We can then solve the system of equations Ax = b, where A is the matrix of basis vectors, x is the vector of coordinates we are trying to find, and b is the vector we want to express in terms of the basis vectors.
Here's how to do it in MATLAB:
main.m373 chars11 lines
The result is a column vector x that contains the coordinates of v in the basis of A:
main.m15 chars5 lines
Therefore, the coordinates of the vector (-3,1) in the basis given by (-1,0) and (1,1) are (2,1).
gistlibby LogSnag