MATLAB Answers

0

find a column vector such that the determinant of a matrix A is non-zero?

Asked by Abdessami Jalled on 17 Sep 2019
Latest activity Commented on by Bruno Luong
on 19 Sep 2019
Let H1 = Span_IR{(1; 0; 0; 0; 0; 0); (0; 1; 0; 0; 0; 0)}
H2 = Span_IR{(0; 0; 1; 0; 0; 0); (0; 0; 0; 1; 0; 0)}
H3 = Span_IR{(0; 0; 0; 0; 1; 0); (0; 0; 0; 0; 0; 1)}
H4 = Span_IR{(1; 0; 1; 0; 1; 0); (0; 1; 0; 1; 0; 1)}
i want to find two vectors (x1,x2,x3,x4,x5,x6) and (y1,y2,y3,y4,y5,y6) such that
H= span{(x1,x2,x3,x4,x5,x6) ,(y1,y2,y3,y4,y5,y6)} and
SpanR(Hi ;Hj ;H ) = R^6. where i,j in {1,2,3,4}.
so we have six matrixs that must not be zero . every matrix is composed by the two vector (x1,x2,x3,x4,x5,x6) and (y1,y2,y3,y4,y5,y6) and 4 vectors among the eight vectors of H1, H2 H3 and H4.
for example
A1 = [1 0 0 0 x1 y1;0 1 0 0 x2 y2;0 0 1 0 x3 y3;0 0 0 1 x4 y4;0 0 0 0 x5 y5;0 0 0 0 x6 y6] then DET(A) must be non zero.
hope this is clear.

  8 Comments

"such that the determinant of any Ai, i=1...6 is different to zero."
This is not an equation but a constraint. What you present is strictly speaking 0 equation (and not 6 equations).
Let me give you a simple example: If I tell you find a scalar x such that
x*3.1415926 different 0.
What is x?
x can be any number different than 0. Do you think this is one equation one unknown and well defined system?
However if I ask x such that
x*3.1415926 = 2.718281828
Now this is an equation, and the answer is
x = 0.865255994045822.
You do not need to know MATLAB to see the difference, this is more about (linear) algebra.
Yes sorry for the misunderstanding.
if we calculate the determinant of Ai, we obtain six expressions in xi and yi. is there any method to find (x1,x2,x3,x4,x5,x6) and (y1,y2,y3,y4,y5,y6) such that DET(A) is non zero?
If it's not clear for you the test in my answer below
eigs(A,1,'smallestabs')
abs(d) >= 1e-12
is the robust numerical test of non-zero det(A) .

Sign in to comment.

1 Answer

Answer by Bruno Luong
on 18 Sep 2019
Edited by Bruno Luong
on 18 Sep 2019
 Accepted Answer

A8 = [1 0 0 0 0 0 1 0;
0 1 0 0 0 0 0 1;
0 0 1 0 0 0 1 0;
0 0 0 1 0 0 0 1 ;
0 0 0 0 1 0 1 0;
0 0 0 0 0 1 0 1]
ij=nchoosek(1:4,2);
binaryflag = true; % put it TRUE if you want X and Y binary, even if it's not stated in the question
% This method is O(1) for binaryflag = false
while true
if binaryflag
H = rand(6,2) > 0.5;
else
H = randn(6,2);
H = H ./ sqrt(sum(H.^2,1));
end
for k=1:size(ij,1)
i=ij(k,1);
j=ij(k,2);
Hi = A8(:,2*i+(-1:0));
Hj = A8(:,2*j+(-1:0));
A = [Hi,Hj,H];
d = eigs(A,1,'smallestabs');
OK = abs(d) >= 1e-12;
if ~OK
% for binaryflag=FALSE, likely never get here !
% fprintf('detect possible singularity\n');
break
end
end
if OK
% for binaryflag=FALSE likely get here the first iteration
break;
end
end
X = H(:,1)
Y = H(:,2)

  0 Comments

Sign in to comment.