Monday, March 3, 2014

Take screencast and ogv to Avi conversion in Ubuntu

For recording your screen, where we can demonstrate some videos or some functions, RecordMydesktop is a nice option in Ubuntu. It can be downloaded using Ubuntu Software Center. It is pretty easy to use too.

Here is the link for RecordMyDesktop:

https://apps.ubuntu.com/cat/applications/gtk-recordmydesktop/

However, this tool generates the video in ".ogv" format. If we wish to convert it into a commonly used format such as ".avi", we can use following commad:

$ mencoder input.ogv -ovc lavc -oac mp3lame -o output.avi

Courtesy:

http://www.cyberciti.biz/faq/linux-unix-bsd-appleosx-convert-ogv-to-avi-video-audio/

Saturday, March 1, 2014

Show that A^2 = 0 is possible but A’A = 0 is not possible (unless A= zero matrix).

Found a solution in Stackexchage and quoting it here:

http://math.stackexchange.com/questions/435880/if-aat-is-the-zero-matrix-then-a-is-the-zero-matrix

if we put A=(aij)1i,jn , then At=(bij) , with bij=aji , so by definition:
AAt=(k=1naikbkj)=(k=1naikajk)

If you now look at the main diagonal's general entry of the above, you get
k=1naikaik=k=1na2ik

So if AAt=0 then the above diagonal's entries are zero, but a sum of squared real numbers is zero iff each number is zero, so...

Monday, February 24, 2014

Inverse of permutation matrices are nothing but their transposes.

Permutation matrices are matrices with only one element as 1 in each row/column and rest as zero. A matrix when multiplied with permutation (P) matrices results in row/column exchanges.

PA = A', A' is row-exchanged matrix
AP = A'', A'' is column-exchanged matrix

For example,

P = [ 0 0 1;
         1 0 0;
         0 1 0]

The inverse of P is same as is transpose.

A well-explained proof is given in the following discussion in stack exchange.

http://math.stackexchange.com/questions/98549/the-transpose-of-a-permutation-matrix-is-its-inverse

Quoting the same here:

(PPT)ij=k=1nPikPTkj=k=1nPikPjk
but Pik is usually 0, and so PikPjk is usually 0. The only time Pik is nonzero is when it is 1, but then there are no other ii such that Pik is nonzero (i is the only row with a 1 in column k). In other words,
k=1nPikPjk={10if i=jotherwise
and this is exactly the formula for the entries of the identity matrix, so
PPT=I