THIS IS A LINEAR ALGEBRA PROBLEM IN MATLAB The set M of all
THIS IS A LINEAR ALGEBRA PROBLEM IN MATLAB The set M of all matrices of the form [ 0, b; c, 0] where b, c are real numbers, is a subspace of M(2x2), the space of all 2x2 matrices with real entries. It can be shown that the standard basis for M is E={[0, 1; 0, 0], [0 , 0; 1 , 0]} referred for simplicity as E = {e2, e3}. B = {b1, b2} = {[ 0, 1; 1 ,0], [0, 1; -1, 0]} is linearly independent. Justify why B is a basis for M. So far I have the following matlab code, syms v u; s1 = u*b1 s2 = v*b2 s3 = s1+s2 eqn1 = u+v == b; eqn2 = u-v == c; [A,S] = equationsToMatrix([eqn1, eqn2], [u, v]) % B is linearly independent and subspace spanned by B coincides with M. M = Span{b1, b2}
Solution
B is a basis for M because both elements are of type 2X2 double same as that of E. Since E is a standard basis for M so also is B. This can be checked in MATLAB as follows:
>> E={[0, 1; 0, 0], [0 , 0; 1 , 0]}
E =
[2x2 double] [2x2 double]
>> B ={[ 0, 1; 1 ,0], [0, 1; -1, 0]}
B =
[2x2 double] [2x2 double]
The codes and their output is given below:
clear
clc
syms v u;
b1 = [ 0, 1; 1 ,0];
b2 = [0, 1; -1, 0];
s1 = u*b1
s2 = v*b2
s3 = s1+s2
eqn1 = u+v;
eqn2 = u-v;
[A,S] = equationsToMatrix([eqn1, eqn2], [u, v])
Output:
s1 =
[ 0, u]
[ u, 0]
s2 =
[ 0, v]
[ -v, 0]
s3 =
[ 0, u + v]
[ u - v, 0]
A =
[ 1, 1]
[ 1, -1]
S =
0
0
![THIS IS A LINEAR ALGEBRA PROBLEM IN MATLAB The set M of all matrices of the form [ 0, b; c, 0] where b, c are real numbers, is a subspace of M(2x2), the space o THIS IS A LINEAR ALGEBRA PROBLEM IN MATLAB The set M of all matrices of the form [ 0, b; c, 0] where b, c are real numbers, is a subspace of M(2x2), the space o](/WebImages/24/this-is-a-linear-algebra-problem-in-matlab-the-set-m-of-all-1060685-1761554048-0.webp)
![THIS IS A LINEAR ALGEBRA PROBLEM IN MATLAB The set M of all matrices of the form [ 0, b; c, 0] where b, c are real numbers, is a subspace of M(2x2), the space o THIS IS A LINEAR ALGEBRA PROBLEM IN MATLAB The set M of all matrices of the form [ 0, b; c, 0] where b, c are real numbers, is a subspace of M(2x2), the space o](/WebImages/24/this-is-a-linear-algebra-problem-in-matlab-the-set-m-of-all-1060685-1761554048-1.webp)