%% Rank of Matrix
% Determine whether a matrix is full rank.
%
% Create a 3-by-3 matrix. The values in the third column are twice as large as those in the second column.

A = [3 2 4; -1 1 2; 9 5 10]

%
% Calculate the rank of the matrix. If the matrix is full rank, then the rank is equal to the number of columns, size(A,2).

rank(A)

%

size(A,2)

% Since the columns are linearly dependent, the matrix is rank deficient.
% Copyright 2012 The MathWorks, Inc.