<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Python-3.4.3%2FC3%2FAdvanced-Matrix-Operations%2FEnglish-timed</id>
		<title>Python-3.4.3/C3/Advanced-Matrix-Operations/English-timed - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Python-3.4.3%2FC3%2FAdvanced-Matrix-Operations%2FEnglish-timed"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Python-3.4.3/C3/Advanced-Matrix-Operations/English-timed&amp;action=history"/>
		<updated>2026-05-13T11:56:36Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Python-3.4.3/C3/Advanced-Matrix-Operations/English-timed&amp;diff=47734&amp;oldid=prev</id>
		<title>PoojaMoolya: Created page with &quot;{| border=1 |  &lt;center&gt;'''Time '''&lt;/center&gt;  | &lt;center&gt;'''Narration'''&lt;/center&gt;   |-  |  00:01 | Welcome to the spoken tutorial on '''Advanced matrix operations'''.   |-  |  0...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Python-3.4.3/C3/Advanced-Matrix-Operations/English-timed&amp;diff=47734&amp;oldid=prev"/>
				<updated>2019-06-11T05:19:22Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| border=1 |  &amp;lt;center&amp;gt;&amp;#039;&amp;#039;&amp;#039;Time &amp;#039;&amp;#039;&amp;#039;&amp;lt;/center&amp;gt;  | &amp;lt;center&amp;gt;&amp;#039;&amp;#039;&amp;#039;Narration&amp;#039;&amp;#039;&amp;#039;&amp;lt;/center&amp;gt;   |-  |  00:01 | Welcome to the spoken tutorial on &amp;#039;&amp;#039;&amp;#039;Advanced matrix operations&amp;#039;&amp;#039;&amp;#039;.   |-  |  0...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| border=1&lt;br /&gt;
|  &amp;lt;center&amp;gt;'''Time '''&amp;lt;/center&amp;gt; &lt;br /&gt;
| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  00:01&lt;br /&gt;
| Welcome to the spoken tutorial on '''Advanced matrix operations'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  00:07&lt;br /&gt;
| In this tutorial, you will learn to, find''' Frobenius''' and '''infinity norm''' of a '''matrix''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:14&lt;br /&gt;
| Find '''singular value decomposition''' of a '''matrix'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:19&lt;br /&gt;
| To record this tutorial, I am using '''Ubuntu Linux 16.04''' operating system &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:26&lt;br /&gt;
| '''Python 3.4.3 '''and  '''IPython 5.1.0''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:33&lt;br /&gt;
| To practise this tutorial, you should know about &lt;br /&gt;
&lt;br /&gt;
'''Lists, arrays '''and accessing parts of '''arrays '''and performing basic''' matrix operations''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:46&lt;br /&gt;
| If not, see the relevant '''Python''' tutorials on this website. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  00:51&lt;br /&gt;
| First we will see about '''flatten''' function. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 00:55&lt;br /&gt;
| '''flatten() function''' returns a copy of the '''array''', collapsed into one '''dimension'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:01&lt;br /&gt;
| It can be used to convert a '''multidimensional matrix''' into a '''single dimension matrix''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  01:08&lt;br /&gt;
| Let us start '''ipython'''. &lt;br /&gt;
&lt;br /&gt;
Open the '''terminal.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  01:13&lt;br /&gt;
| Type, '''ipython3 '''and press '''Enter'''. &lt;br /&gt;
&lt;br /&gt;
From here onwards, remember to press the '''Enter''' key after typing every '''command''' on the '''terminal'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:25&lt;br /&gt;
| Now let us see how to create '''arrays''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:29&lt;br /&gt;
| Type '''from numpy import asmatrix comma arange''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:35&lt;br /&gt;
| '''a''''' is equal to''''' asmatrix '''''inside brackets''''' arange '''''inside brackets '''''1''''' comma '''''10''''' dot '''''reshape '''''inside brackets '''''3 '''''comma '''''3''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  01:48&lt;br /&gt;
| Then type, '''a''' &lt;br /&gt;
&lt;br /&gt;
Now type, '''a''''' dot '''''flatten''''' open and close brackets'' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 01:57&lt;br /&gt;
| First we imported''' arange function''' from '''numpy module'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 02:02&lt;br /&gt;
| Here, we can see '''3 by 3 matrix''' is converted into one '''dimensional matrix'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  02:08&lt;br /&gt;
| Next we will see about '''frobenius norm.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 02:12&lt;br /&gt;
|It is defined as the '''square root''' of the sum of the '''absolute squares''' of its '''elements'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  02:18&lt;br /&gt;
| Pause the video. &lt;br /&gt;
&lt;br /&gt;
Try this exercise and then resume the video. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 02:24&lt;br /&gt;
| Find out the '''frobenius norm''' of the '''inverse''' of the given '''4 by 4 matrix'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 02:30&lt;br /&gt;
| Switch back to the '''terminal''' for the solution. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  02:34&lt;br /&gt;
| Type &lt;br /&gt;
&lt;br /&gt;
'''m '''''is equal to''''' asmatrix '''''inside brackets''''' arange '''''inside brackets '''''1''''' comma '''''17 '''''dot '''''reshape '''''inside brackets '''''4''''' comma '''''4''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 02:46&lt;br /&gt;
| Here, we have used '''asmatrix, arange''' and '''reshape functions'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 02:52&lt;br /&gt;
|We created a '''matrix''' of size '''4 by 4''' containing '''elements''' from 1 to 16. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 02:59&lt;br /&gt;
| Now type, &lt;br /&gt;
&lt;br /&gt;
'''m '''''inside square brackets '''''0 '''''comma '''''1''''' is equal to''''' 0''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 03:06&lt;br /&gt;
|'''m '''''inside square brackets '''''1''''' comma '''''3 '''''is equal to''''' 0''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 03:12&lt;br /&gt;
| Then type, '''m''' &lt;br /&gt;
&lt;br /&gt;
We changed the value of '''element''' at row 0 column 1 and row 1 column 3 to 0. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  03:23&lt;br /&gt;
| In order to find out the '''Frobenius norm''' of the '''inverse''' of '''matrix m''', type as shown. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 03:33&lt;br /&gt;
| '''norm function''' is available in''' numpy.linalg module.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 03:39&lt;br /&gt;
| Next, we will see about '''infinity norm''' of a '''matrix.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 03:44&lt;br /&gt;
|It is defined as the maximum value of sum of the '''absolute value''' of '''elements''' in each row. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  03:51&lt;br /&gt;
| Pause the video. &lt;br /&gt;
&lt;br /&gt;
Try this exercise and then resume the video. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 03:57&lt;br /&gt;
| Find the '''infinity norm''' of the '''matrix  im.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  04:01&lt;br /&gt;
| Switch back to the '''terminal''' for the solution. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  04:05&lt;br /&gt;
| To find out the '''Infinity norm''' of the '''matrix im''', type as shown. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 04:11&lt;br /&gt;
|Here value for '''ord parameter''' is passed as '''inf''' to calculate '''infinity norm'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  04:18&lt;br /&gt;
| To know more about '''norms''' type '''norm '''''question mark'' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 04:24&lt;br /&gt;
| Press '''q''' to exit. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  04:28&lt;br /&gt;
| Next we will see about '''singular value decomposition.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 04:33&lt;br /&gt;
|In '''linear algebra''', the '''singular value decomposition''' is factorization of '''real''' or '''complex matrix.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  04:42&lt;br /&gt;
| The '''SVD''' of '''matrix m1''' can be found using '''svd function''' available in the '''numpy.linalg module'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 04:52&lt;br /&gt;
|Type as shown. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 04:56&lt;br /&gt;
|'''svd''' returns a '''tuple''' of 3 '''elements'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:00&lt;br /&gt;
| We have unpacked these values into '''variable U, sigma''' and '''V''''' underscore '''''conjugate.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  05:08&lt;br /&gt;
| Type, Capital '''U''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:12&lt;br /&gt;
| Type,''' sigma''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:15&lt;br /&gt;
| Type, Capital '''V''''' underscore '''''conjugate''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:20&lt;br /&gt;
| We can validate the '''singular value decomposition''' by comparing the product of: &lt;br /&gt;
&lt;br /&gt;
'''U, sigma''' and '''V '''''underscore '''''conjugate '''with''' m1''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:30&lt;br /&gt;
|'''sigma''' is a one '''dimensional array''' which contains only the '''diagonal elements''' of the '''matrix'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 05:37&lt;br /&gt;
| Type as shown. &lt;br /&gt;
&lt;br /&gt;
We first convert this '''array''' to a '''matrix'''. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  05:43&lt;br /&gt;
| Type '''smat''' &lt;br /&gt;
&lt;br /&gt;
'''smat''' is a 2 by 3 '''zero matrix''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  05:51&lt;br /&gt;
| Now type, '''smat''''' inside square brackets colon '''''2 '''''comma''''' '''''colon '''''2 '''''is equal to''''' diag '''''inside brackets '''''sigma''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  06:02&lt;br /&gt;
| Then type '''smat''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 06:06&lt;br /&gt;
| This replaces values at row 0 column 0 and row 1 column 1 in '''smat '''with values from '''sigma. ''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 06:16&lt;br /&gt;
| '''smat''' is a '''2 by 3 matrix''' created for multiplications by placing values of sigma as '''diagonal elements''' and zero elsewhere.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  06:27&lt;br /&gt;
| Type as shown. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 06:33&lt;br /&gt;
| It returns '''True'''. &lt;br /&gt;
&lt;br /&gt;
It means '''elements''' in '''m1''' and in product of''' U, sigma '''and''' V''''' underscore '''''conjugate '''are equal. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  06:43&lt;br /&gt;
| This brings us to the end of this tutorial. Let us summarize. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 06:49&lt;br /&gt;
| In this tutorial, we have learnt to,  Calculate the '''norm''' of a '''matrix''' using the '''function norm()''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 06:56&lt;br /&gt;
| Calculate '''SVD''' of a '''matrix''' using the '''function svd()''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  07:01&lt;br /&gt;
| Here is a self assessment question for you to solve &lt;br /&gt;
&lt;br /&gt;
'''norm''''' inside brackets '''''A '''''comma '''''ord''''' is equal to inside single quotes '''''fro''' is  same as '''norm '''''inside brackets '''''A''' &lt;br /&gt;
&lt;br /&gt;
True or False. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| 07:19&lt;br /&gt;
| And the answer is True, since the '''order '''''is equal to inside single quotes '''''fro''' stands for '''Frobenius norm.''' &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  07:29&lt;br /&gt;
| Please post your timed queries in this forum. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  07:33&lt;br /&gt;
| Please post your general queries on Python in this forum. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  07:37&lt;br /&gt;
| FOSSEE team coordinates the TBC project. &lt;br /&gt;
 &lt;br /&gt;
|- &lt;br /&gt;
| 07:41&lt;br /&gt;
| Spoken Tutorial Project is funded by NMEICT, MHRD, Govt. of India. &lt;br /&gt;
&lt;br /&gt;
For more details, visit this website. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  07:50&lt;br /&gt;
| This is Priya from IIT Bombay signing off. &lt;br /&gt;
&lt;br /&gt;
Thanks for watching. &lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>PoojaMoolya</name></author>	</entry>

	</feed>