# Thread: MATLAB linearly dependant vectors

1. ## MATLAB linearly dependant vectors

hi

Basically I'm new to Matlab and i need to show that the 4 column vectors:

p=[4;3;-1;2;1], q=[-4;7;-9;0;3], r=[2;3;-2;0;1], s=[0;2;-2;3;1]

( ; means that the next number is on a new line..column vector...)

I need to show these are linearly dependant by solving the vector equation:

c1*p+c2*q+c3*r+c4*s=0

Does anyone know the shortest way to solve this using Matlab?

2. c1*p+c2*q+c3*r+c4*s=0

notice that we can write this in the following form:

$
\left[ {\begin{array}{*{20}c}
p & | & q & | & r & | & s \\

\end{array} } \right]\left[ {\begin{array}{*{20}c}
{c_1 } \\
{c_2 } \\
{c_3 } \\
{c_4 } \\

\end{array} } \right] = 0
$

----------------------------------------

$\left[ {\begin{array}{*{20}c}
p & | & q & | & r & | & s \\

\end{array} } \right]$
is a 5x4 matrix who's columns are the vectors p,q,r and s.

so we've basically got a system of homogeneous equations of the following form:

$
\underline{\underline A} \cdot \underline c = \underline 0
$

so showing that the vectors are linearly dependent is equivalent to showing that A does not have a full rank, which can be tested using the fucntion rank: rank(A) < 4