# Please check this simple Linear Algebra problem

maherelharake

## Homework Statement

Give bases for row(A), col(A), and null(A).
A= [2,-4,0,2,1;-1,2,1,2,3;1,-2,1,4,4]

## The Attempt at a Solution

My answers were: bases for row(A)......[1,-2,0,1,1/2] and [0,0,1,3,7/2]
col(A).......[2;-1;1] and [0;1;1]
null(A)......[2;1;0;0;0],[-1;0;-3;1;0] and [-1/2;0;-7/2;0;1]

If anyone can check this it would be greatly appreciated. I think I know what I am doing, I just want someone to make sure. Thanks

maherelharake
Please, if anyone can find the time to help, it will be greatly appreciated.

Mentor
It's a good idea for you to learn how to check your own work. For all of these, go back over your row-reduction work and see if you have made an arithmetic mistake somewhere.

For row(A), you apparently found that one of the rows was a linear combination of the other two. The two vectors you have for row(A) are clearly linearly independent, so if you can show which linear combinatation of the two vectors makes up the third, then your work is correct.

For col(A), pretty much the same thing. You have determined that three of the columns are linear combinations of the other two. Can you demonstrate the three separate pairs of constants that generate the three missing columns from your two basis vectors?

maherelharake
For row(A), Row 1 + Row 2= Row 3.
For col(A), Col 1 + 3(Col 3) = Col 4.
4(Col 1) + 0(Col 3)= Col 2
1/2(Col 1) + 7/2(Col 3)= Col 5

What exactly do I have to do besides this to prove that the answer is correct? Thanks.

Mentor
Check that each vector in your nullspace actually maps to the zero vector in R5.

I've checked your results and don't see anything wrong. Good work!

maherelharake
Do you mean set up a matrix with the columns set as the null space vectors, and set them to 0? Like this...
[2, -1, -1/2,0; 1,0,0,0;0,-3,7/2,0;0,1,0,0;0,0,1,0]
Thanks again.

Mentor
No, that's not what I mean. Just carry out these multiplications.
A * [2;1;0;0;0]^T
A * [-1;0;-3;1;0]^T
A * [-1/2;0;-7/2;0;1]^T

Each product should be [0 0 0 0 0]^T.

maherelharake
Sorry, I am a bit confused. If you transpose those vectors, like you said above, then it wouldn't be possible to carry out that multiplication. 'A' will have 5 columns, and after you tranpose thos vectors, the next matri will have 1 row and 5 columns. Am I overlooking something simple? Thanks

Mentor
A is 3 x 5 (i.e., 3 rows and 5 columns). Each of the vectors I showed is 5 x 1. Each product will be 3 x 1, that is, a vector in R3.
What I said before about this matrix mapping to R5 was incorrect. This matrix maps vectors in R5 to vectors in R3. Is that clear?

maherelharake
But when you put A * [2;1;0;0;0]^T, doesn't that mean you are transposing A?

And do you care to explain that last sentence a little bit more? Thanks

Mentor
No, only the vector is transposed. If I wanted the transpose of A, I would write AT.

Think of A as a kind of function. (Actually, it is what is called a linear transformation.) The inputs to this function are vectors in five-dimension space -- R5. The outputs from this function are vectors in three-dimension space -- R3. The matrix A establishes a relationship between the input space and the output space. That's what is meant by a "mapping."

You probably haven't seen it yet, but there's a theorem about the rank and nullity of a matrix. It says that the dimensions of the column space and null space add up to the dimension of the input space. For your problem dim(column space) + dim(null space) = 2 + 3 = 5 = dim(input space).

maherelharake
If you transpose those vectors, wouldn't the vectors become 5 x 1?

Mentor
Yes - they have to have 5 rows in order to be multiplied by a 3 x 5 matrix.

maherelharake
Oh right. So final question, how did you know to transpose it?

Mentor
You have to. You can't have a 3 x 5 matrix multiplying a row vector (1 x 5 matrix). In general for a matrix product AB to be defined, the number of columns of A has to equal the number of rows of B. If A is an m x n matrix, and B is an n x p matrix, then the product AB is defined, and AB will be m x p.

In one sense, vectors are special cases of matrices, having either one row (row vectors) or one column (column vectors). In another sense, matrices are special cases of vectors, in that all of the matrices of a given size form a particular vector space.

maherelharake
Yeah I understand that, I just didn't know you could transpose whenever it was convenient.

Mentor
It wasn't at all about convenience; it was that I can't multiply a 3 x 5 matrix and a 1 x 5 row vector. Many times people will be a little sloppy and write it without indicating that they're doing the transpose of the vector, but it should be clearly understood that the multiplication is defined only if the vector on the right is a column vecto

maherelharake
I just wasn't aware that transposing it was allowed in that situation. I understand it must be transposed to be able to be multiplied, I just thought there must be some other requirement for transposition to be able to be carried out.