- Sorry the question is meaningles: DET is defined only for square matrix.
- The rank of a (m x n) matrix is mathematically <= min(m,n) == 6 in your case. The kwown block A(:,1:8) is rank 6, meaning there are 6 independent columns in this block. For example A(:,1:6), which is eye(6). Any arbitrary column vector (x, y you want to add) must be a linear combination of this 6 vectors. So you can never increase the rank=6 by adding any column. The question is doubling-meaningless.
find a column vector such that the determinant of a matrix A is non-zero?
2 views (last 30 days)
Show older comments
Abdessami Jalled
on 17 Sep 2019
Commented: 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
Bruno Luong
on 19 Sep 2019
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) .
Accepted Answer
Bruno Luong
on 18 Sep 2019
Edited: Bruno Luong
on 18 Sep 2019
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
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!