YouTube2Text

Linear Algebra for Machine Learning — Transcript

by freeCodeCamp.org · 86,865 words · 12,181 segments · language en · Watch on YouTube

Full transcript

  1. 0:00this in-depth course provides a
  2. 0:02comprehensive exploration of all
  3. 0:03critical linear algebra Concepts
  4. 0:06necessary for machine learning you'll
  5. 0:09learn the mathematical foundations to
  6. 0:11excel in AI tdiv from lunar Tech
  7. 0:15developed this course she has created
  8. 0:18many popular machine learning courses
  9. 0:20machine learning is at the Forefront of
  10. 0:22the Innovation powering the most
  11. 0:24advanced and transformative systems for
  12. 0:27the companies like apple Tesla Netflix
  13. 0:30Amazon open Ai and many others it
  14. 0:33enables the creation of the intelligent
  15. 0:35systems that can predict Trends
  16. 0:38personalized user experience and
  17. 0:40automate complex tasks to develop these
  18. 0:44practical applications a deep
  19. 0:46understanding of the underlying
  20. 0:47mechanics is important this requires a
  21. 0:50solid grasp of mathematics behind the
  22. 0:53machine learning so all these technical
  23. 0:55details with a particular focus on
  24. 0:58linear algebra
  25. 1:00this all-encompassing course explores
  26. 1:03the linear algebra in an interactive and
  27. 1:06machine learning Focus manner welcome to
  28. 1:08the linear algebra for machine learning
  29. 1:10course you will acquire the critical
  30. 1:13principles needed to build optimize and
  31. 1:16analyze sophisticated machine learning
  32. 1:18models from designing customer
  33. 1:20algorithms to enhancing curent
  34. 1:23Technologies this course provides the
  35. 1:25mathematical foundations with vital
  36. 1:28interest for the those for pioneering
  37. 1:31advancements in machine learning for
  38. 1:33those dedicated to mastering the
  39. 1:35mathematical aspect and the technical
  40. 1:37details behind machine learning our
  41. 1:40extensive 26 plus hour course of
  42. 1:43fundamentals of machine learning within
  43. 1:45the mathematics boot camp as well as a
  44. 1:47separate course offers an in-depth
  45. 1:50exploration this extensive program
  46. 1:53includes certification and is tailored
  47. 1:55for individuals that are serious about
  48. 1:58advancing their career in the field of
  49. 2:00machine learning Andi engineering this
  50. 2:03crash course in mathematics will serve
  51. 2:06you as a great starting point by
  52. 2:08establishing a robust foundation in
  53. 2:11linear algebra you will be well prepared
  54. 2:13to excel as machine learning
  55. 2:15practitioner equipped with the
  56. 2:17mathematical knowledge that drives the
  57. 2:20Innovation and efficiency in this field
  58. 2:23so if you're ready I'm really excited
  59. 2:26and without further Ado let's get
  60. 2:28started welcome to the course on the
  61. 2:31fundamentals of linear algebra presented
  62. 2:34by Lun Tech Academy my name is D Vasan
  63. 2:38and today we are going to start with
  64. 2:39some basic concepts that are important
  65. 2:42for understanding linear algebra linear
  66. 2:45algebra is one of the most applicable
  67. 2:46areas of mathematics it is used by pure
  68. 2:49mathematicians that you will see in a
  69. 2:52universities doing research publishing
  70. 2:54research papers but also by the
  71. 2:56mathematically trained scientists of all
  72. 2:58disciplines this is really one of those
  73. 3:01areas in mathematics that you will see
  74. 3:03time and time again appearing in your
  75. 3:06professional life if you want to become
  76. 3:09a job ready data scientist or you want
  77. 3:11to do some handson machine learning deep
  78. 3:15learning and AI stuff but also linear
  79. 3:17algebra is used in cryptology it is used
  80. 3:20in cyber security and in many other
  81. 3:22areas of computer science and artificial
  82. 3:25intelligence so if you want to become
  83. 3:28this well-rounded professional you want
  84. 3:30to go beyond using libraries and you
  85. 3:33want to truly understand the uh
  86. 3:36mathematics and the technical side of
  87. 3:38these different machine learning
  88. 3:39algorithms from very basic ones like
  89. 3:41linear regression to most complex ones
  90. 3:44coming from Deep learning like
  91. 3:45architectures in neural network how the
  92. 3:47optimization algorithms work how the
  93. 3:50gradient descent works and all these
  94. 3:52other different methods and models then
  95. 3:54you are in the right place because you
  96. 3:56must know linear algebra such that you
  97. 3:59will understand these different concepts
  98. 4:01from very basic ones to most advanced
  99. 4:04ones in data science machine learning
  100. 4:07deep learning artificial intelligence
  101. 4:09data analytics but also in many other
  102. 4:13applied science
  103. 4:14disciplines so before starting this
  104. 4:17comprehensive course that will give you
  105. 4:19everything that you need to know about
  106. 4:21linear algebra first I'm going to tell
  107. 4:23you what we assume that you already know
  108. 4:26because linear algebra it comes from
  109. 4:28about third PA of Bachelors of different
  110. 4:31highly technical studies and here we are
  111. 4:35assuming that you already know certain
  112. 4:38Concepts so to ensure that this course
  113. 4:41stays really on the topic of linear
  114. 4:43algebra and that you understand all
  115. 4:46these Concepts really well for that we
  116. 4:49need to be able to know different topics
  117. 4:53so before we dive into this Concepts
  118. 4:55let's familiarize ourselves with the
  119. 4:57basic prerequisites and notation used
  120. 5:00throughout this course and you will
  121. 5:02really need to know this in order to
  122. 5:05understand these Concepts really well
  123. 5:06such that instead of memorizing you'll
  124. 5:09actually just hear me once or maybe
  125. 5:11twice and then every time you hear later
  126. 5:14on or you see it in the papers or in
  127. 5:16some algorithms you will recognize this
  128. 5:18is something that we already
  129. 5:20learned so some key prerequisites
  130. 5:23overview is here first of all to fully
  131. 5:26grasp the upcoming material you should
  132. 5:28be familiar with some basic concept like
  133. 5:30real numbers Vector spaces so you don't
  134. 5:33need to know this idea of vectors though
  135. 5:36you already most likely are familiar
  136. 5:39with this given that you know how to
  137. 5:41plot different lines you know the idea
  138. 5:44of exes and wise and how to plot these
  139. 5:47different graphs but here we are going
  140. 5:50to touch base on this every time when we
  141. 5:52come close to these Concepts I will
  142. 5:53refresh you your memory and we will go
  143. 5:56through this numbers the idea of norms
  144. 5:59and distance measures because when it
  145. 6:01comes to the vectors when it comes to
  146. 6:03the magnitude and all these different
  147. 6:05topics that we are going to discuss as
  148. 6:07part of linear algebra knowing the what
  149. 6:10Norm is and what is the definition of
  150. 6:13distance what is the length between two
  151. 6:16points when we plot it into
  152. 6:18two-dimensional space or
  153. 6:19three-dimensional space those are all
  154. 6:22very basic concept that usually use as
  155. 6:24part of a basic pre-algebra or just
  156. 6:27common algebra courses and lessons in
  157. 6:30order to truly understand what the new
  158. 6:33algebra is about to understand the
  159. 6:35direction of vectors the angle and then
  160. 6:38the dimensionality reduction how linear
  161. 6:41algebra is applied for instance in
  162. 6:42different algorithms in machine learning
  163. 6:44deep learning data science statistics
  164. 6:47you really need to understand this
  165. 6:48Cartesian coordinate system so this is
  166. 6:51not only important for linear algebra
  167. 6:54but I assume you already know it given
  168. 6:56that you have passed those other courses
  169. 6:58like calcul or usually they are covered
  170. 7:01as part of pre-algebra or algebra so the
  171. 7:04cartisian coordinate system I mean here
  172. 7:07understanding what is for instance the
  173. 7:09the common description of them for
  174. 7:11instance when you when we write like X
  175. 7:14and then y on the vertical axis and then
  176. 7:16we can we have here zero and then we can
  177. 7:20always plot this different plots you
  178. 7:22know we have a clear understanding what
  179. 7:24is this Y is equal to X line we
  180. 7:27understand how by knowing certain points
  181. 7:29we can plot different plots for instance
  182. 7:32that this is the Y is equal to X line
  183. 7:34that here it means that if we have here
  184. 7:37one then this is just one two this is
  185. 7:39two so we understand when we have the
  186. 7:42function of the line and we have a
  187. 7:44certain value at is our y coordinate or
  188. 7:47x coordinate then the corresponding
  189. 7:49coordinate can be found then you also
  190. 7:52need to know some basic things that I
  191. 7:55just didn't mention right now so for
  192. 7:57instance that the numbers here can be
  193. 7:59like 1 2 three up to Infinity so you
  194. 8:02understand this concepts of infinity and
  195. 8:04then here the same story then here we
  196. 8:07have minus one you know minus two uh and
  197. 8:11then this is then used later on and we
  198. 8:15will be pouch basing this one we will be
  199. 8:18describing our vectors and how we can
  200. 8:21visualize our vectors either two
  201. 8:23dimensional space like we have here
  202. 8:25because this is two dimensional so we
  203. 8:26have X and Y but we can also of course
  204. 8:29visualize it in three-dimensional
  205. 8:32Etc so this idea of basic coordinate
  206. 8:35system is really important usually
  207. 8:37covered as part of algebra if not
  208. 8:40pre-algebra then we have basic triog
  209. 8:43genetry which means that you need to
  210. 8:45have a clear understanding what sinus is
  211. 8:47what cosine is what tangent is and their
  212. 8:49reciprocals and here I mean that you
  213. 8:52know for instance what is cosine
  214. 8:54function what is s function you know
  215. 8:57that you have an understanding
  216. 9:00for instance that what is this line you
  217. 9:02know whether it's a sinus line or cosine
  218. 9:05line you have also an understanding what
  219. 9:08this Pi is one thing that I didn't
  220. 9:11mention but it it just goes around all
  221. 9:13these topics some basic things that you
  222. 9:16understand what is X what is y why we
  223. 9:19use them and this idea of
  224. 9:22variables and also you need to
  225. 9:25understand this idea of square or you
  226. 9:28know 90
  227. 9:30degree angle and then Pythagoras Theorem
  228. 9:33here we have the same so what is this
  229. 9:35relationship between different sides of
  230. 9:37a triangle that is a very unique
  231. 9:40triangle and that has one of the angles
  232. 9:43as 90° and this idea of you know the
  233. 9:48sides how this relates to the sinus
  234. 9:50cosinus tangent cotangent and also how
  235. 9:53the Pythagorean Pythagorean theorem
  236. 9:55applies when we have triangular but it
  237. 9:59is is no longer with angle that is 90°
  238. 10:02what is the sum of all the angles of
  239. 10:05triangle so those are basic stuff that
  240. 10:07are com commonly covered as part of
  241. 10:10trigonometric lessons or part of General
  242. 10:15geometry then another prerequisite is
  243. 10:18this understanding of identities and
  244. 10:21equations in triog genometric lessons
  245. 10:24something part of which I already
  246. 10:25covered and this is goes around of basic
  247. 10:29having a basic un uh understanding of
  248. 10:31algebra and geometry those are super
  249. 10:33important to understand more Advanced
  250. 10:35Techniques from linear algebra then we
  251. 10:38have finally this idea of orthogonality
  252. 10:40perpendicularity in vectors so this also
  253. 10:43comes from geometry and from a
  254. 10:46trigonometric lessons so you understand
  255. 10:49that if we have for instance the two
  256. 10:51lines that don't have any intersections
  257. 10:53then we are talking about two orthogonal
  258. 10:56lines and otherwise for instance if we
  259. 10:58have and the two lines like this then we
  260. 11:01are talking about perpendicular vectors
  261. 11:05when you have two lines that are
  262. 11:06actually parallel so they don't have any
  263. 11:09intersection and you won't find any
  264. 11:11point that is common for the two so when
  265. 11:14it comes to this R so as part of real
  266. 11:17numbers and Vector spaces R represents
  267. 11:20the set of all real numbers so you can
  268. 11:22be dealing with for instance an integers
  269. 11:25like 1 2 three this can Al this will
  270. 11:27also cover all the negative numbers like
  271. 11:29-1 - 2 - 3 but also the floting numbers
  272. 11:34like 1. 223 and all the other numbers
  273. 11:39that you can think of those are the set
  274. 11:41of all real
  275. 11:43numbers so this is in one dimensional
  276. 11:45space right so you can see that I'm
  277. 11:47writing just one number you know two
  278. 11:50three and other numeric numbers then we
  279. 11:53have the idea of R2 R3 up to RN where
  280. 11:57now all these numbers they represent
  281. 11:59represent in this case the N it
  282. 12:01represents the N dimensional aidian
  283. 12:04space so when it comes to this idea of n
  284. 12:08dimensional numbers so for instance
  285. 12:12R2 here we just mean 2D plane so I'm
  286. 12:16pretty sure you are familiar with this
  287. 12:17idea of for instance
  288. 12:19xais and Y AIS here we are dealing with
  289. 12:23two dimensional plane so for every point
  290. 12:27that we can find here we can describe
  291. 12:29them by assigning them a value X so
  292. 12:32coordinate X and a coordinate y that's
  293. 12:36exactly what we mean by saying that the
  294. 12:39number can be represented in a 2d plane
  295. 12:42so here we are dealing with this two
  296. 12:44dimensional space this is our two
  297. 12:47dimensional Elan space and every number
  298. 12:50in
  299. 12:51here that is part of this R2 can be
  300. 12:55pictured here can be represented in this
  301. 12:57visualization so for instance if I have
  302. 13:00this number and let's assume that the
  303. 13:02value on the x-axis is two and we can
  304. 13:07see here that the corresponding Y is
  305. 13:08zero I can describe this number which I
  306. 13:11will call a I can describe this by
  307. 13:13writing down first the x coordinate
  308. 13:16which is two and then the y-coordinate
  309. 13:18which is zero so I'm then saying that a
  310. 13:21which is a point with x coordinate 2 and
  311. 13:24y coordinate Z it is part of my R2
  312. 13:29and it's part of my two dimensional
  313. 13:31alian space when it comes to R3 similar
  314. 13:35thing we can do with that only in that
  315. 13:36case we need not just x axis and y AIS
  316. 13:40but we need to add our third
  317. 13:42dimension so here for instance when it
  318. 13:45comes to the r
  319. 13:48Tre then we need to do y AIS we need to
  320. 13:53have xaxis but also we need to have some
  321. 13:57Z axis so
  322. 13:59such that every time every point in the
  323. 14:03space we can then describe by x y and
  324. 14:08Zed
  325. 14:09coordinates so if we write it in terms
  326. 14:12of the vector something that we will see
  327. 14:14very soon as part of our first unit of
  328. 14:17this course we will then need to
  329. 14:19represent every number in this
  330. 14:21three-dimensional Alan Space by writing
  331. 14:23down first the x coordinate let's say
  332. 14:25one and then y coordinate let's say
  333. 14:28another one and then Z coordinate which
  334. 14:30is one or even better even easier let's
  335. 14:33use 0 0 0 which means that we are
  336. 14:36dealing with this initial number which
  337. 14:38is the center of this three-dimensional
  338. 14:40Alan space when it comes to the N
  339. 14:44dimensional or the higher dimensional
  340. 14:46spaces it's much harder to visualize
  341. 14:49therefore usually when it comes to
  342. 14:52visualizations we do usually we usually
  343. 14:54only visualize the onedimensional two
  344. 14:57dimensional and thre dimensional spaces
  345. 14:59above then it just no longer does make
  346. 15:01sense to visualize it but we definitely
  347. 15:04deal with them and they are part of
  348. 15:07Applied linear
  349. 15:10algebra so understanding this spaces is
  350. 15:13very important for analyzing vectors for
  351. 15:16their interactions and this holds not
  352. 15:19just for this two-dimensional and
  353. 15:20three-dimensional but really for
  354. 15:23multidimensional
  355. 15:27spaces let's now quickly Define this
  356. 15:29idea of Norm so the norm of a vector
  357. 15:32denoted by this V which you can see kind
  358. 15:35of like similar to the absolute value
  359. 15:38from
  360. 15:39pre-algebra you can see here that we
  361. 15:41have this double straight lines like
  362. 15:44from absolute value then we have the
  363. 15:47name of the vector or the variable name
  364. 15:49that we are assigning to our vector and
  365. 15:52then you might notice here on the top of
  366. 15:54this this Arrow this basically says that
  367. 15:58we are deing not with just a variable
  368. 16:01but really we are dealing with a vector
  369. 16:04this is really important because you can
  370. 16:05see that there makes a huge difference
  371. 16:08if we have for instance just V or V1 I
  372. 16:11have to say or just V those are really
  373. 16:14important and things that you need to
  374. 16:16keep in mind when it comes to Leading
  375. 16:18your algebra and trying to differentiate
  376. 16:20vectors from a
  377. 16:22point you will notice that when it comes
  378. 16:24to Norm we can represented it either by
  379. 16:29this notation or this usually it's a
  380. 16:32common notation in machine learning or
  381. 16:34in data science with this two bars and
  382. 16:38when we do this we automatically also
  383. 16:41know that we are dealing with aladine
  384. 16:43distance we call it also L2 norm and
  385. 16:47this is something very common and
  386. 16:49usually used as part of
  387. 16:52retrogression which is an application of
  388. 16:55linear algebra and it's used in
  389. 16:57regularization so we are regularizing
  390. 17:00our machine learning algorithms so when
  391. 17:02you get into machine learning you will
  392. 17:04see time and time again this notation so
  393. 17:07next time when you see this then you
  394. 17:08know automatically that you are dealing
  395. 17:10with L2 norm and L2 Norm which is also
  396. 17:13used a lot in machine learning it is
  397. 17:16referring to the usage of L2 Norm to uh
  398. 17:20in the retrogression and retrogression
  399. 17:23or L2 regularization is a very popular
  400. 17:27regularization techniques as part of
  401. 17:29machine learning so right now even you
  402. 17:32can see this intersection or linear
  403. 17:34algebra or this idea of norms in machine
  404. 17:39learning all right so now let's see why
  405. 17:42we call it actually L2 Norm or often
  406. 17:46referred as Eline distance so Eline
  407. 17:50distance you can see here which is also
  408. 17:52the in this case this V which describes
  409. 17:56the norm of the vector v is equ Al to
  410. 17:59square roof and then we have all these
  411. 18:01coordinates assuming that the vector
  412. 18:03comes from an N dimensional space so you
  413. 18:05can see here the RN the V Vector the
  414. 18:09idian distance or the norm of this
  415. 18:12vector v is equal to square roof and
  416. 18:14then V1 2 plus vs2 S Plus and all this
  417. 18:18in between numbers plus VN squ so here
  418. 18:22basically it means take square root of
  419. 18:25V1 2 V2 S Plus plus V3 2 blah blah blah
  420. 18:31plus VN s so basically take all the
  421. 18:36units that form this vector and then so
  422. 18:39are on this vector and use them Square
  423. 18:43them and then add them and then take the
  424. 18:45square root of that that's the distance
  425. 18:48or I have to say the norm of this Vector
  426. 18:52so why this is important this idea of
  427. 18:54norms and equity in distance beside of
  428. 18:56being used in machine learning and why
  429. 18:58is it used
  430. 18:59so Norms they provide a way to measure
  431. 19:01the size or the length of a vector in
  432. 19:03Vector spaces which means that when we
  433. 19:06want to measure a distance a similarity
  434. 19:10relationship between for instance
  435. 19:12vectors then it becomes much easier to
  436. 19:15use this idea an Elan distance is not
  437. 19:18only used in regularization techniques
  438. 19:21like L2 regularization or retrogression
  439. 19:24but it's also used in other machine
  440. 19:27learning or deep learning Al items as a
  441. 19:29way to measure the distance or the
  442. 19:31relationship or the similarity between
  443. 19:34two different entities those can be
  444. 19:36variables those can be two people that
  445. 19:38we want to compare in our algorithm or
  446. 19:41two entities um for instance the Norms
  447. 19:45or the Al and distance they are also
  448. 19:47used as part of K me algorithm something
  449. 19:50that you might have heard and if you
  450. 19:51follow later on the machine learning and
  451. 19:53the clustering section of machine
  452. 19:55learning you will see that Alan distance
  453. 19:57is used as part of C's algorithm that
  454. 20:00aims to Cluster observations into
  455. 20:02different groups so this also yet
  456. 20:04another highly applicable uh topic that
  457. 20:07you must know in order to understand
  458. 20:09different linear algebra top topics but
  459. 20:12also machine learning topics let's now
  460. 20:14talk about simple topic that we must
  461. 20:16know about and refresh our memory very
  462. 20:18quickly before moving forward to our
  463. 20:21next topic that is a prerequisite for
  464. 20:23this course so the cartisian coordinate
  465. 20:26system is just a fancy word of
  466. 20:28describing this idea of X and Y or XY Z
  467. 20:32when we just want to visualize them and
  468. 20:35showcase this numbers related to the
  469. 20:38space so we just learned the and I just
  470. 20:42quickly was talking about this idea of X
  471. 20:44and and Y and how we can visualize that
  472. 20:47in plain so the cial coordinate system
  473. 20:49is a framework for specifying points in
  474. 20:52a plane or a space using ordered list of
  475. 20:55numbers so we know for instance when we
  476. 20:58plot this then here we need to put X and
  477. 21:02Y in our two dimensional space R2 and we
  478. 21:06know that here in the middle we have
  479. 21:08zero and here we have 1 2 three four and
  480. 21:12the same here one two and then three
  481. 21:15four which means that everyone that is
  482. 21:18in the industry whether it's in
  483. 21:20mathematics in physics in data science
  484. 21:22or ml or AI we all universally agree on
  485. 21:27this system we know this is this ordered
  486. 21:30list of numbers and we know that if we
  487. 21:32have for instance a point here then for
  488. 21:35this point we know that the xaxis and Y
  489. 21:38AIS is definitely positive even if we
  490. 21:40know don't know the corresponding
  491. 21:42numbers and then once we have more
  492. 21:44General lines here so not General but
  493. 21:47specific lines then we even know the
  494. 21:50exact coordinates and values here and we
  495. 21:52definitely know that this number should
  496. 21:54be so the x coordinate should be between
  497. 21:56two and three so first we have the two
  498. 21:59and then tree and not the other way
  499. 22:00around so this ordered nature helps us
  500. 22:03to understand how we can put all these
  501. 22:06different numbers and organize them in
  502. 22:08our two dimensional space and we also
  503. 22:10know the corresponding y so we know that
  504. 22:13for instance our Y is not minus three
  505. 22:16because it's lying in here in this part
  506. 22:19of our coordinate system and not
  507. 22:20somewhere here where the y axis are
  508. 22:24negative and why do we know that because
  509. 22:27it's an ordered list of numbers that we
  510. 22:29can visualize in this 2D plane and here
  511. 22:33you also need to keep in mind and we
  512. 22:35need to remind ourselves about this idea
  513. 22:38of these four different parts that we
  514. 22:40got so we have our here the first part
  515. 22:42the second part the third part and then
  516. 22:45the four you know part of our coordinate
  517. 22:48system and here we we are dealing with a
  518. 22:51two dimensional plane but if we were to
  519. 22:54deal with the three-dimensional plane we
  520. 22:57no longer have just x-axis and y axis
  521. 23:00where X AIS were on the horizontal and
  522. 23:03y- axis on the vertical but we have our
  523. 23:05third line which is the Z so we have now
  524. 23:10three different dimensions so X Y and Z
  525. 23:15and we are basically extending our
  526. 23:17two-dimensional plane to
  527. 23:19three-dimensional so this system is
  528. 23:21fundamental for visualizing and working
  529. 23:24with vectors geometrically so then we
  530. 23:26can just use this two dimension
  531. 23:29uh plane in order to visualize this
  532. 23:32Vector for instance knowing what are all
  533. 23:34these points that appear on this Vector
  534. 23:37what is its direction where is it headed
  535. 23:40you know what is the beginning and then
  536. 23:43we can also find out all the so the
  537. 23:46relationship of these vectors with all
  538. 23:48the other vectors for instance if we
  539. 23:49have an other Vector here then we can
  540. 23:52use the coordinates of them and
  541. 23:54information about vectors to understand
  542. 23:56that we are dealing with two parallel
  543. 23:58vectors that don't have anything in
  544. 24:00common so no intersection points where
  545. 24:02to say if we have another Vector like
  546. 24:04this and we know that here we are
  547. 24:06dealing with perpendicular you know
  548. 24:09orthogonal
  549. 24:11vectors so this is why those this
  550. 24:13coordinates Cartesian coordinate system
  551. 24:15is important and it's not just important
  552. 24:17for linear algebra but just in general
  553. 24:20for mathematics and for data science and
  554. 24:22for AI and you will see this coordinate
  555. 24:25system time and time again in different
  556. 24:26visualizations even when you want to
  557. 24:28visualize the mean of your data or you
  558. 24:31want to visualize the probability
  559. 24:33distribution function describing your
  560. 24:35population from statistics or from data
  561. 24:38science you want to visualize for
  562. 24:41instance how your optimization is
  563. 24:43working or you want to visualize how
  564. 24:45your model is performing in terms of its
  565. 24:48evaluation Matrix for all these cases
  566. 24:51and for any visualizations this idea of
  567. 24:54the Cartesian coordinate system is going
  568. 24:56to become very handy let's now talk
  569. 24:58about this idea of angles and the idea
  570. 25:00of circles radian the pi as well as this
  571. 25:05degree sign so this comes usually from
  572. 25:09geometry or
  573. 25:10tonometry and this is very important
  574. 25:13when it comes to the vectors because
  575. 25:14when we have two different
  576. 25:17vectors then we want to understand their
  577. 25:20relationship do they form this less than
  578. 25:2390° or so are we dealing with sharp
  579. 25:26corner sharp angle or with we are
  580. 25:28dealing with 90° angle so we are dealing
  581. 25:31with this type of vectors where we have
  582. 25:34you know 90° or we are dealing with um
  583. 25:39this type of vectors when the angle is
  584. 25:43180° which is by the way uh something
  585. 25:47that we are referring as
  586. 25:49Pi and here is one thing that is
  587. 25:52important here is that it's not just Pi
  588. 25:54but it's Pi
  589. 25:56radians why because in mathematics we
  590. 25:59also have this idea of Pi which is
  591. 26:01usually a number that is 3.14 so we
  592. 26:04should not confuse this Pi with pi
  593. 26:06radians so the relationship between the
  594. 26:08two is something that we have also seen
  595. 26:10as part of our pre-algebra and algebra
  596. 26:12courses so if it's something that you
  597. 26:14want to just refresh your memory on this
  598. 26:16will be super helpful to check our very
  599. 26:19initial course on um all these Basics so
  600. 26:22pre-algebra so this number comes from
  601. 26:24per algebra and then this idea of P
  602. 26:26radians and just in general all this
  603. 26:28information about what is 180° what is
  604. 26:31this angle what is 360° and all the
  605. 26:34information that comes from triogen
  606. 26:36metry and geometry can be found in our
  607. 26:39corresponding course so the next topic
  608. 26:41is the unit circle unit circle is highly
  609. 26:45related to this idea of radians degrees
  610. 26:47cosine sign but also understanding the
  611. 26:50Cartesian coordinate system will help
  612. 26:52you to understand the unit circle so
  613. 26:54this also comes from theog gometry and
  614. 26:57geometry and it's basically a fancy way
  615. 27:00of saying we have x-axis we have y AIS
  616. 27:03we have here zero so our common
  617. 27:06Cartesian coordinate system only we are
  618. 27:09trying to focus on this part of the
  619. 27:12system where we have here one we have
  620. 27:13here one so on the x-axis we have one
  621. 27:16and then here minus one here minus one
  622. 27:18for y AIS and here y the Y is equal to 1
  623. 27:22so we have here all these points and
  624. 27:24then we have the circle with the radius
  625. 27:26of one so here is this you know this is
  626. 27:29the radius and here we plot this circle
  627. 27:33and this will help us to understand this
  628. 27:36concepts of sinus cosinus you know the
  629. 27:38Theta is just variable that we use to
  630. 27:41describe the angle and for instance here
  631. 27:44we are dealing with
  632. 27:4545° this angle is
  633. 27:4890° this entire thing is
  634. 27:51360° and half of it so this part only is
  635. 27:56180° so those are all important part of
  636. 28:01understanding this idea of unit circle
  637. 28:03so you might have already guessed that
  638. 28:06unit circle refers to this idea that we
  639. 28:08have here one unit here one unit one
  640. 28:10unit one unit forming this entire circle
  641. 28:12so with the radius that is equal to
  642. 28:15one all right so this is something that
  643. 28:18is very easy and this comes from the
  644. 28:21geometry and pre and triog
  645. 28:23gometry uh you also need to understand
  646. 28:26this concept of the sinus and and
  647. 28:28cosinus and how sinus and cosinus are
  648. 28:30related to this what do we refer by the
  649. 28:34sinus and cosine you know what is this
  650. 28:37what are these points so 1 Z for
  651. 28:39instance we understand that here the x
  652. 28:42is equal to one and Y is equal to zero
  653. 28:45so here this point is simply 1 Z so this
  654. 28:50point and then we have 2 p radians so
  655. 28:54what is this idea of P so we know that a
  656. 28:57p Radian
  657. 28:58so P radians is simply the 180° which
  658. 29:03means that you also need to understand
  659. 29:05this concept of P2 which is simply the
  660. 29:0890° so you can see here one thing that I
  661. 29:11forgot to mention you need to understand
  662. 29:12this concept the relationship between
  663. 29:14the pi and so Pi radians and radians and
  664. 29:18this unit circle you need to know that
  665. 29:20here the pi ided two is simply this
  666. 29:24angle and then the entire Pi is this
  667. 29:27angle
  668. 29:28and then this entire thing the entire
  669. 29:31angle with
  670. 29:35360° is equal to 2 pi so 2 pi radians is
  671. 29:39simply this entire thing so those are
  672. 29:42very easy Concepts that come from
  673. 29:44geometry and trometry and if you want to
  674. 29:47refresh them then head towards those
  675. 29:49sores because this will help you to
  676. 29:52understand all this concept from scratch
  677. 29:55let's now continue our refreshment when
  678. 29:57it comes to so genometric identities and
  679. 30:00we just spoke about this unit circle we
  680. 30:02talked about the sinus cosinus it's
  681. 30:05really important to relate this back to
  682. 30:07bit more advanced topics coming from the
  683. 30:10same do domain and from the same area of
  684. 30:14mathematics and here we we need to know
  685. 30:17this concept before learning linear
  686. 30:19algebra few other things that um would
  687. 30:22be really great if you know but it's
  688. 30:24actually not a must to understand all
  689. 30:26these different topics it is the idea of
  690. 30:29Pythagorean identity so don't confuse
  691. 30:31this with Pythagoras Theorem this is the
  692. 30:34Pagan identity so this one that the
  693. 30:37square of the S of an angle plus the
  694. 30:39cosine squared is equal to one and all
  695. 30:42these different rules that go around the
  696. 30:44S and cosine and also the what is for
  697. 30:47instance the S 2 Theta which is equal to
  698. 30:502 s of theta and cosine of theta you
  699. 30:54know those are all different rules that
  700. 30:57would be handed to know and if you are
  701. 30:59so far I assume that you also know
  702. 31:02geometry and fundamentals to triogen
  703. 31:05ometry which means that you also know
  704. 31:07these trues but this might be just a
  705. 31:09great time to go ahead and quickly
  706. 31:11refresh your memory on these Concepts
  707. 31:13because those might become handy in your
  708. 31:17applied linear algebra and Applied
  709. 31:19Mathematics Journey but for now I would
  710. 31:21say this is not one of the most
  711. 31:24important things to know to learn this
  712. 31:26and to go through this course
  713. 31:28but just something to keep in mind so
  714. 31:31when it comes to the triog genometric
  715. 31:33equations uh this can become very handy
  716. 31:36later on when we want to prove something
  717. 31:38in linear algebra so to follow along
  718. 31:41it's actually a good idea to know for
  719. 31:43instance what is how you can solve this
  720. 31:45different equations and this will go
  721. 31:48back and refer to the unit circle that
  722. 31:50we just saw for instance if the sinus
  723. 31:53Theta is equal to 1 / 2 then you will
  724. 31:56need to quickly remember what is that
  725. 31:58angle for which the sinus is equal to 1
  726. 32:01/ 2 then you realize that is actually
  727. 32:05the angle where you take the p and
  728. 32:08remember that Pi is equal to
  729. 32:11180° and that is the one corresponding
  730. 32:14to and then Pi / to 6 is simply 180 / to
  731. 32:196 so this is basically the 30 degree so
  732. 32:23those are things that you can do when
  733. 32:25you know for instance all these
  734. 32:27different sinus and cosinus so you have
  735. 32:29memorized for these different angles so
  736. 32:32what is the sinus and cosinus for 30°
  737. 32:34for
  738. 32:3560° um let me actually remove this to
  739. 32:39make it easier so this type of problems
  740. 32:42is very easy to solve when we keep in
  741. 32:44mind and we memorize what are these
  742. 32:47different values for sinus and cosinus
  743. 32:49when it comes to different angles for
  744. 32:52instance for the angle equal to zero let
  745. 32:55me actually remove this and clean this
  746. 32:59part for better understanding so if we
  747. 33:01have for instance 0 degrees then we know
  748. 33:04that the sinus for this is zero and the
  749. 33:06cosine of this is one so we are
  750. 33:09basically dealing so if I plot a unit
  751. 33:14circle we are dealing with this number
  752. 33:17so remember that sinus and cosinus those
  753. 33:21refer to the Y and X on our unit circle
  754. 33:26so keep this one in mind
  755. 33:28so if the cosine Theta is then equal to
  756. 33:311 and the sinus so Y is equal to Z we
  757. 33:33are dealing automatically this number
  758. 33:35with this number and you can see that
  759. 33:37here the angle is also zero so here we
  760. 33:40are dealing with one and zero coordinate
  761. 33:44so this is
  762. 33:45our
  763. 33:48cosine of zero angle and this is then
  764. 33:52our sinus of zero angle so we
  765. 33:55automatically even from this graph can
  766. 33:57see very easy easily that the S of 0° is
  767. 34:00equal to 0 and the cosine is equal to 1
  768. 34:04all right so let's quickly also refresh
  769. 34:07our memory on few other degrees so for
  770. 34:11the
  771. 34:1230° which is simply the Pi / to 6 so
  772. 34:17this is
  773. 34:1930° then the sinus or the Y AIS is equal
  774. 34:23to 1 / 2 and the cosine or the X x value
  775. 34:28x coordinate is equal to square root of
  776. 34:303 2 so we are dealing with this this
  777. 34:33corner or angle so
  778. 34:3630° so even from here you can see that
  779. 34:39the coordinates make sense make sense
  780. 34:41then we have the pi for another famous
  781. 34:44value which is corresponding to the 45°
  782. 34:47it's simply this angle and for this
  783. 34:50angle the X AIS which is the coine so
  784. 34:54this number is equal to 1 / to 2
  785. 34:58and then for the sinus the so the y
  786. 35:01coordinate is equal to 1 / 2 square root
  787. 35:05of 2 as you might have guessed because
  788. 35:07in this number the x-axis and y axis is
  789. 35:09equal to is the same so you can see that
  790. 35:12this distance and this distance is the
  791. 35:14same because we are dealing with this
  792. 35:17type of figure so here we have 45° here
  793. 35:21we have 45° so this values are the same
  794. 35:24and this is something that you would
  795. 35:25know knowing the pag Ian Pagan
  796. 35:29theorem so then you can go ahead and
  797. 35:32refresh your memory for the
  798. 35:3460° so here I'm referring to the Pi / to
  799. 35:39three and then the 90° which is the very
  800. 35:43easy case this one obviously the x-axis
  801. 35:45is equal to zero so here you should have
  802. 35:47zero and the y axis is equal to one so
  803. 35:50here you should have one and so
  804. 35:53on all right so we went into quite
  805. 35:55detailed here but I think this is a very
  806. 35:57important topic knowing this idea of a
  807. 36:01trigonometric equations identities this
  808. 36:03idea of unit circle are super important
  809. 36:06because they are highly applicable to
  810. 36:09different fields in artificial
  811. 36:10intelligence data science machine
  812. 36:12learning and will definitely set you
  813. 36:15apart all right let's now talk about the
  814. 36:18law of signs and cosiness those are
  815. 36:20things that I won't be going on into too
  816. 36:23much details I just wanted to quickly
  817. 36:24showcase to you if you want to get the
  818. 36:27proof of those definitely check out our
  819. 36:29corresponding courses but for here I'm
  820. 36:32assuming that you already know so you
  821. 36:34know the law of signs which means that
  822. 36:36if you have this triangle you know you
  823. 36:39have this different sides so you have an
  824. 36:41angle a the corresponding side is a and
  825. 36:44then you have angle B corresponding side
  826. 36:46is B and then here C and the
  827. 36:48corresponding side is C then you know
  828. 36:50that a / to sinus of that angle is equal
  829. 36:53to B / to the sign of that angle and
  830. 36:56then is equal to C divided to the sign
  831. 36:58of that angle so basically take this
  832. 37:01value divide it to the sinus of this
  833. 37:04angle you know right in front of it is
  834. 37:08equal to taking this value and then
  835. 37:10dividing into the sinus of this angle so
  836. 37:13the proof of this low is outside so out
  837. 37:16of the scope of this course but knowing
  838. 37:18this will help you to understand
  839. 37:19different concepts and then the law of
  840. 37:22cosine is simply saying take the side of
  841. 37:26a Target angle so in our triangular we
  842. 37:30have here a we have here angle B and the
  843. 37:33C and if we go and look into this
  844. 37:36specific angle so angle C just randomly
  845. 37:39picking one of the three angles then the
  846. 37:42side right in front of that angle so the
  847. 37:45C c^ squ is equal to if we take this you
  848. 37:49know the other two sides forming that
  849. 37:51angle so A and B is equal to a s so this
  850. 37:55is just a constant a distance of this
  851. 37:58side a 2 + b 2 so this side squar minus
  852. 38:032 * a * B times the cosine of that angle
  853. 38:09this is what we are referring as the law
  854. 38:11of cosin quite easy we are not going to
  855. 38:13prove it again if you want to get the
  856. 38:15proofs make sure to check our other
  857. 38:18courses on the geometry and triog
  858. 38:20genetry we're almost done with the
  859. 38:22prerequisites just a quick refreshment
  860. 38:24we saw already the norm here is just a
  861. 38:27not EX exle what Norm is and on a
  862. 38:30specific two dimensional Vector when we
  863. 38:32have for instance that a vector is equal
  864. 38:35to three and four which means for the
  865. 38:37First Dimension let's say on xaxis we
  866. 38:39have three and then on Y axis is equal
  867. 38:41to four then the norm or the Alid
  868. 38:43distance so this is equal to we take the
  869. 38:47x value so three and then we Square it
  870. 38:50so V you can see here this is the case
  871. 38:53when n is equal to 2 this is simply
  872. 38:56equal to square Ro of v1^2 + v2^ 2 and
  873. 39:00as V1 is equal to 3 so this is our maybe
  874. 39:05I can make this just V1 and this is my
  875. 39:09V2 then the norm or the equan distance
  876. 39:12for this Vector so this thing is equal
  877. 39:15to V1 2 + v2^ 2 which is equal to 3^ 2 +
  878. 39:214 S and this value is square root of 25
  879. 39:25and it's equal to 5 so let's now see the
  880. 39:28difference between aladine distance and
  881. 39:30the norm so you could see here the norm
  882. 39:33here we have just one vector like here
  883. 39:38and this Norm it has just two
  884. 39:41corresponding values into two
  885. 39:42dimensional space you see here we have
  886. 39:45just three and then four so this is V1
  887. 39:47and V2 when it comes to the Alan
  888. 39:50distance this is kind of the
  889. 39:51generalization of this idea of Norm so
  890. 39:54the aladine distance between two points
  891. 39:57a and B in RN so in the N dimensional
  892. 40:00space is the norm of the vector
  893. 40:03connecting a to B so we see that the
  894. 40:06norm and the elidan distance are highly
  895. 40:09related to each other only we are
  896. 40:12talking about the norm when it comes to
  897. 40:14one vector but when we have this Vector
  898. 40:18a and the vector
  899. 40:21B this is simply the Alan distance so
  900. 40:27for the Aline distance we know already
  901. 40:31this idea of distance how we can measure
  902. 40:32it and you can see that this comes very
  903. 40:35similar to what we see here notation and
  904. 40:38here we are saying well we have this
  905. 40:41vector and then it has the two
  906. 40:43coordinates in N is equal to 2 in two
  907. 40:45dimensional space when it comes to the
  908. 40:47Alan distance Alan distance helps you
  909. 40:50understand what is this distance between
  910. 40:53two points in an N dimensional space so
  911. 40:57the aladan distance between two points
  912. 40:59let's say A and B in N dimensional space
  913. 41:03is the norm of the vector connecting a
  914. 41:07to B so for instance if we have a point
  915. 41:09a and we have a point B we are
  916. 41:13connecting this and this is the vector
  917. 41:15connecting these two points then the
  918. 41:17aladan distance is simply the norm of
  919. 41:21this Vector so this is the aladan
  920. 41:24distance so we can see that nor
  921. 41:27and the distance they are highly related
  922. 41:30to each other in the Alan distance we
  923. 41:32are using this idea of norm and
  924. 41:34specifically the norm two as I mentioned
  925. 41:38before so here you can see that the
  926. 41:40definition of aladine distance so the
  927. 41:43distance between A and B the two point
  928. 41:45is equal to square root of A1 - B1 2 + a
  929. 41:50and then here we have basically A2 - b
  930. 41:532^ 2 and then plus A3 - B 3 squ those
  931. 41:58are things that we cover as part of this
  932. 42:00dot dot dot and then plus up to the last
  933. 42:02point when we have a n minus BN 2 so
  934. 42:05here what we mean basically is that if
  935. 42:08we
  936. 42:10have two points here is a and here's B
  937. 42:13and this s vector and we know all these
  938. 42:16different points so A1 B1 A2 B2 A3 B3
  939. 42:23blah blah blah and then here a n BN we
  940. 42:26know all these points lying here in this
  941. 42:29distance then we are taking them and
  942. 42:31using them to calculate the line
  943. 42:33distance so here for instance if we have
  944. 42:37point A and B so in this example let's
  945. 42:42do quick one specific example when we
  946. 42:45have a point a which has coordinates 1
  947. 42:47and two so this is basically A1 A2 and
  948. 42:51then point B with points in it like B1
  949. 42:55B2 you can notice that the da AB so the
  950. 42:58distance or the Eid in distance of these
  951. 43:00two points which is equal to the norm of
  952. 43:04this
  953. 43:07vector or here this is a and this is B
  954. 43:10and this is this Vector this is equal to
  955. 43:13Square < t of 4 - 1 so it takes the B1
  956. 43:17so this is B1 and this is
  957. 43:21A1 takes the square and then says plus
  958. 43:25B2 minus H ^ 2 takes the square root of
  959. 43:30that and says this equal to 5 now you
  960. 43:33might be wondering but hey why do we do
  961. 43:35then instead of 1 - B1 2 we do B1 - A1 2
  962. 43:39and the answer to this question lies in
  963. 43:42the uh properties that we learn as part
  964. 43:44of prealgebra because it doesn't matter
  965. 43:47when we take A1 - B1 squ or B1 - A1
  966. 43:51squared because this squared ensures
  967. 43:53that it doesn't matter which one we take
  968. 43:55first and subtract the other now the
  969. 43:57proof of that is outside of the scope of
  970. 43:59this of course is this is part of
  971. 44:01pre-algebra but I just wanted to put
  972. 44:03this out there to ensure that you are
  973. 44:06seeing what we are seeing here because
  974. 44:08here it says A1 minus B1 but in this
  975. 44:10example we are taking instead depth B1
  976. 44:13and we are subtracting A1 this is a
  977. 44:15common thing that we do in prealgebra
  978. 44:18and just in general in different cting
  979. 44:21distance or distance related cases so I
  980. 44:23just wanted to put this here to ensure
  981. 44:25that later on this is something that can
  982. 44:28be clear from the first view right and
  983. 44:30in here we will quickly refresh our
  984. 44:32memory on the Pythagorean theorem which
  985. 44:34basically says in the right angle
  986. 44:36triangle so if we have this type of
  987. 44:41triangle so here we have
  988. 44:4490° this is a right angle
  989. 44:47triangle the square of the length of the
  990. 44:51the side opposite to the right angle so
  991. 44:53this side this we over refer C and this
  992. 44:56as B uh and then a those two are not
  993. 44:59very important but this is commonly
  994. 45:01referred by C so the the side opposite
  995. 45:05to the right
  996. 45:06angle then we know that the square of
  997. 45:09the C so c^ s is equal to a 2 + b^2 this
  998. 45:13is super important theorem and a
  999. 45:16fundamental principle for defining the
  1000. 45:18Norms the distances in equity and spaces
  1001. 45:21in and in many other
  1002. 45:24applications so the angles play Cru Ro
  1003. 45:27in understanding the direction of the
  1004. 45:28vectors and you know how they can be
  1005. 45:30measured in degrees or in radians we saw
  1006. 45:33also the pi radian this idea of you know
  1007. 45:36that the P radian is equal to 180° those
  1008. 45:39are all very important when it comes to
  1009. 45:41linear algebra and just in general
  1010. 45:43application of mathematics in machine
  1011. 45:46learning in Ai and other applications
  1012. 45:48the relationships between this angle
  1013. 45:50measurements and the triog genometric
  1014. 45:53functions is foundational in solving
  1015. 45:56different problems
  1016. 45:57that are about these vectors and their
  1017. 46:01orientations for instance this angle of
  1018. 46:03s cosine you know what is this idea of
  1019. 46:06tangent they are very important just to
  1020. 46:09give you an idea the um uh Tang tangent
  1021. 46:14is specifically used as part of the
  1022. 46:16activation functions we call it tank
  1023. 46:18activation function and knowing this
  1024. 46:20tank will help you to understand the
  1025. 46:22activation functions that I use as part
  1026. 46:24of deep learning which are more advanced
  1027. 46:26machine learning type of models and they
  1028. 46:30are fundamentals in all these different
  1029. 46:32new and Cutting Edge techniques large
  1030. 46:35like large large language models
  1031. 46:37Transformers encoder and decoder based
  1032. 46:39algorithms Etc they're also important in
  1033. 46:42this idea of computing dot products so
  1034. 46:45very important and must know when it
  1035. 46:48comes to linear algebra so this is just
  1036. 46:51an simple example when it comes to this
  1037. 46:53right angle triangle and Pythagorean
  1038. 46:56theorem and how is applied I will skip
  1039. 46:58this for now it's also important to
  1040. 47:00understand this idea of orthogonality so
  1041. 47:03the two vectors let's say A and B they
  1042. 47:06are orthogonal to each other if their
  1043. 47:10dotproduct is zero so later on as part
  1044. 47:13of the vectors when we will talk about
  1045. 47:15dot product we will see what we mean
  1046. 47:18when we say that the dot product is
  1047. 47:20equal to zero and here you can even see
  1048. 47:22that if the a norm if the a vector so
  1049. 47:27you see here and B Vector if those
  1050. 47:30vectors if we multiply them to each
  1051. 47:32other their dot product is equal to zero
  1052. 47:35it means they are orthogonal so this
  1053. 47:38angle that they form is equal to 90°
  1054. 47:41orthogonality implies that the vectors
  1055. 47:43from the from a right angle with each
  1056. 47:46other they are in you know we we are
  1057. 47:48dealing with that in R2 in R Tre so they
  1058. 47:51are super important when it comes also
  1059. 47:54to visualizing them correctly
  1060. 47:57this concept is visually represented all
  1061. 48:00this you know Vector a and then Vector B
  1062. 48:03and they are perpendicular in the 2D uh
  1063. 48:06coordinate
  1064. 48:08system all right so when it comes to the
  1065. 48:11applications of orthogonality
  1066. 48:12orthogonality plays a crucial role in
  1067. 48:14various aspect of linear algebra it's
  1068. 48:16fundamental in defining Vector spaces
  1069. 48:19subspaces in solving a systems of linear
  1070. 48:22equation later on when we pass the
  1071. 48:24vector ideas and we go on to the
  1072. 48:27matrices solving linear systems so
  1073. 48:30equations with many unknowns and then we
  1074. 48:32use this idea of reductions or gausian
  1075. 48:35reductions we will see how this idea of
  1076. 48:37orthogonality can be important and how
  1077. 48:40also it relates back to the norm of two
  1078. 48:43vectors so it's fundamental in defining
  1079. 48:46all these different identities and
  1080. 48:48solving system of linear equations and
  1081. 48:50also orthogonal vectors are used in
  1082. 48:52finding the shortest distance from a
  1083. 48:55point to the plane um something that is
  1084. 48:58important when it comes to the
  1085. 49:00optimizations and here you can see an
  1086. 49:03example the vector a which is equal to 2
  1087. 49:05three and then Vector B which is equal
  1088. 49:07to minus 3 and 2 you can see that when
  1089. 49:10we multiply 2 by minus 3 so we obtain
  1090. 49:13basically the dot product by the way
  1091. 49:15this is something that we are going to
  1092. 49:16cover also as part of this course but
  1093. 49:18for now you can see that if we take this
  1094. 49:21number we multiply with this so 2 * - 3
  1095. 49:25we take this number multiply with this
  1096. 49:27so we take three and multiply with two
  1097. 49:30you can see that this equal to minus 6
  1098. 49:32this is equal to 6 so - 6 + 6 is equal
  1099. 49:35to zero so you can see that the
  1100. 49:38dotproduct of these two vectors is
  1101. 49:41simply equal to zero and this is what we
  1102. 49:43are referring as orthogonality this
  1103. 49:45means that these two vectors form a
  1104. 49:48right angle where we see here this angle
  1105. 49:51is equal to 90° why this prerequisites
  1106. 49:55matter and why I meant those
  1107. 49:57understanding this concept is very
  1108. 49:59crucial they underpin this geometric
  1109. 50:01interpretation of linear algebra they
  1110. 50:03will help you to better understand these
  1111. 50:05Concepts and not just to memorize them
  1112. 50:07but really understand and later on when
  1113. 50:10you go into your machine learning and AI
  1114. 50:12journey and in your data science Journey
  1115. 50:14seeing these Concepts will help you to
  1116. 50:18better understand those different alori
  1117. 50:20this optimization techniques what we
  1118. 50:22mean when we say we want our
  1119. 50:24optimization algorithm to move towards
  1120. 50:27local minimum Global minimum but this
  1121. 50:29idea of movement this idea of vectors
  1122. 50:32later on will you will also understand
  1123. 50:34this different concepts in deep learning
  1124. 50:37how these models work how the neural
  1125. 50:38networks work and those are essential
  1126. 50:42Concepts that you need for solving
  1127. 50:44different systems of linear equation a
  1128. 50:46core part of this course they also help
  1129. 50:50you in visualizing vectors spaces which
  1130. 50:53are critical to understand this concept
  1131. 50:55of linear algebra the applications of
  1132. 50:57linear algebra when it comes to the real
  1133. 51:00world applications so those are things
  1134. 51:03that you can definitely must by
  1135. 51:06following some of our other courses but
  1136. 51:08for this course I assume that you are
  1137. 51:10already familiar with this Concepts
  1138. 51:13right so now we are ready to actually
  1139. 51:15begin and with this prerequisites in
  1140. 51:17mind you are prepared to start your
  1141. 51:20linear arbra Journey we are going to
  1142. 51:23learn everything in the most efficient
  1143. 51:25way in such a way that you will learn
  1144. 51:27the theory you are going to see many
  1145. 51:29examples we are going to learn
  1146. 51:31everything in detail but at the same
  1147. 51:33time you're going to learn the must know
  1148. 51:35Concepts and I'm not going to overwhelm
  1149. 51:37you with this most difficult concept
  1150. 51:39that you will not be seeing in your
  1151. 51:41career I'm going to give you this bare
  1152. 51:44minimum when it comes to really knowing
  1153. 51:47and the must know for linear algebra
  1154. 51:49such that you will be ready to apply
  1155. 51:52linear algebra in your professional
  1156. 51:54Journey whether you want to get into
  1157. 51:56machine learning deep learning
  1158. 51:58artificial intelligence data science
  1159. 52:00knowing these different concepts in
  1160. 52:02linear algebra you will be a pro in your
  1161. 52:05field going to give you everything that
  1162. 52:07you need the theory examples
  1163. 52:10implementations everything in detail but
  1164. 52:13at the same time you will be doing that
  1165. 52:15in the most efficient and time-saving
  1166. 52:18way so without further Ado let's get
  1167. 52:23started let's Now quickly Define this
  1168. 52:25idea of norm so the normal of a vector
  1169. 52:27denoted by this uh uh V which you can
  1170. 52:31see kind of like similar to the absolute
  1171. 52:34value from
  1172. 52:35pre-algebra you can see here that we
  1173. 52:37have this double straight lines like
  1174. 52:41from absolute value then we have the
  1175. 52:43name of the vector or the variable name
  1176. 52:46that we are assigning to our vector and
  1177. 52:48then you might notice here on the top of
  1178. 52:51this this Arrow this basically says that
  1179. 52:55we are dealing not with just a variable
  1180. 52:57but really we are dealing with a vector
  1181. 53:00this is really important because you can
  1182. 53:02see that there makes a huge difference
  1183. 53:05if we have for instance just V or V1 I
  1184. 53:08have to say or just V those are really
  1185. 53:11important and things that you need to
  1186. 53:13keep in mind when it comes to linear
  1187. 53:15algebra and trying to differentiate
  1188. 53:17vectors from a
  1189. 53:18point you will notice that when it comes
  1190. 53:21to Norm we can uh represented it either
  1191. 53:25by this not ation or this usually it's a
  1192. 53:28common um notation uh in machine
  1193. 53:31learning or in data science um with this
  1194. 53:34uh two bars and um when we do this we
  1195. 53:39automatically also know L2 norm and this
  1196. 53:42is something very common and uh usually
  1197. 53:45used as part of um
  1198. 53:47retrogression which is an application of
  1199. 53:51um linear algebra uh and it's used in uh
  1200. 53:54regularization so we are regularizing
  1201. 53:57our machine learning algorithms so when
  1202. 53:59you get into machine learning you will
  1203. 54:00see time and time again this um notation
  1204. 54:03so uh next time when you see this then
  1205. 54:05you know automatically that you are
  1206. 54:07dealing with L2 norm and L2 Norm which
  1207. 54:10is also used a lot in machine learning
  1208. 54:13it is referring to the usage of L2 Norm
  1209. 54:16to uh in the uh regression and
  1210. 54:19regression or L2 regularization is a
  1211. 54:23very popular regularization techniques
  1212. 54:25as part of machine learning so right now
  1213. 54:28even you can see this uh intersection or
  1214. 54:31linear algebra or um this uh idea of
  1215. 54:34norms in machine learning the norm of
  1216. 54:37this vector v is equal to square roof
  1217. 54:40and then V1 S Plus V2 squ plus and all
  1218. 54:43this in between numbers plus VN squ so
  1219. 54:47here basically it means take square root
  1220. 54:50of V1 squ then V2 squar plus V3 squ blah
  1221. 54:56blah BL plus VN 2 so basically take all
  1222. 55:01the units that form this vector and then
  1223. 55:04so are on this vector and use them
  1224. 55:08Square them and then add them and then
  1225. 55:11take the square root of that that's the
  1226. 55:13distance or I have to say the norm of
  1227. 55:16this Vector we saw already the norm here
  1228. 55:19is just a not example what Norm is in um
  1229. 55:22on a specific two dimensional Vector
  1230. 55:25when we have for instance that the
  1231. 55:27vector is equal to three and four which
  1232. 55:29means for the First Dimension let's say
  1233. 55:31on xaxis we have three and then on Y
  1234. 55:34axis is equal to four then the norm or
  1235. 55:36the AL in distance so this is equal to
  1236. 55:39we take the x value so three and then we
  1237. 55:42Square it so V you can see here this is
  1238. 55:46the case when n is equal to 2 this is
  1239. 55:49simply equal to square root of V1 2 +
  1240. 55:52v2^ 2 and as V1 is equal to 3
  1241. 55:56so this is our maybe I can make this
  1242. 55:59just V1 and this is my V2 then the norm
  1243. 56:04or the in distance for this Vector so
  1244. 56:07this thing is equal
  1245. 56:09to V1 2 + V2 s which is equal to 3^ 2 +
  1246. 56:154^ 2 and this value is square root of 25
  1247. 56:19and it's equal to five so let's now see
  1248. 56:21the difference between aladine distance
  1249. 56:24and the norm so you you could see here
  1250. 56:26the norm here we have just one vector
  1251. 56:30like here and this Norm it has just two
  1252. 56:35corresponding values into two
  1253. 56:36dimensional space you see here we have
  1254. 56:38just three and then four so this is V1
  1255. 56:41and V2 when it comes to the Alan
  1256. 56:43distance this is kind of the
  1257. 56:45generalization of this idea of Norm so
  1258. 56:48the Alan distance between two points A
  1259. 56:51and B in RN so in the N dimensional
  1260. 56:54space is the norm of the the vector
  1261. 56:57connecting a to B so we see that the
  1262. 57:00norm and the elidan distance are highly
  1263. 57:03related to each other only we are
  1264. 57:06talking about the norm when it comes to
  1265. 57:08one vector but when we have this Vector
  1266. 57:12a and the vector
  1267. 57:15B this is simply the Alan distance so
  1268. 57:21for the Aline distance we know already
  1269. 57:24this idea of distance how we can measure
  1270. 57:26it and you can see that this comes very
  1271. 57:29similar to what we see here notation and
  1272. 57:32here we are saying well we have this
  1273. 57:35vector and then it has this two
  1274. 57:37coordinates in N is equal to two in two
  1275. 57:39dimensional space when it comes to the
  1276. 57:41AQ in distance Eline distance helps you
  1277. 57:44understand what is this distance between
  1278. 57:47two points in an N dimensional space so
  1279. 57:51the aladan distance between two points
  1280. 57:53let's say A and B in n dimens space is
  1281. 57:57the norm of the vector connecting a to B
  1282. 58:01so for instance if we have a point a and
  1283. 58:04we have a point B we are connecting this
  1284. 58:07and this is the vector connecting these
  1285. 58:09two points then the aladan distance is
  1286. 58:12simply the norm of this Vector so this
  1287. 58:17is the aladine distance so we can see
  1288. 58:20that the norm and the distance they are
  1289. 58:23highly related to each other in the Alan
  1290. 58:25distance where using this idea of norm
  1291. 58:28and specifically the norm two as I
  1292. 58:31mentioned before so here you can see
  1293. 58:34that the definition of alodine distance
  1294. 58:36so the distance between A and B the two
  1295. 58:39point is equal to square root of A1
  1296. 58:41minus B1 2qu plus a and then here we
  1297. 58:44have basically A2 minus b 2 2ar and then
  1298. 58:48plus A3 minus B3 2 those are things that
  1299. 58:52we cover as part of this dot dot dot and
  1300. 58:55then plus up to the last point when we
  1301. 58:56have a n minus bn^ 2 so here what we
  1302. 59:00mean basically is that if we
  1303. 59:03have two points here is a and here is B
  1304. 59:07and this s vector and we know all these
  1305. 59:10different points so A1 B1 A2 B2 A3 B3
  1306. 59:17blah blah blah and then here a n BN we
  1307. 59:20know all these points lie in here in
  1308. 59:22this distance then we are taking them
  1309. 59:25and using them to calculate the Lan
  1310. 59:27distance so here for instance if we have
  1311. 59:31um point A and B so in this example
  1312. 59:36let's do a quick one specific example
  1313. 59:38when we have a point a which has
  1314. 59:40coordinates 1 and two so this is
  1315. 59:42basically A1 A2 and then point B with u
  1316. 59:47points in it like B1 B2 you can notice
  1317. 59:51that the da AB so the distance or the
  1318. 59:53equid distance of these two points which
  1319. 59:56which is equal to the norm of this um
  1320. 1:00:02vector or here this is a and this is B
  1321. 1:00:05and this is this Vector this is equal to
  1322. 1:00:08square root of 4 - 1 so it takes the B1
  1323. 1:00:12so this is B1 and this is
  1324. 1:00:16A1 takes the square and then says plus
  1325. 1:00:21B2 - A2 2 takes the square root of that
  1326. 1:00:25and says this equal to 5 now you might
  1327. 1:00:28be wondering but hey why do we do then
  1328. 1:00:31instead of 1 - B1 2 we do B1 - A1 2 and
  1329. 1:00:35the answer to this question lies in the
  1330. 1:00:37um uh properties that we learn as part
  1331. 1:00:40of pre-algebra because it doesn't matter
  1332. 1:00:43when we take uh A1 - B1 squ or B1 - A1
  1333. 1:00:47squ because this squared ensures that it
  1334. 1:00:49doesn't matter which one we take first
  1335. 1:00:51and subtract the other now the proof of
  1336. 1:00:54that is outside of the scope of this um
  1337. 1:00:57course is this is part of pre-algebra
  1338. 1:00:59but I just wanted to put this out there
  1339. 1:01:00to ensure that uh you are uh seeing what
  1340. 1:01:04we are seeing here because here it says
  1341. 1:01:06A1 minus B1 but in this example we are
  1342. 1:01:08taking instead depth uh B1 and we are
  1343. 1:01:11subtracting A1 this is a common thing
  1344. 1:01:14that we do in um pre-algebra and just in
  1345. 1:01:17general uh in different um eling
  1346. 1:01:20distance or distance related cases so I
  1347. 1:01:22just wanted to put this here to ensure
  1348. 1:01:24that uh later on this is something that
  1349. 1:01:27can be clear um from the first view why
  1350. 1:01:29this is important this idea of norms and
  1351. 1:01:32Al IND distance beside of being used in
  1352. 1:01:34machine learning and why is it used so
  1353. 1:01:36Norms they provide a way to measure the
  1354. 1:01:38size or the length of a vector in Vector
  1355. 1:01:41spaces which means that when we want to
  1356. 1:01:44measure a distance a similarity a
  1357. 1:01:47relationship between for instance
  1358. 1:01:49vectors then it becomes much easier to
  1359. 1:01:52use this idea an Alan distance is not
  1360. 1:01:55only used in regularization techniques
  1361. 1:01:58like L2 regularization or retrogression
  1362. 1:02:02but it's also used in other machine
  1363. 1:02:04learning or deep learning algorithms as
  1364. 1:02:06a way to measure the distance or the
  1365. 1:02:09relationship or the similarity between
  1366. 1:02:12two different entities those can be
  1367. 1:02:14variables those can be two people that
  1368. 1:02:16we want to compare in our algorithm or
  1369. 1:02:18two entities um for instance the um
  1370. 1:02:23Norms or the Al and distance they are
  1371. 1:02:25also used as part of K algorithm
  1372. 1:02:28something that you might have heard and
  1373. 1:02:29if you follow later on the machine
  1374. 1:02:31learning and the clustering section of
  1375. 1:02:33machine learning you will see that Elin
  1376. 1:02:35distance is used as part of C's
  1377. 1:02:37algorithm that aims to Cluster
  1378. 1:02:39observations into different groups so
  1379. 1:02:42this is also yet another highly
  1380. 1:02:44applicable uh topic that you must know
  1381. 1:02:46in order to understand different linear
  1382. 1:02:48algebra top topics but also machine
  1383. 1:02:51learning topics welcome to the course on
  1384. 1:02:53the fundamentals of linear arbra
  1385. 1:02:56my name is D Vasan and today we are
  1386. 1:02:58going to start with some basic concepts
  1387. 1:03:01that are important for understanding
  1388. 1:03:02linear algebra linear algebra is one of
  1389. 1:03:05the most applicable areas of mathematics
  1390. 1:03:08it is used by pure mathematicians that
  1391. 1:03:10you will see in universities doing
  1392. 1:03:13research publishing research papers but
  1393. 1:03:15also by the mathematically trained
  1394. 1:03:17scientists of all disciplines this is
  1395. 1:03:20really one of those areas in mathematics
  1396. 1:03:22that you will see time and time again
  1397. 1:03:24appearing in your professional life if
  1398. 1:03:27you want to become a job ready uh data
  1399. 1:03:31scientist or you want to do some handson
  1400. 1:03:33machine learning deep learning and AI
  1401. 1:03:36stuff but also linear algebra is used in
  1402. 1:03:38cryptology it is used in cyber security
  1403. 1:03:41and in many other areas of computer
  1404. 1:03:43science and artificial
  1405. 1:03:45intelligence so if you want to become
  1406. 1:03:48this well-rounded professional you want
  1407. 1:03:50to go beyond using libraries and you
  1408. 1:03:53want to truly understand the uh
  1409. 1:03:56mathematics and the technical side of
  1410. 1:03:58this different machine learning
  1411. 1:03:59algorithms from very basic was like
  1412. 1:04:02linear regression to most complex ones
  1413. 1:04:04coming from Deep learning like
  1414. 1:04:06architectures in neural network how the
  1415. 1:04:08optimization algorithms work how the
  1416. 1:04:10gradient descent works and all these
  1417. 1:04:12other uh different methods and models
  1418. 1:04:15then you are in the right place because
  1419. 1:04:17you must know linear algebra such that
  1420. 1:04:19you will understand these different
  1421. 1:04:21concepts from very basic ones to most
  1422. 1:04:24advanced ones in the data science
  1423. 1:04:26machine learning deep learning
  1424. 1:04:28artificial intelligence data analytics
  1425. 1:04:31but also in many other applied science
  1426. 1:04:35disciplines so before starting this
  1427. 1:04:38comprehensive course that will give you
  1428. 1:04:40everything that you need to know about
  1429. 1:04:41linear algebra first I'm going to tell
  1430. 1:04:44you what we assume that you already know
  1431. 1:04:47because linear algebra it comes from
  1432. 1:04:49about third uh year of bachelors's um of
  1433. 1:04:53different uh highly technical studies
  1434. 1:04:56and um here um we are assuming that you
  1435. 1:04:59already know certain Concepts so uh to
  1436. 1:05:03ensure that this course Tes really on
  1437. 1:05:05the topic of linear algebra and that you
  1438. 1:05:08uh understand all these Concepts really
  1439. 1:05:11well for that we need to uh be able to
  1440. 1:05:14know different topics so before we dive
  1441. 1:05:18into this Concepts uh let's familiarize
  1442. 1:05:21ourselves with the basic prerequisites
  1443. 1:05:23and notations used throughout this
  1444. 1:05:25course and you will really need to know
  1445. 1:05:27this in order to understand these
  1446. 1:05:29Concepts really well such that instead
  1447. 1:05:31of memorizing you will actually just
  1448. 1:05:34hear me once or maybe twice and then
  1449. 1:05:37every time you hear later on or you see
  1450. 1:05:39it in the papers or in some algorithms
  1451. 1:05:41you will recognize ah this is something
  1452. 1:05:43that we already
  1453. 1:05:45learned so uh some key prerequisites
  1454. 1:05:48overview is here um first of all to
  1455. 1:05:51fully grasp the upcoming material you
  1456. 1:05:53should be familiar with some basic
  1457. 1:05:55concept like real numbers Vector spaces
  1458. 1:05:58so you don't need to know this idea of
  1459. 1:06:00vectors though you uh already most
  1460. 1:06:04likely are familiar with this given that
  1461. 1:06:06you know how to plot different uh lines
  1462. 1:06:09you know the idea of x's and y's and how
  1463. 1:06:13to plot these different graphs but um
  1464. 1:06:16here we are going to touch base on this
  1465. 1:06:18every time when we come close to this
  1466. 1:06:20Concepts I will refresh you uh your
  1467. 1:06:22memory and we will go through this
  1468. 1:06:24numbers the idea of norms and distance
  1469. 1:06:27measures because when it comes to the
  1470. 1:06:30vectors when it comes to the magnitude
  1471. 1:06:32and all these different uh topics that
  1472. 1:06:34we are going to discuss as part of
  1473. 1:06:36linear algebra knowing the what Norm is
  1474. 1:06:39and um what is the definition of
  1475. 1:06:41distance what is the length between uh
  1476. 1:06:45two points when we plot it in the
  1477. 1:06:47two-dimensional space or
  1478. 1:06:48three-dimensional space those are all
  1479. 1:06:50very basic concept that usually you see
  1480. 1:06:53as part of a basic pre-algebra or is uh
  1481. 1:06:56common algebra ques and um lessons in
  1482. 1:07:01order to truly understand what the your
  1483. 1:07:03algebra is about to understand the
  1484. 1:07:05direction of vectors the angle and then
  1485. 1:07:09um the uh dimensionality reduction how
  1486. 1:07:11linear algebra is applied for instance
  1487. 1:07:13in different algorithms in machine
  1488. 1:07:15learning deep learning data science
  1489. 1:07:17statistics you really need to understand
  1490. 1:07:19this Cartesian coordinate system so uh
  1491. 1:07:22this is not only important for linear
  1492. 1:07:25algebra but I assume you already know it
  1493. 1:07:27given that you have passed those um uh
  1494. 1:07:29other courses like calculus or usually
  1495. 1:07:33they are covered as part of pre-algebra
  1496. 1:07:34or algebra so the cartisian coordinate
  1497. 1:07:38system I mean here understanding uh what
  1498. 1:07:41is for instance the the common um
  1499. 1:07:44description of them for instance when
  1500. 1:07:45you when we write like X and then y on
  1501. 1:07:48the vertical axis and then we can uh we
  1502. 1:07:51have here zero and um then uh we can
  1503. 1:07:54always PL this different plots you know
  1504. 1:07:57we we have a clear understanding what is
  1505. 1:07:59this um Y is equal to X line we
  1506. 1:08:02understand how by knowing certain points
  1507. 1:08:05we can plot different plots for instance
  1508. 1:08:07that this is the Y is equal to X line
  1509. 1:08:10that here it means that if we have here
  1510. 1:08:12one then this is just one two this is
  1511. 1:08:15two so we understand when we have the
  1512. 1:08:17function of the line and we have a
  1513. 1:08:19certain value where is our y coordinate
  1514. 1:08:22or x coordinate then the corresponding
  1515. 1:08:24uh coordinate can be found then um you
  1516. 1:08:28also need to know um some basic things
  1517. 1:08:31that I just didn't mention uh right now
  1518. 1:08:34so for instance that the numbers here
  1519. 1:08:36can be like 1 2 three up to Infinity so
  1520. 1:08:39you understand this concepts of infinity
  1521. 1:08:42and then here the same uh story then
  1522. 1:08:45here we have minus one you know minus
  1523. 1:08:48two uh and then this is then used later
  1524. 1:08:52on and we will be uh touch basing this
  1525. 1:08:55is when we will be describing our
  1526. 1:08:57vectors and how uh we can visualize our
  1527. 1:09:00vectors either two dimensional space
  1528. 1:09:02like we have here because this is two
  1529. 1:09:04dimensional so we have X and Y but we
  1530. 1:09:06can also of course visualize it in
  1531. 1:09:09three-dimensional
  1532. 1:09:10Etc so this idea of basic coordinate
  1533. 1:09:13system is really important um usually
  1534. 1:09:16covered as part of algebra if not
  1535. 1:09:19pre-algebra then we have basic triog
  1536. 1:09:22genetry which means that you need to
  1537. 1:09:24have a clear understanding what sinus is
  1538. 1:09:26what cosine is what tangent is and their
  1539. 1:09:29reciprocals and here I mean uh that you
  1540. 1:09:31know for instance um what is cosine
  1541. 1:09:34function what is s function um you know
  1542. 1:09:38that you have an
  1543. 1:09:40understanding for instance that um uh
  1544. 1:09:43what is this line you know um whether
  1545. 1:09:46it's a sinus line or cosine line you
  1546. 1:09:49have also an understanding what this Pi
  1547. 1:09:51is um one thing that I didn't mention
  1548. 1:09:54but it it just goes um around all these
  1549. 1:09:58topics some basic things that you
  1550. 1:10:00understand what is X what is y why we uh
  1551. 1:10:03use them and this idea of uh
  1552. 1:10:07variables uh and also uh you need to
  1553. 1:10:10understand this idea of a square uh or
  1554. 1:10:14you know a
  1555. 1:10:1690° uh angle and then uh Pythagoras
  1556. 1:10:20Theorem here we have the same so what is
  1557. 1:10:23this relationship between different
  1558. 1:10:24sides of the triangle uh that is a very
  1559. 1:10:27unique triangle and that has one of the
  1560. 1:10:30uh angles as 90° um and uh this idea of
  1561. 1:10:36um you know the sides how this relates
  1562. 1:10:38to the sinus cosinus tangent cotangent
  1563. 1:10:41um and also um how the Pythagorean um
  1564. 1:10:45Pythagorean theorem applies when we have
  1565. 1:10:48uh a triangular but it is no longer with
  1566. 1:10:52a angle that is 90° what is the sum of
  1567. 1:10:55all the angles of triangle so those are
  1568. 1:10:58basic stuff that are com commonly
  1569. 1:11:01covered as part of uh trigonometric uh
  1570. 1:11:04lessons or part of General
  1571. 1:11:07geometry then another prerequisite um is
  1572. 1:11:11this uh understanding of uh identities
  1573. 1:11:15and equations in triog genometric um
  1574. 1:11:18lessons something part of which I
  1575. 1:11:20already covered and this is goes around
  1576. 1:11:23of basic having a basic
  1577. 1:11:25understanding of algebra and geometry
  1578. 1:11:27those are super important to understand
  1579. 1:11:29more Advanced Techniques uh from linear
  1580. 1:11:32algebra then we have finally this idea
  1581. 1:11:34of orthogonality perpendicularity in
  1582. 1:11:37vectors for instance if we have um the
  1583. 1:11:41two lines like this then we are talking
  1584. 1:11:43about uh perpendicular vectors when you
  1585. 1:11:46have two lines that are actually
  1586. 1:11:48parallel so they don't have any
  1587. 1:11:50intersection and you won't find any
  1588. 1:11:52point that is common for the tube hi
  1589. 1:11:55there so let's get started with our
  1590. 1:11:57first module which is foundations of
  1591. 1:11:58vectors in this module we are going to
  1592. 1:12:00talk about fundamentals of linear
  1593. 1:12:02algebra vectors we are going to make a
  1594. 1:12:04differentiation with between scalers and
  1595. 1:12:07vectors we are going to Define them so
  1596. 1:12:09first we will learn the theory then we
  1597. 1:12:11will Implement them into practice by
  1598. 1:12:13plotting them by looking into different
  1599. 1:12:15examples then we will look into this
  1600. 1:12:17representation of vectors by looking
  1601. 1:12:20into the magnitude and the direction of
  1602. 1:12:22it and the representation of them just
  1603. 1:12:25in general we are going to plot them in
  1604. 1:12:27our coordinate system then we are going
  1605. 1:12:30to see the common notational vectors and
  1606. 1:12:32indexing of them vectors are super
  1607. 1:12:36important when it comes to linear
  1608. 1:12:37algebra and application of it and uh
  1609. 1:12:40they matter not only in mathematics but
  1610. 1:12:43beyond so uh vectors help us in many
  1611. 1:12:46ways from figuring out how objects move
  1612. 1:12:49to solving math problems in science and
  1613. 1:12:52just in general in technology including
  1614. 1:12:54in data science
  1615. 1:12:55machine learning artificial intelligence
  1616. 1:12:57Etc they are super useful tool so uh
  1617. 1:13:02let's start our journey with looking
  1618. 1:13:04into scalers so scalers they are just
  1619. 1:13:07plain numbers and by definition a scaler
  1620. 1:13:11is a single numeric volume often
  1621. 1:13:13representing magnitude or
  1622. 1:13:15quantity for example uh scalers can be
  1623. 1:13:20describing um the temperature outside
  1624. 1:13:23for instance the temperature
  1625. 1:13:25of um a
  1626. 1:13:2722° uh can be represented by a scaler or
  1627. 1:13:31a height of a person can be represented
  1628. 1:13:33it's a scaler so let's assume we have a
  1629. 1:13:37scaler that we will Define by a letter s
  1630. 1:13:39it's just a variable this scaler is then
  1631. 1:13:42equal to 22 for instance and we are
  1632. 1:13:45measuring it in degrees so it means that
  1633. 1:13:49uh if this s measures a room temperature
  1634. 1:13:52then the scaler s which is equal to
  1635. 1:13:5522° which represents the room
  1636. 1:13:57temperature it can be for instance 18°
  1637. 1:14:00or 9° if it's very called uh it just
  1638. 1:14:04measures a single volume it represents
  1639. 1:14:07just a single number or it can be for
  1640. 1:14:10instance 17 100
  1641. 1:14:132.22 so all these they are just scalers
  1642. 1:14:17they represent a single numeric volume
  1643. 1:14:21they often represent a magnitude or a
  1644. 1:14:23quantity very we will see that scalers
  1645. 1:14:26they are a value that represent the
  1646. 1:14:28magnitude of a
  1647. 1:14:30vector so uh now when we are clear on
  1648. 1:14:33this very basic concept of scalers let's
  1649. 1:14:37actually move to this idea of vectors so
  1650. 1:14:40by definition a vector is an ordered
  1651. 1:14:42array of numbers which can represent
  1652. 1:14:45both magnitude and direction in space so
  1653. 1:14:49uh vectors they are bit more they
  1654. 1:14:51represent bit more than scalers there
  1655. 1:14:53are numbers that also show show
  1656. 1:14:55direction like a car spitting down the
  1657. 1:14:58highway or a bow uh being
  1658. 1:15:01thrown for instance uh when it comes to
  1659. 1:15:04our previous example we were using this
  1660. 1:15:06uh uh room temperature as a way to uh
  1661. 1:15:10think about the scaler a scaler for
  1662. 1:15:14instance scaler that we just saw was
  1663. 1:15:17this room temperature room temperature
  1664. 1:15:20which was
  1665. 1:15:2222° when it comes to the vector
  1666. 1:15:25Vector is different for Vector for
  1667. 1:15:28instance we can have an example when a
  1668. 1:15:31bird for instance bird it
  1669. 1:15:35flies
  1670. 1:15:37flies at 10
  1671. 1:15:41kilomet per
  1672. 1:15:44hour and I also add here another
  1673. 1:15:47information which will make this as a
  1674. 1:15:49vector which is that it flies
  1675. 1:15:53South so here as you can see what I'm
  1676. 1:15:56doing is that I'm not just oh let me
  1677. 1:16:00actually remove this part to make it
  1678. 1:16:02easier to
  1679. 1:16:04understand okay so uh in this example
  1680. 1:16:08let me write it down that the
  1681. 1:16:12example
  1682. 1:16:14bird
  1683. 1:16:16FES
  1684. 1:16:19s at 10 kilomet per hour so you can see
  1685. 1:16:26that I'm not just adding the scaler
  1686. 1:16:29which is in this case the
  1687. 1:16:32magnitude we will see very soon the
  1688. 1:16:34formal definition of it so I'm writing
  1689. 1:16:37down the speed I'm defining the speed
  1690. 1:16:40but also the direction so I'm
  1691. 1:16:43saying I know that the bird is flying
  1692. 1:16:46south that's the direction and I know
  1693. 1:16:49also the speed of it which is the
  1694. 1:16:51magnitude so 10 kilomet per hour so here
  1695. 1:16:54in the vector I have much more
  1696. 1:16:56information than in the scaler because
  1697. 1:16:59in the scaler I just got temperature
  1698. 1:17:01room temperature single volue but in
  1699. 1:17:03case of a vector I not only have um
  1700. 1:17:07magnitude or speed like 10 kilm per hour
  1701. 1:17:10but I have extra information which is
  1702. 1:17:12the direction of it for instance flying
  1703. 1:17:14to the South so let's now look into some
  1704. 1:17:17real examples and plotting them to make
  1705. 1:17:20more sense out of this idea of vectors
  1706. 1:17:23and what is this magnitude what is the
  1707. 1:17:25direction so let's assume we have a 2d
  1708. 1:17:29plane so we have xaxis we have y AIS
  1709. 1:17:33here like usual we have our z0 Center
  1710. 1:17:37and we want to plot a simple Vector so
  1711. 1:17:42uh usually the way we represent Vector
  1712. 1:17:44in tutorials or just writing down is by
  1713. 1:17:47writing the name of the vector this can
  1714. 1:17:49be just a a random name let's assume
  1715. 1:17:52that it's a v letter v and then on the
  1716. 1:17:56top we are always adding this Arrow so
  1717. 1:17:59this Arrow it says and it tells the
  1718. 1:18:02person who is reading that we are
  1719. 1:18:04dealing with the vector arrow on the top
  1720. 1:18:06is that reference so let's assume this
  1721. 1:18:10uh vector v it starts from the center of
  1722. 1:18:14our coordinate system and it goes to
  1723. 1:18:17this point so let's say in here this is
  1724. 1:18:21our vector v
  1725. 1:18:25so let's assume that this point in here
  1726. 1:18:28is equal to 4 which means that the x
  1727. 1:18:32coordinate is four and the y-coordinate
  1728. 1:18:33is zero as the um uh Arrow it just as
  1729. 1:18:38the point in here it has a a y value of
  1730. 1:18:42zero so you can see that it goes
  1731. 1:18:43straight from zero to this one to this
  1732. 1:18:47point okay so what tells this Vector uh
  1733. 1:18:51to us is that we have a value that
  1734. 1:18:54describes the length of the vector so it
  1735. 1:18:57goes from 0 to 4 which means that the
  1736. 1:19:00length is equal to unit four so it's
  1737. 1:19:04equal to
  1738. 1:19:05four um
  1739. 1:19:08and we have just learned and we were
  1740. 1:19:10just talking about that the magnitude is
  1741. 1:19:14the length in this case so the length
  1742. 1:19:16describes the magnitude in this
  1743. 1:19:20case so this means that the magnit ude
  1744. 1:19:25of this Vector is equal to 4 and then um
  1745. 1:19:29what else we can see here we can see the
  1746. 1:19:31direction of the vector which means that
  1747. 1:19:33the direction is also something that we
  1748. 1:19:36can see here this is the direction of
  1749. 1:19:39the vector so this going straight from
  1750. 1:19:42this point to this point in a horizontal
  1751. 1:19:46way
  1752. 1:19:48so independent whether I plot this
  1753. 1:19:51Vector from 0 to 4 in here or in here
  1754. 1:19:54here or in here or in here or in here in
  1755. 1:19:59all cases as long as the length is this
  1756. 1:20:02I'm dealing with the same Vector because
  1757. 1:20:04I am basically in this entire
  1758. 1:20:09R2 space I have exactly the same Vector
  1759. 1:20:12all I care is about the magnitude and
  1760. 1:20:15the Direction Where will this Vector
  1761. 1:20:19start and where will it
  1762. 1:20:20end I am not interested I'm interested
  1763. 1:20:23that the uh that the magnitude in this
  1764. 1:20:26case the length is equal to the
  1765. 1:20:28direction of the vector so let's now
  1766. 1:20:30look into another example where we go a
  1767. 1:20:33bit more difficult on our coordinates
  1768. 1:20:35and on our Vector we already saw that we
  1769. 1:20:38had this Vector where we went let me
  1770. 1:20:41change the color so this was our vector
  1771. 1:20:45v and it went from zero till 4 so this
  1772. 1:20:48point to be more specific is so this
  1773. 1:20:51Vector it goes the vector B it goes from
  1774. 1:20:550 0
  1775. 1:20:58to 40 so the coordinate X was 4 and the
  1776. 1:21:03Y was Zero now let's plot another one um
  1777. 1:21:08where the direction is no longer
  1778. 1:21:09horizontal for this Vector let's call it
  1779. 1:21:12Vector
  1780. 1:21:13W and for this Vector w we will again
  1781. 1:21:16start with Z 0 so we will start again in
  1782. 1:21:18here but this time we will go bit like
  1783. 1:21:23this so let's say we go all the way to
  1784. 1:21:26this
  1785. 1:21:27point so this
  1786. 1:21:30point has a value for an x- axis of
  1787. 1:21:35three and for y axis it has a value of
  1788. 1:21:38four which means it goes from this point
  1789. 1:21:41to this point and this is the direction
  1790. 1:21:45of our vector v so it goes to
  1791. 1:21:4934 because this point is 3 0
  1792. 1:21:55and this point is 04 so xaxis is 0o x
  1793. 1:22:00coordinate and y coordinate is 4 so now
  1794. 1:22:03you can see that the direction of this
  1795. 1:22:07Vector is like
  1796. 1:22:09this while the direction of the vector v
  1797. 1:22:12was like
  1798. 1:22:14this and like in case of vector v i
  1799. 1:22:18again no longer care about where exactly
  1800. 1:22:21my Vector W stars and ends but all I
  1801. 1:22:24care is about its magnitude so the
  1802. 1:22:27length and the direction so for
  1803. 1:22:30instance I can have the same Vector in
  1804. 1:22:33here the same Vector in
  1805. 1:22:36here as long as the length the magnitude
  1806. 1:22:40is the same and the direction I am
  1807. 1:22:43dealing with the same Vector that's all
  1808. 1:22:44I care so the magnitude and the
  1809. 1:22:46direction is all that you care about all
  1810. 1:22:50right so now about the length um that's
  1811. 1:22:53uh something that you can see very
  1812. 1:22:55easily from this specific example
  1813. 1:22:57because by using the Pythagoras Theorem
  1814. 1:23:00or P Pythagorean theorem we can see very
  1815. 1:23:03quickly that as the length of this side
  1816. 1:23:06of our uh right angle
  1817. 1:23:1030° so right triangle we can see that
  1818. 1:23:12this side is three this side is
  1819. 1:23:15four which means that this side is 5
  1820. 1:23:19because 4 2 + 3^ 2 then we take the
  1821. 1:23:23square root of that square root of 25
  1822. 1:23:25and it's equal to 5 so the length or the
  1823. 1:23:29magnitude of this vector v is simply
  1824. 1:23:31equal to
  1825. 1:23:335 all right this was about this uh
  1826. 1:23:36specific vectors let's now look into the
  1827. 1:23:38uh common representation of the vectors
  1828. 1:23:41so we always use the magnitude as well
  1829. 1:23:43as the direction you know to represent
  1830. 1:23:45the vectors and they commonly are
  1831. 1:23:47represented by two different uh ways
  1832. 1:23:50let's now look into the first way that
  1833. 1:23:52the vectors can be represented and then
  1834. 1:23:54we will move on to the next one so when
  1835. 1:23:56it comes to the vector v so we saw that
  1836. 1:23:59vector v was moving from
  1837. 1:24:010 till uh to the point of 40 so we can
  1838. 1:24:07represent the vector B by 4 and
  1839. 1:24:11zero when it comes to the vector w we
  1840. 1:24:15can represent that uh Vector so Vector w
  1841. 1:24:19we can again do the parenthesis and we
  1842. 1:24:21can say that it's equal to 3 four so by
  1843. 1:24:25using the coordinates from the
  1844. 1:24:26coordinate system we can then represent
  1845. 1:24:30our uh vectors so this is just one way
  1846. 1:24:33of representing a vector another way of
  1847. 1:24:36representing these vectors is by using
  1848. 1:24:38this Square braces given that we are in
  1849. 1:24:41a two dimensional space first we will
  1850. 1:24:43mention here the four then we will
  1851. 1:24:45mention the zero in here twoo so we can
  1852. 1:24:50say three and four this is yet another
  1853. 1:24:53way of represented the vectors in a two
  1854. 1:24:56dimensional
  1855. 1:24:57space so if we were to have a
  1856. 1:25:00threedimensional space so let me
  1857. 1:25:02actually show it on a new page so if we
  1858. 1:25:05were to um if we were um to have vectors
  1859. 1:25:09in three dimensional space so we are
  1860. 1:25:11dealing with
  1861. 1:25:13R3 so we have points that can be
  1862. 1:25:16described by X Y and Z
  1863. 1:25:20so coordinate space like this so X and
  1864. 1:25:24and the Y and then the Z then every
  1865. 1:25:27point so let's say we have this Vector
  1866. 1:25:30then we had to represent it by a value
  1867. 1:25:33let's say x uh X1 y1 and Z1 or um better
  1868. 1:25:39let me actually use a different
  1869. 1:25:42letters a b and c and this would be my
  1870. 1:25:47vector v and I could also represent this
  1871. 1:25:50Vector
  1872. 1:25:51B is the same so vector v can be
  1873. 1:25:55represented as a b and c so one thing
  1874. 1:26:00that you can notice is that unlike the
  1875. 1:26:02R2 now I have three different entries
  1876. 1:26:06what we are also referring as rows and
  1877. 1:26:09we just got one column so um we can uh
  1878. 1:26:13often represent and usually that's a
  1879. 1:26:15common way of representing vectors by
  1880. 1:26:18using this um columns so columns help us
  1881. 1:26:22to represent our vectors and you can see
  1882. 1:26:26very clearly then when it comes to the
  1883. 1:26:28two dimensional space so when we have
  1884. 1:26:32R2 so then our vectors have just two
  1885. 1:26:37rows so three and four four zero like in
  1886. 1:26:40here when it comes to three dimensional
  1887. 1:26:42space we have three entries and so on so
  1888. 1:26:45the same holds of course also for for
  1889. 1:26:47instance R5 then for R5 um our vectors
  1890. 1:26:51so coordinate space can be for instance
  1891. 1:26:53x y Zed and then GMA and then let's say
  1892. 1:26:57Delta and then the coordinates uh of a
  1893. 1:27:01vector in that space can be V and then
  1894. 1:27:04arrow is equals sh and then we would
  1895. 1:27:06have uh let's say A B C D E you get the
  1896. 1:27:11idea so depending on the space the
  1897. 1:27:13coordinate space and the dimension of
  1898. 1:27:15that space then the corresponding
  1899. 1:27:17vectors can be represented accordingly
  1900. 1:27:24so the vectors are quantities that have
  1901. 1:27:27both magnitude and direction as we just
  1902. 1:27:29so distinguishing them from scalers
  1903. 1:27:32which only have magnitude so we saw that
  1904. 1:27:34the scalers got only magnitude while in
  1905. 1:27:37case of vectors we saw both for the
  1906. 1:27:39vector v and for the vector w we didn't
  1907. 1:27:42we didn't only have the magnitude so the
  1908. 1:27:44length of the vector but also the
  1909. 1:27:46corresponding
  1910. 1:27:48Direction so uh when it comes to the um
  1911. 1:27:52vectors so the this is exactly what we
  1912. 1:27:55just saw in our example a vector in a
  1913. 1:27:57two dimensional space so in
  1914. 1:28:01R2 uh can be represented by using this
  1915. 1:28:04Square braces and the corresponding
  1916. 1:28:07entries for X and Y where X is basically
  1917. 1:28:09the x coordinate in our coordinate
  1918. 1:28:12system so in our X and Y system whenever
  1919. 1:28:16you have this x and y
  1920. 1:28:19coordinate then uh this x coordinate
  1921. 1:28:22Will then describe your magnitude and
  1922. 1:28:25the y coordinate Will then describe your
  1923. 1:28:27second entry that you need to put when
  1924. 1:28:29representing your
  1925. 1:28:32vectors so here the X and Y indicate the
  1926. 1:28:36movement in the horizontal and in the
  1927. 1:28:38vertical Dimensions respectively so for
  1928. 1:28:41X's it's always the x coordinate so how
  1929. 1:28:44far you move towards the horizontal
  1930. 1:28:46Direction in here in here or independent
  1931. 1:28:49in here so always take the x coordinate
  1932. 1:28:52that is the value that you need to put
  1933. 1:28:54first and then the Y need to be put it
  1934. 1:28:56in here so indexing in vectors when it
  1935. 1:29:00comes to the um indexing the standard
  1936. 1:29:02mathematical notation uh indices in the
  1937. 1:29:05N vectors goes from I is equal to 1 to I
  1938. 1:29:09is equal to n so the um notation here
  1939. 1:29:13can be bit ambiguous so AI uh could mean
  1940. 1:29:16the E element of AI uh the a vector or
  1941. 1:29:19the each Vector in a collection so let's
  1942. 1:29:22start with a simple one and then move
  1943. 1:29:24move on to this next part so what this
  1944. 1:29:27means and what this means we will look
  1945. 1:29:29into now so uh usually uh when we have a
  1946. 1:29:35um n dimensional space we are having
  1947. 1:29:38hard time visualizing it therefore we
  1948. 1:29:40use this two dimensional space or
  1949. 1:29:42maximum three-dimensional space in order
  1950. 1:29:44to get an understanding of what these
  1951. 1:29:46vectors are so we just s examples of
  1952. 1:29:49them uh when uh creating our vectors in
  1953. 1:29:52um V and V uh and W in uh R2 and also in
  1954. 1:29:58R3 but we can have similar vectors also
  1955. 1:30:02in R4 in
  1956. 1:30:04R5 or all the way down to RN where n can
  1957. 1:30:09be 100 200 500 any number as large as
  1958. 1:30:13you want the thing is is that
  1959. 1:30:16visualizing R 4 R5 RN is very hard but
  1960. 1:30:20we can still benefit from this great
  1961. 1:30:22properties of the vectors metrices and
  1962. 1:30:25in general linear algebra in order to
  1963. 1:30:27describe different things that have more
  1964. 1:30:29than three dimensions therefore we have
  1965. 1:30:32this a bit more ambiguous notation where
  1966. 1:30:36we use r n and this n can be any real
  1967. 1:30:40number and it can be all the way to
  1968. 1:30:42Infinity so very large
  1969. 1:30:44number and uh let's say we have a vector
  1970. 1:30:47in this RN then this Vector is usually
  1971. 1:30:51described by using similar Square uh
  1972. 1:30:55brackets like before only with uh more
  1973. 1:30:58entries so like before we got just one
  1974. 1:31:01column so that's something that we
  1975. 1:31:03didn't uh change but here we have
  1976. 1:31:06instead of just two entries or three
  1977. 1:31:08entries like in the two dimensional or
  1978. 1:31:09three dimensional spaces now we have A1
  1979. 1:31:12A2 A3 all the way down to a n minus one
  1980. 1:31:18and a n so we got in total n elements in
  1981. 1:31:23our column and this describes our uh
  1982. 1:31:26single Vector so this Vector in an N
  1983. 1:31:29dimensional space this we can call also
  1984. 1:31:33a so one thing that we just saw is that
  1985. 1:31:36it was saying in our definition and
  1986. 1:31:38notation that uh we might also be
  1987. 1:31:40dealing with the E Vector in a
  1988. 1:31:43collection which means that sometimes
  1989. 1:31:46you will
  1990. 1:31:47see this while here the A1 A2 they are
  1991. 1:31:51vector themselves so here
  1992. 1:31:54we saw that these are just entries so A1
  1993. 1:31:57is a number A2 is a number A3 is a
  1994. 1:31:59number a n is just a number but it's
  1995. 1:32:02also possible uh when you have a much
  1996. 1:32:05more difficult and complicated case that
  1997. 1:32:08you got an
  1998. 1:32:09A let's write it down with a capital
  1999. 1:32:12letter A which is equal to
  2000. 1:32:17A1 or let's actually remove
  2001. 1:32:21this so we got
  2002. 1:32:24let's say
  2003. 1:32:26A1
  2004. 1:32:28A2 A3 all the way down to a n minus one
  2005. 1:32:34and a
  2006. 1:32:37n where you can already see what is
  2007. 1:32:39going on so instead of having just a
  2008. 1:32:41number as an entries instead we have
  2009. 1:32:44vectors in here so our first element is
  2010. 1:32:48actually Vector our second element is
  2011. 1:32:50actually Vector so A2 Arrow A3 Arrow all
  2012. 1:32:52the way down to a n arrow so while here
  2013. 1:32:57this can be for instance some numbers
  2014. 1:32:59let's say one one one all the way down
  2015. 1:33:01to one
  2016. 1:33:02one here we have a vector vector another
  2017. 1:33:07vector and all the way down here yet
  2018. 1:33:09another Vector where for instance let me
  2019. 1:33:13remove this
  2020. 1:33:16part where for
  2021. 1:33:19instance A1 arrow is actually equal to
  2022. 1:33:25A1 1 A1 2 A1 3 all the way down to A1 n
  2023. 1:33:34one thing that you will notice here is
  2024. 1:33:36that unlike in
  2025. 1:33:39here here I got double indices so I got
  2026. 1:33:44here a11 and then A1 2 and then a13 all
  2027. 1:33:49the way to A1 n so the first index it
  2028. 1:33:53doesn't change as I have here a one so
  2029. 1:33:57I'm writing down the index corresponding
  2030. 1:33:59to this Vector but the second index it
  2031. 1:34:04changes per entry indicating which
  2032. 1:34:07element specifically in the vector I'm
  2033. 1:34:09talking about so from the first index
  2034. 1:34:12you can identify the vector that I'm
  2035. 1:34:15referring to which is A1 and from the
  2036. 1:34:17second index you can see the
  2037. 1:34:20corresponding um entry or the volume you
  2038. 1:34:24that that um element is positioned in
  2039. 1:34:28this Vector so you can see that this
  2040. 1:34:30values for instance in the um Vector one
  2041. 1:34:34so A1 to be more specific but then it is
  2042. 1:34:37in the first position this is in the
  2043. 1:34:39second position in the third position
  2044. 1:34:41all the way down to the end position so
  2045. 1:34:45this is something that is really
  2046. 1:34:47important to understand well because
  2047. 1:34:49this notation is going to appear time
  2048. 1:34:52and time again across various
  2049. 1:34:54applications of matrices and vectors so
  2050. 1:34:57is really important to understand well
  2051. 1:34:59therefore I want to go one more time
  2052. 1:35:02through this to make sure that we are
  2053. 1:35:04clear on what this indexes represent so
  2054. 1:35:07whenever we have an index uh an a vector
  2055. 1:35:11that we want to uh represent and it's um
  2056. 1:35:14it has just um it is just a vector which
  2057. 1:35:17means that it's not a nested vector
  2058. 1:35:20vector in a vector then um we can Define
  2059. 1:35:24it by let's say a and then on top an
  2060. 1:35:26array and it's equal to and here we can
  2061. 1:35:29have A1 A2 all the way down to a n so
  2062. 1:35:35you can see what we are also referring
  2063. 1:35:37as dimension of this Vector is equal to
  2064. 1:35:41n by 1 so I got n entries and just one
  2065. 1:35:46column so n by
  2066. 1:35:49one which means that this already gives
  2067. 1:35:51me an indication that most likely this
  2068. 1:35:54A1 is a number this A2 is a number this
  2069. 1:35:57a and is a number so let's say this
  2070. 1:35:58equal to 1 2 uh three blah blah blah and
  2071. 1:36:03then here I have let's say
  2072. 1:36:07100 but if I'm dealing with the nested
  2073. 1:36:11Vector later we will see that this can
  2074. 1:36:13be represented by a matrix then um I can
  2075. 1:36:18also Define
  2076. 1:36:20this by capital letter A
  2077. 1:36:24which is a common way to refer to either
  2078. 1:36:26matrices or nested vectors and then this
  2079. 1:36:30is equal to A1 Arrow A2 Arrow A3 Arrow
  2080. 1:36:37this already sends a message to the
  2081. 1:36:39reader that we are dealing with no
  2082. 1:36:41longer U constants within a vector but
  2083. 1:36:46rather vectors in a vector and uh what
  2084. 1:36:50can we see here is that the dimension of
  2085. 1:36:53this nested vector or which we can also
  2086. 1:36:56refer to as a matrix here the number of
  2087. 1:37:00rows so the number of entries this
  2088. 1:37:02elements we can see it's equal to n but
  2089. 1:37:05then this time the number of values that
  2090. 1:37:08form these vectors is no longer one
  2091. 1:37:11because we are not dealing with just a
  2092. 1:37:13constant this is not some constant but
  2093. 1:37:16rather this is yet another Vector so
  2094. 1:37:19let's assume this Vector has a length of
  2095. 1:37:21M so let's say this has a length of M
  2096. 1:37:26then the dimension of this Matrix a is
  2097. 1:37:29equal to M so something that we will see
  2098. 1:37:32also when talking about
  2099. 1:37:34matrices so let me actually clarify this
  2100. 1:37:37bit more for better understanding let's
  2101. 1:37:40say we look into one of those um one uh
  2102. 1:37:44one other example of an entry so let's
  2103. 1:37:47say we look into this specific Vector
  2104. 1:37:49which is in the uh the third uh vector
  2105. 1:37:53within this Vector capital A so this
  2106. 1:37:58A3
  2107. 1:38:02Vector so one thing to see here already
  2108. 1:38:06is that I assumed that these vectors
  2109. 1:38:09they got M elements and keep in mind
  2110. 1:38:12that all these vectors they should be of
  2111. 1:38:13the same size so it means that I already
  2112. 1:38:16know that this specific Vector A3 has M
  2113. 1:38:21elements so m elements so I'm
  2114. 1:38:25representing this uh A3 Vector from here
  2115. 1:38:29I'm taking this out from this entire uh
  2116. 1:38:32nested a vector and I just want to
  2117. 1:38:34represent this and now unlike this
  2118. 1:38:38elements that got an arrow on the top
  2119. 1:38:41this time I will have uh constants
  2120. 1:38:45forming the A3 Vector so I no longer
  2121. 1:38:47have vectors but I have elements in it
  2122. 1:38:51so in here I will have
  2123. 1:38:54a a let me actually write down all the
  2124. 1:38:57A's but to refer and to make sure that I
  2125. 1:39:00recognize that I'm dealing with the
  2126. 1:39:02third a vector so a Tre Arrow here I
  2127. 1:39:06will put three Tre all the way here Tre
  2128. 1:39:09so they all come from the same third A3
  2129. 1:39:11Vector but then their positions is
  2130. 1:39:14different because this is let's say uh
  2131. 1:39:17one two and then all the way down
  2132. 1:39:20to Ed position
  2133. 1:39:24so this indices help us to keep track
  2134. 1:39:28what are the um position that these
  2135. 1:39:32values are taking part in the vector A3
  2136. 1:39:37errow this might seem bit complicated at
  2137. 1:39:39the moment but once we move on onto bit
  2138. 1:39:42more complex material like uh matrices
  2139. 1:39:45it will make much more sense this is bit
  2140. 1:39:47of an extra I just wanted to Showcase
  2141. 1:39:50this but this is what uh is at its core
  2142. 1:39:53and what you need to uh understand at
  2143. 1:39:55the moment to understand this concept of
  2144. 1:39:57vectors so you need to know that vectors
  2145. 1:40:00can be represented by this arrow on the
  2146. 1:40:02top so let's say Vector a and it has
  2147. 1:40:05let's say n elements then you can write
  2148. 1:40:07the square brackets and then you will
  2149. 1:40:09need to mention A1 A2 all the way to a n
  2150. 1:40:12which means that you have n different
  2151. 1:40:14entries describing your vector so you
  2152. 1:40:17have A1 which is the first element in
  2153. 1:40:19your vector A2 the second element all
  2154. 1:40:21the way to a n which is the end element
  2155. 1:40:23where here you can see for instance so
  2156. 1:40:26if I had here A3 that uh A1 is simply
  2157. 1:40:30equal to one A2 is equal to 2 A3 is
  2158. 1:40:33equal to 3 all the way to a n is equal
  2159. 1:40:36to 100 so this numbers I'm basically
  2160. 1:40:40taking and I'm representing them I'm
  2161. 1:40:43putting them in here within Square
  2162. 1:40:44braces in order to get a representation
  2163. 1:40:47of my Vector so my Vector a has all
  2164. 1:40:50these different entries and different
  2165. 1:40:52entries and it starts with one and it
  2166. 1:40:54ends with 100 this is a vector and then
  2167. 1:40:57when it comes to the vectors within
  2168. 1:40:59vectors here we need to be a bit more
  2169. 1:41:02careful CU here we not just have uh
  2170. 1:41:05constant values forming a vector but we
  2171. 1:41:08have vectors that form yet not vectors
  2172. 1:41:11so our Vector a our nested Vector a
  2173. 1:41:15which we uh later will refer as Matrix a
  2174. 1:41:20has actually entries that also are
  2175. 1:41:22vectors so we have a 1 Vector A2 Vector
  2176. 1:41:25A3 Vector they are not just constants
  2177. 1:41:27but only own they are vectors so here
  2178. 1:41:30for instance we have defined also an
  2179. 1:41:32example of it we have said let's look
  2180. 1:41:34into this third specific Vector that is
  2181. 1:41:37part of a which is A3 uh vector and uh
  2182. 1:41:41that one has M different
  2183. 1:41:45elements here we have then the index
  2184. 1:41:47referring to the which Vector from the
  2185. 1:41:50nested Vector a it is which is the third
  2186. 1:41:52one because we have taken it from here
  2187. 1:41:55but then on its own this Vector has
  2188. 1:41:57different members and different members
  2189. 1:41:59to be more specific therefore we have
  2190. 1:42:01also an index to keep track of the
  2191. 1:42:04position of this value one to up to M
  2192. 1:42:07and this can be yet another uh this time
  2193. 1:42:10it can contain some elements an example
  2194. 1:42:12of which is for instance Z 1 2 all the
  2195. 1:42:16way to let's say 500 and this can be
  2196. 1:42:20different numbers it doesn't need to be
  2197. 1:42:22ordered it doesn't need to have a
  2198. 1:42:24specific pattern they can be just random
  2199. 1:42:26numbers describing this A3 Vector so
  2200. 1:42:30hopefully this makes sense if it doesn't
  2201. 1:42:32don't worry because we are going to see
  2202. 1:42:34this time and time again I just wanted
  2203. 1:42:36to give you a brief of an intro such
  2204. 1:42:39that you can uh remember this when we
  2205. 1:42:42come uh back to bit more uh complex
  2206. 1:42:46topics like uh indexing in matrices so
  2207. 1:42:50now let's talk about special vectors and
  2208. 1:42:52operation
  2209. 1:42:53here we are going to talk about zero
  2210. 1:42:55vectors unit vectors the concept of
  2211. 1:42:57sparcity in vectors as well as vectors
  2212. 1:43:00in higher Dimensions like we just saw
  2213. 1:43:02about this n dimensional space we will
  2214. 1:43:05also talk about different operations we
  2215. 1:43:07can apply when it comes to vectors like
  2216. 1:43:09uh addition subtraction and then later
  2217. 1:43:12on in the next module we will also talk
  2218. 1:43:15about multiplication we will also be
  2219. 1:43:17looking into the properties of vector
  2220. 1:43:19addition after we have looked into some
  2221. 1:43:21detailed examples when it comes to
  2222. 1:43:23operations on
  2223. 1:43:25vectors all right so let's start with
  2224. 1:43:28the zero vectors and unit vectors when
  2225. 1:43:30it comes to zero vectors you can see
  2226. 1:43:32here already that um the zero and arrow
  2227. 1:43:36on the top it basically refers to the
  2228. 1:43:39vector like we saw before only with the
  2229. 1:43:42difference that all its members are zero
  2230. 1:43:45so you can see here that we have zero
  2231. 1:43:49and then an arrow and then underneath
  2232. 1:43:51here we have some number tree and then
  2233. 1:43:53this is described by this common
  2234. 1:43:56representation with the square braces
  2235. 1:43:58and then three different members z0 0 so
  2236. 1:44:02all zero and then it says in R
  2237. 1:44:06Tre okay so why are we doing this well
  2238. 1:44:10uh when it comes to uh different linear
  2239. 1:44:13Lal operation sometimes we just need to
  2240. 1:44:16add zero vectors or we just want to
  2241. 1:44:18create zero vectors it's just easier to
  2242. 1:44:21work with you we want to uh just create
  2243. 1:44:24an empty uh Vector we want we know the
  2244. 1:44:27length but we want to keep it empty such
  2245. 1:44:30Laton we can add something on the top or
  2246. 1:44:33knowing that when we add a zero on a
  2247. 1:44:36number the number stays the same we can
  2248. 1:44:38make use of this property to uh do
  2249. 1:44:41different um uh tricks when it comes to
  2250. 1:44:45programming in Python in SCAR or in C++
  2251. 1:44:47Etc so therefore this idea of zero
  2252. 1:44:50vectors can become very handy now one
  2253. 1:44:53thing that you need to notice here is
  2254. 1:44:55that we are not just writing down this
  2255. 1:44:57zero to emphasize we are dealing with
  2256. 1:45:00the vector but like uh before we have
  2257. 1:45:02this error on the top emphasizing that
  2258. 1:45:05we are dealing with a vector then what
  2259. 1:45:08we are doing is that we are also adding
  2260. 1:45:11the dimension of this Vector so in what
  2261. 1:45:15dimension in what space are we um uh
  2262. 1:45:18creating this zero Vector that this
  2263. 1:45:20Vector is located is it in r R 2 in RN
  2264. 1:45:24in R3 in this specific case you can see
  2265. 1:45:26that in this example the uh index that
  2266. 1:45:29we got here is three which basically
  2267. 1:45:31indicates we are dealing with a zero
  2268. 1:45:34Vector in threedimensional
  2269. 1:45:36space so in the
  2270. 1:45:39R3 uh in general we would just note this
  2271. 1:45:42by n keeping the uh notation general
  2272. 1:45:46which means that we are dealing with 0 0
  2273. 1:45:49all the way down to zero so it has n one
  2274. 1:45:53dimension in r
  2275. 1:45:57n all right so this is about zero
  2276. 1:46:00vectors it is just a way to uh make our
  2277. 1:46:03programming life easier also to use it
  2278. 1:46:05in different uh algorithms when it comes
  2279. 1:46:08to bit more advanced
  2280. 1:46:09algebra uh the next type of special
  2281. 1:46:12vectors that we will look into is this
  2282. 1:46:14unit vectors so vectors with a single
  2283. 1:46:18element equal to one and all the others
  2284. 1:46:21zero denoted as EI for the E unit Vector
  2285. 1:46:25in N dimensions are referred by unit
  2286. 1:46:28vectors
  2287. 1:46:30so uh what we mean here when it comes to
  2288. 1:46:34the unit
  2289. 1:46:35vectors um if we have for instance E1 it
  2290. 1:46:39means that we have a vector where the e
  2291. 1:46:43in this case the first element is equal
  2292. 1:46:45to one so you can see that E1 is equal
  2293. 1:46:48to 1 0 0 so in the first element we got
  2294. 1:46:53one and the remaining is zero and this
  2295. 1:46:55is really important that we are dealing
  2296. 1:46:57with vectors that contain only elements
  2297. 1:47:00of zeros and ones and the only member
  2298. 1:47:05that is equal to the only element in
  2299. 1:47:06that Vector that is equal to one is the
  2300. 1:47:08E element in the entire Vector all the
  2301. 1:47:11remaining ones are zero and you can see
  2302. 1:47:13here that the dimension is no longer
  2303. 1:47:16specified but just the um index of the
  2304. 1:47:19entry where the um uh the uh one is
  2305. 1:47:24located so let's look at another example
  2306. 1:47:27in here for instance when it comes to
  2307. 1:47:29the um uh unit Vector yet another unit
  2308. 1:47:33Vector is E2 which basically means that
  2309. 1:47:36in the second element so in the second
  2310. 1:47:40place uh the uh Vector contains one and
  2311. 1:47:44all the other members are zero so here
  2312. 1:47:46you can see Zero here it can see Zero
  2313. 1:47:48only in the second element we have one
  2314. 1:47:51and then in the E3 what we have here is
  2315. 1:47:54that the third element is one and all
  2316. 1:47:57the other ones are zero so let's
  2317. 1:47:59actually look into uh one um bigger
  2318. 1:48:04Vector uh in higher Dimension to make it
  2319. 1:48:07even more sense so first I will Define
  2320. 1:48:10and assume that we are dealing with a
  2321. 1:48:12vector in RN so in an N dimensional
  2322. 1:48:15space this gives me an idea that we are
  2323. 1:48:17dealing with um so we are not dealing
  2324. 1:48:20with nested Vector we are dealing with a
  2325. 1:48:21simple and dimensional Vector so it has
  2326. 1:48:24n rows and one column so using the
  2327. 1:48:27square braces I'm going to represent my
  2328. 1:48:30Vector so I have all these different
  2329. 1:48:32members n members C so e let's say it is
  2330. 1:48:40E5 so what does this mean it means that
  2331. 1:48:43I is equal to 5 and this I element so
  2332. 1:48:46the fifth element is equal to one and
  2333. 1:48:49all the other entries the elements in
  2334. 1:48:51this Vector are zeros so let's look into
  2335. 1:48:54this is
  2336. 1:48:56z0 0 Z I'm approaching the fifth element
  2337. 1:49:01in my Vector so it's this one this is
  2338. 1:49:04one and the remaining all zeros so this
  2339. 1:49:09is a unit Vector in an N dimensional
  2340. 1:49:12space and I'm defining it by
  2341. 1:49:15E5 because my fifth element is equal to
  2342. 1:49:18one now those are very handy when it
  2343. 1:49:22comes to some other uh techniques in
  2344. 1:49:24linear algebra and just in general think
  2345. 1:49:27about techniques like um uh row etum
  2346. 1:49:31form solving linear equation something
  2347. 1:49:34that we will see as part of the next
  2348. 1:49:36unit so many things um we can do by
  2349. 1:49:40using unit vectors unit vectors are
  2350. 1:49:42super important so you need to
  2351. 1:49:45understand this concept uh very well
  2352. 1:49:47such that later on you will understand
  2353. 1:49:49uh more advanced concepts in linear
  2354. 1:49:52algebra let now look into the topic of
  2355. 1:49:54sparsity in vectors so by definition a
  2356. 1:49:58sparse Vector is characterized by having
  2357. 1:50:00many of its entries as zero so its
  2358. 1:50:03parity pattern indicates the position of
  2359. 1:50:06a nonzero
  2360. 1:50:08entries so uh what we are basically
  2361. 1:50:10saying is that if we are dealing with a
  2362. 1:50:12vector that contains too many zeros we
  2363. 1:50:16are dealing with the sparse Vector so uh
  2364. 1:50:19this sparsity pattern indicates uh all
  2365. 1:50:22Al the positions of a nonzero elements
  2366. 1:50:26so um if we have um unit Vector it means
  2367. 1:50:31that we are already dealing with a
  2368. 1:50:33sparse uh Vector this is a concept that
  2369. 1:50:37is super important when it comes to
  2370. 1:50:38linear algebra but also in general data
  2371. 1:50:41science machine learning and AI because
  2372. 1:50:44having a spity in your vector it means
  2373. 1:50:46that you don't have much of an
  2374. 1:50:48information usually a value zero it
  2375. 1:50:50means you don't know much about that
  2376. 1:50:53specific volum and if you got just too
  2377. 1:50:56many of zeros and too few numbers which
  2378. 1:50:59do um provide information it means that
  2379. 1:51:02you are dealing with a vector that
  2380. 1:51:04doesn't provide you much information and
  2381. 1:51:06there's always a problem when it comes
  2382. 1:51:08to data science machine learning and AI
  2383. 1:51:11so sparcity is something that you need
  2384. 1:51:13to be aware of you need to know how to
  2385. 1:51:15recognize it and you also need to know
  2386. 1:51:17whe there's a problem in your specific
  2387. 1:51:19case or not so let's look into an
  2388. 1:51:22example let's say we are dealing with
  2389. 1:51:25this Vector X that has five different
  2390. 1:51:28elements so X is a vector coming from um
  2391. 1:51:32five dimensional space so we have for
  2392. 1:51:36instance an element of three the first
  2393. 1:51:38entry then we have z0 in the second and
  2394. 1:51:40third uh entries then we have an entry
  2395. 1:51:43um four which coincident also contains
  2396. 1:51:46value four and then the last element in
  2397. 1:51:49our five dimensional Vector X is equal
  2398. 1:51:52to zero
  2399. 1:51:53now what do we see here we see that the
  2400. 1:51:55majority of elements of a vector X is
  2401. 1:51:59equal to zero because we got in total
  2402. 1:52:01five
  2403. 1:52:02elements and then we got three of it
  2404. 1:52:06actually uh being equal to zero and only
  2405. 1:52:09two of them containing information like
  2406. 1:52:11equal to three and four so only two
  2407. 1:52:14elements that are not zero so non-zero
  2408. 1:52:17elements it means that 3 / to 4 which is
  2409. 1:52:20basically 60% 60% of all the entries in
  2410. 1:52:25the vector X are equal to zero so the
  2411. 1:52:3060% it means that is above half so above
  2412. 1:52:3450% 60% of all the information in this
  2413. 1:52:38Vector um the majority is simply equal
  2414. 1:52:41to zero this type of vectors we are uh
  2415. 1:52:44calling sparse vectors and sparcity is
  2416. 1:52:47really important concept uh that we need
  2417. 1:52:49to keep in mind later on
  2418. 1:52:53so uh while we can visualize vectors in
  2419. 1:52:55two and three dimensions in linear
  2420. 1:52:57algebra like we just saw in case of this
  2421. 1:53:00n dimensional vectors
  2422. 1:53:02visualizing uh the this type of higher
  2423. 1:53:05dimensional vectors becomes very
  2424. 1:53:07difficult so uh this mathematical
  2425. 1:53:10flexibility uh to work with uh this type
  2426. 1:53:14of uh information so when we can
  2427. 1:53:17represent uh information many with many
  2428. 1:53:20entries we can represent it by vector s
  2429. 1:53:23which we can actually not visualize
  2430. 1:53:25becomes very handy for complex data
  2431. 1:53:28structures for different simulations in
  2432. 1:53:30physics and much more so uh we just saw
  2433. 1:53:33in couple of examples uh how we can
  2434. 1:53:36represent vectors in a high dimensional
  2435. 1:53:38space using this Square braces and this
  2436. 1:53:41common Vector notation representation we
  2437. 1:53:44saw that in an N dimensional space we
  2438. 1:53:46could uh very easily represent this uh
  2439. 1:53:50very large Matrix or
  2440. 1:53:52vectors uh by just um using this Vector
  2441. 1:53:56representation for instance if we got a
  2442. 1:53:58vector that had any different entries
  2443. 1:54:01where n is for instance thousand so
  2444. 1:54:03let's say we have thousand then uh we
  2445. 1:54:06can
  2446. 1:54:07represent uh this uh vector or this
  2447. 1:54:11information by using common Vector
  2448. 1:54:13notation so A1 A2 all the way to a th000
  2449. 1:54:18so of course we cannot visualize this it
  2450. 1:54:21just doesn't make sense we can visualize
  2451. 1:54:23two dimensional vectors we can visualize
  2452. 1:54:25three dimensional vectors but we cannot
  2453. 1:54:28uh visualize thousand dimensional
  2454. 1:54:31vectors so Vector that comes from uh
  2455. 1:54:35r, but what we can do is still make use
  2456. 1:54:39of this very useful
  2457. 1:54:41information in order to uh do different
  2458. 1:54:44operations when and later on we will see
  2459. 1:54:47that uh this property and specifically
  2460. 1:54:50this part of linear algebra it helps us
  2461. 1:54:53to work with vectors in any number of
  2462. 1:54:55Dimensions whether thousands million
  2463. 1:54:57billions this mathematical flexibility
  2464. 1:55:00is super important for more complex data
  2465. 1:55:03structures uh for metrix multiplications
  2466. 1:55:07when for instance we are doing different
  2467. 1:55:09uh algorithms including how we can
  2468. 1:55:12represent uh very large matrices very
  2469. 1:55:15large feature spaces all this different
  2470. 1:55:18information we can represent just by
  2471. 1:55:21making use of
  2472. 1:55:22vectors coming from this specific uh
  2473. 1:55:26part of linear
  2474. 1:55:28algebra let's now finish of this module
  2475. 1:55:31by looking into some applications of
  2476. 1:55:33vectors so one common application of
  2477. 1:55:36making use of vectors is uh when we are
  2478. 1:55:39performing different operations while
  2479. 1:55:41having words and we want to count those
  2480. 1:55:44words so this is a super common
  2481. 1:55:46application of vectors and we can
  2482. 1:55:49account this words and you can even plot
  2483. 1:55:50a histogram over how often each of these
  2484. 1:55:53words appear in a document so a vector
  2485. 1:55:57of a length n for instance can represent
  2486. 1:56:00the number of times each of these words
  2487. 1:56:02in a dictionary of n words appears in a
  2488. 1:56:05document so uh just for the sake of
  2489. 1:56:08Simplicity let's assume that we got um
  2490. 1:56:11dictionary that contains only three
  2491. 1:56:13words of course in the reality uh the um
  2492. 1:56:17dictionary what we also refer often as
  2493. 1:56:20Corpus it contains much many much more
  2494. 1:56:22many words but for the Simplicity we
  2495. 1:56:25will assume that we just got three
  2496. 1:56:26different words in our dictionary so
  2497. 1:56:28that's a total now let's assume that we
  2498. 1:56:31got a document uh with these different
  2499. 1:56:33words and we want to count how many
  2500. 1:56:36times each of those words that we got in
  2501. 1:56:38dictionary actually appear in our
  2502. 1:56:40document so uh if our document is
  2503. 1:56:44described by this Vector so it contains
  2504. 1:56:47an entry of 25 2 and zero it means that
  2505. 1:56:51in our our document we got
  2506. 1:56:5625 word one in now from our dictionary
  2507. 1:57:00so in the position one two * word two
  2508. 1:57:06and zero *
  2509. 1:57:09word three so basically we have a
  2510. 1:57:13predetermined set of words in our
  2511. 1:57:15dictionary in this case three words word
  2512. 1:57:18one word two and word three and they
  2513. 1:57:21have a specific IND specific position in
  2514. 1:57:23our vector and when we are putting these
  2515. 1:57:27values in here then the machine or the
  2516. 1:57:31uh computer the program will understand
  2517. 1:57:33that if we have 25 in the first position
  2518. 1:57:36then the word one in the dictionary
  2519. 1:57:40appeared 25 times in our document
  2520. 1:57:43whereas the second word appeared only
  2521. 1:57:45two times and the last word for three
  2522. 1:57:47didn't appear at all so zero times in
  2523. 1:57:50the entire document
  2524. 1:57:52so let's look into a practical example
  2525. 1:57:55actually to make even more
  2526. 1:57:59sense so um this is by the way a common
  2527. 1:58:03practice to count different variations
  2528. 1:58:05of a word there are common application
  2529. 1:58:07in engrams large language models
  2530. 1:58:10Transformers they are just the
  2531. 1:58:11Cornerstone of many language models when
  2532. 1:58:14we want to count the words in the
  2533. 1:58:18document to understand how often the
  2534. 1:58:20word appears because this gives us a
  2535. 1:58:22idea what this document is about knowing
  2536. 1:58:24how many times the same word appears in
  2537. 1:58:26that uh document it gives us an
  2538. 1:58:29indication of the topic of uh the do
  2539. 1:58:32document also we can make use of a to do
  2540. 1:58:35sentiment analysis to understand what
  2541. 1:58:37this document is about not only in terms
  2542. 1:58:39of the topic but also is it a positive
  2543. 1:58:42is it a natural or a negative uh
  2544. 1:58:45document so to say so uh for instance if
  2545. 1:58:50we got uh the following words uh that
  2546. 1:58:53correspond to our dictionary and in our
  2547. 1:58:56dictionary we got just um let's say 6
  2548. 1:59:00different words then what we can do is
  2549. 1:59:03that we can say 3 2 1 let's say Zer 4
  2550. 1:59:09two and the corresponding words are
  2551. 1:59:12word
  2552. 1:59:14row
  2553. 1:59:16[Music]
  2554. 1:59:17number
  2555. 1:59:20horse is
  2556. 1:59:23and then
  2557. 1:59:24document what this means is that we have
  2558. 1:59:28a text what we refer as a document that
  2559. 1:59:31contains three times the word
  2560. 1:59:33word that contains two time the word row
  2561. 1:59:37contains one time the word number zero
  2562. 1:59:40times the word horse and four times the
  2563. 1:59:42word eel and two times the word
  2564. 1:59:47document so uh this is basically a
  2565. 1:59:50common way represent presenting the uh
  2566. 1:59:53frequency of the words in the
  2567. 1:59:55document let me actually give you uh
  2568. 1:59:58another example
  2569. 2:00:01and in here I want to emphasize another
  2570. 2:00:05thing the concept of stop words so uh
  2571. 2:00:09let's say I make
  2572. 2:00:12this 10 and then
  2573. 2:00:16here I say there is a three times the
  2574. 2:00:20word I
  2575. 2:00:23two times the
  2576. 2:00:25word uh
  2577. 2:00:29reading two * the word
  2578. 2:00:33library four times the word
  2579. 2:00:36book 0er * the word
  2580. 2:00:40shower and 10 times the word
  2581. 2:00:45uh so uh you can see a that in here we
  2582. 2:00:50are dealing with the document that
  2583. 2:00:52contains 10 times the word uh which is
  2584. 2:00:56what something that we refer as a stop
  2585. 2:00:58word so those are things that actually
  2586. 2:01:00don't give us too much information about
  2587. 2:01:03what the document is about because uh
  2588. 2:01:05it's just used everywhere but it is
  2589. 2:01:07appearing too often so you can see 10
  2590. 2:01:10times the most frequently appearing word
  2591. 2:01:13this is what we refer as a stop word and
  2592. 2:01:16then another thing that we can observe
  2593. 2:01:18the second thing we can observe is that
  2594. 2:01:20we are dealing most like ly with a
  2595. 2:01:22document that describes library reading
  2596. 2:01:25uh because you see the words like
  2597. 2:01:26reading you see the word like book
  2598. 2:01:29library but another word shower that is
  2599. 2:01:32totally unrelated to reading book or
  2600. 2:01:34library is appearing zero times so even
  2601. 2:01:37by looking at discounts we can already
  2602. 2:01:39get an idea what a topic of this
  2603. 2:01:41document is about so uh you can see
  2604. 2:01:45already know from this very basic
  2605. 2:01:47example where I made too many
  2606. 2:01:49assumptions regarding how small the the
  2607. 2:01:51uh dictionary should be uh you can even
  2608. 2:01:54see now how we can use discounts in our
  2609. 2:01:58dictionary from our text in order to get
  2610. 2:02:01idea about the topic of the document or
  2611. 2:02:04topic of the conversation it can be
  2612. 2:02:06topic of the uh tweets if you have a
  2613. 2:02:08tweet data it can be topic uh regarding
  2614. 2:02:12book if you have many book um uh book
  2615. 2:02:16text it can be for instance the topic of
  2616. 2:02:19the review if you got a reviews from uh
  2617. 2:02:23Amazon for instance using this count can
  2618. 2:02:26help you to get a topic regarding topic
  2619. 2:02:31from that text then you can also use it
  2620. 2:02:34to remove the stop wordss because
  2621. 2:02:35usually the stop words are the most
  2622. 2:02:37frequently P words it can also give you
  2623. 2:02:40an idea about the sentiment for instance
  2624. 2:02:42here we are dealing with natural
  2625. 2:02:43sentiment it's not positive it's not
  2626. 2:02:45negative it's just reading a book in
  2627. 2:02:47library that kind of topic so all this
  2628. 2:02:50can be super helpful when it comes to
  2629. 2:02:52natural language processing that's a
  2630. 2:02:54field where this uh text processing text
  2631. 2:02:57cing and then using that for modeling
  2632. 2:03:00purposes is what uh what plays a central
  2633. 2:03:03role it also plays a super important
  2634. 2:03:05role in the large language models in the
  2635. 2:03:07Transformer models and uh in simple
  2636. 2:03:10matters like uh back of words or uh in
  2637. 2:03:15the uh TF IDF all these they are based
  2638. 2:03:17on this idea of counting words and how
  2639. 2:03:21we can use it information and you can
  2640. 2:03:23see how vectors come into play in the
  2641. 2:03:26different applications of linear algebra
  2642. 2:03:29in data science natural language
  2643. 2:03:31processing in artificial intelligence in
  2644. 2:03:34machine learning so they are super
  2645. 2:03:39important another application of vectors
  2646. 2:03:42can be representing customer purchases
  2647. 2:03:45for example an N Vector P so let's say p
  2648. 2:03:51can record a customer purchases over
  2649. 2:03:53time with pi being the quantity or
  2650. 2:03:56dollar value of an item I now what does
  2651. 2:03:59this mean so let's say we have Vector P
  2652. 2:04:03that represents the customer purchases
  2653. 2:04:06and we are dealing with a single
  2654. 2:04:07customer and we are just saving over
  2655. 2:04:10time that information how many time this
  2656. 2:04:12customer has made purchases over
  2657. 2:04:16time so the quantity is in the um
  2658. 2:04:20dollars so the dollar value of item I
  2659. 2:04:23purchase so we are basically keeping
  2660. 2:04:25track of uh what is the value of the
  2661. 2:04:29item I that the customer has purchased
  2662. 2:04:34so what we can
  2663. 2:04:36do is we can assume that in here
  2664. 2:04:40actually it already Mak that assumption
  2665. 2:04:42it says n Vector which means that the
  2666. 2:04:45number of rows or number of um items
  2667. 2:04:49that the customer purchases is
  2668. 2:04:53n now what the um the problem says that
  2669. 2:04:59it represents is that in each
  2670. 2:05:03entry and here we have in total n
  2671. 2:05:06entries we got a dollar value of item I
  2672. 2:05:09which means that here if I have P1 P2
  2673. 2:05:14all the way to PN and here somewhere in
  2674. 2:05:16the middle I got Pi in the East position
  2675. 2:05:20it means p Pi represents the
  2676. 2:05:25value of
  2677. 2:05:28item I so for example if I'm dealing
  2678. 2:05:33with a
  2679. 2:05:34customer that buys um let's say uh
  2680. 2:05:40courses and uh the first item that the
  2681. 2:05:44customer is buying is a mathematics
  2682. 2:05:46course so I'm writing
  2683. 2:05:49mathematics course and this is the first
  2684. 2:05:52course that it buys e is by the way just
  2685. 2:05:57a um way to refer to the E purchase so
  2686. 2:06:02let's say um here somewhere in the
  2687. 2:06:04middle the um customer decides to buy a
  2688. 2:06:08deep learning course deep
  2689. 2:06:12learning
  2690. 2:06:14learning
  2691. 2:06:17course and then it continues buying uh
  2692. 2:06:20the customer continues buying courses
  2693. 2:06:22and the last course that a customer buys
  2694. 2:06:24is let's say um career
  2695. 2:06:29coaching
  2696. 2:06:31course
  2697. 2:06:33now let's say the mathematics course
  2698. 2:06:36costs uh around
  2699. 2:06:40$1,000 let's say the uh deep learning
  2700. 2:06:43course costs
  2701. 2:06:46$33,000 and then let's say the career
  2702. 2:06:48coaching service which is usually one of
  2703. 2:06:50the most apply and personalized one can
  2704. 2:06:53cost all the way to
  2705. 2:06:56$5,000 now we see that in the each
  2706. 2:07:00position this is the East position let
  2707. 2:07:02me change the color by the
  2708. 2:07:04way so let's say this is the East
  2709. 2:07:07position this is the first position and
  2710. 2:07:09this is the last position so those are
  2711. 2:07:11just
  2712. 2:07:13indices we can see that in the E
  2713. 2:07:15position we got the
  2714. 2:07:173,000 which means that the p e is equal
  2715. 2:07:21equal to
  2716. 2:07:24$3,000 so this indicates that in the
  2717. 2:07:27East
  2718. 2:07:28purchase the customer purchased deep
  2719. 2:07:31learning course and the value of that
  2720. 2:07:34item was equal to
  2721. 2:07:40$3,000 all right so now we are ready to
  2722. 2:07:43go on to next major topic which is about
  2723. 2:07:46vector addition and subtraction so we
  2724. 2:07:48are going to do some operations and
  2725. 2:07:50apply this operations two vectors so
  2726. 2:07:53let's first formally Define this ideal
  2727. 2:07:55of vector addition so uh two vectors of
  2728. 2:07:59the same size are added by adding their
  2729. 2:08:01corresponding elements the result is a
  2730. 2:08:04vector of the same size so uh let's
  2731. 2:08:08unpack this it says two vectors of the
  2732. 2:08:12same size are added by their
  2733. 2:08:14corresponding elements so here it refers
  2734. 2:08:18to two different vectors let's say
  2735. 2:08:20vector v and Vector W and it says let's
  2736. 2:08:24add them what we refer as vector
  2737. 2:08:27addition and says for that what we need
  2738. 2:08:30to do is to take all the elements of v
  2739. 2:08:33and then all the elements of w and using
  2740. 2:08:37their corresponding elements so
  2741. 2:08:40indices that helps us to understand
  2742. 2:08:43where those elements are located we are
  2743. 2:08:45using in order to add each
  2744. 2:08:47element in the vector v to the element
  2745. 2:08:51of the vector W in the same position and
  2746. 2:08:55do note that in the second part it says
  2747. 2:08:58the result is a vector of the same size
  2748. 2:09:01because we are adding two different
  2749. 2:09:03vectors of the same size it's mentioning
  2750. 2:09:07here it means if we add two different
  2751. 2:09:09vectors to the same uh that have the
  2752. 2:09:11same size we are going to end up with a
  2753. 2:09:14vector that has the same
  2754. 2:09:17size now once I go into the examples it
  2755. 2:09:20will make much more per let's quickly
  2756. 2:09:23also look into this concept of
  2757. 2:09:25substraction so on its own uh
  2758. 2:09:27substraction is very similar to this
  2759. 2:09:29idea of addition so if we have a
  2760. 2:09:31substraction let's say we have vector v
  2761. 2:09:34We substract Vector W then we are doing
  2762. 2:09:37basically uh what we just did to the
  2763. 2:09:39addition only instead of uh doing add we
  2764. 2:09:43are doing subtract so again we are just
  2765. 2:09:46uh we are just subtracting from vector v
  2766. 2:09:49Vector W they have the same size so we
  2767. 2:09:52end up having the result which is a
  2768. 2:09:55vector of the same size only one thing
  2769. 2:09:59that you can see is that this can be
  2770. 2:10:01also written as V Vector plus and then
  2771. 2:10:05minus W so we basically can represent
  2772. 2:10:09subtraction um on its own as a way of
  2773. 2:10:13adding only we take the negative so the
  2774. 2:10:16um opposite directed Vector so this will
  2775. 2:10:20make even much more
  2776. 2:10:22uh once we go on to the examples so
  2777. 2:10:24let's look into our first operation
  2778. 2:10:27example where we are adding two
  2779. 2:10:29different vectors this a basic example
  2780. 2:10:31we got just two dimensional two vectors
  2781. 2:10:34we got Vector a that has entries two
  2782. 2:10:37three and Vector B that has entries one
  2783. 2:10:40form and what we are doing is that we
  2784. 2:10:42are adding Vector a to Vector B we just
  2785. 2:10:45learned that a we need to have the same
  2786. 2:10:48size of vectors so you can see that
  2787. 2:10:50Vector a has a dimension 2 by one vector
  2788. 2:10:53B has a dimension of 2 by one so their
  2789. 2:10:56sizes is the same both they got two
  2790. 2:10:59entries only two
  2791. 2:11:02elements and at the same time we just
  2792. 2:11:04learned that what we need to do is to
  2793. 2:11:06take their corresponding elements and
  2794. 2:11:09add them to each other now what does
  2795. 2:11:11this mean it means that we take from a
  2796. 2:11:16the first element
  2797. 2:11:19two and then we take the first element
  2798. 2:11:22of the second Vector which is the B so
  2799. 2:11:25we take the two from here and one from
  2800. 2:11:28here the first element of a and the
  2801. 2:11:30first element of B and then we are
  2802. 2:11:32adding them to each other 2 + 1 is equal
  2803. 2:11:35to three and then the same holds for the
  2804. 2:11:38second and Tre so three which is the
  2805. 2:11:40second element of vector a and then four
  2806. 2:11:43which is the second element of vector B
  2807. 2:11:45we are saying 3 + 4 is = to 7 so let me
  2808. 2:11:49write it down even in a simpler manner
  2809. 2:11:51such that it will make much more sense
  2810. 2:11:54so Vector a has elements 2 three in the
  2811. 2:11:57first element we got two in the second
  2812. 2:11:59element we got three so a then we want
  2813. 2:12:04to add B which has in the first element
  2814. 2:12:07element equal to 1 and the second
  2815. 2:12:09element is equal to 4 this means that if
  2816. 2:12:12we want to add these vectors 2
  2817. 2:12:153+ 1 4 this is equal to we need to take
  2818. 2:12:20two we need to add one so this element
  2819. 2:12:24and this element and then we need to
  2820. 2:12:25take three we need to add to four so
  2821. 2:12:28this one and this one which is equal to
  2822. 2:12:312 + 1 is equal to 3 3 + 4 is equal to 7
  2823. 2:12:34so we got uh Vector
  2824. 2:12:3837 do you note that this Vector the
  2825. 2:12:41result Vector contains again two
  2826. 2:12:43elements and just one column so 2 by 1
  2827. 2:12:47so you notice that the sign that the
  2828. 2:12:49size is the same of this result
  2829. 2:12:53Vector now let's actually generalize
  2830. 2:12:55this concept before moving on to the
  2831. 2:12:57next example so if we got let's say
  2832. 2:13:03Vector
  2833. 2:13:05a that contains n elements A1 A2 all the
  2834. 2:13:10way down to a
  2835. 2:13:13n and it is
  2836. 2:13:16from n dimensional
  2837. 2:13:19space and we got Vector
  2838. 2:13:24B that also has n elements so remember
  2839. 2:13:27that they both need to have the same
  2840. 2:13:29size so B1 B2 all the way to b
  2841. 2:13:34n so they come also so B comes also from
  2842. 2:13:39n dimensional
  2843. 2:13:44space so then when we add a to B this is
  2844. 2:13:50equal to
  2845. 2:13:55A1 A2 all the way to a
  2846. 2:14:00n
  2847. 2:14:02plus B1 B2 all the way
  2848. 2:14:07to
  2849. 2:14:10BN so n by one n by one the sizes this
  2850. 2:14:14is equal
  2851. 2:14:16to let me actually use this color to
  2852. 2:14:19make it even more visible so I for the
  2853. 2:14:21first entry for my result factor I will
  2854. 2:14:26get A1 + B1 then A2 + B2 so all the way
  2855. 2:14:32down onto the end element which is a n
  2856. 2:14:40plus then me use a different color A1
  2857. 2:14:44B1
  2858. 2:14:45B2 b
  2859. 2:14:48n so you can notice is now in general
  2860. 2:14:53terms what we are doing here so we are
  2861. 2:14:55taking the A1 coming from the vector a
  2862. 2:15:00we are adding in the same
  2863. 2:15:03uh position the value that comes from
  2864. 2:15:07Vector B which is B1 we are saying take
  2865. 2:15:10the A1 Plus B1 this is the uh first
  2866. 2:15:14element so the position stays the same
  2867. 2:15:16and then in the result Vector so we take
  2868. 2:15:19all the corresponding values that are
  2869. 2:15:22have the same position in the
  2870. 2:15:24corresponding Vector first from Vector a
  2871. 2:15:26and then Vector B we are adding them and
  2872. 2:15:28this forms our new vector and this new
  2873. 2:15:31Vector will again have a size n by one
  2874. 2:15:35so you can see that a the sizes of the
  2875. 2:15:38two vectors are the same both have n
  2876. 2:15:40elements and then we are using their
  2877. 2:15:43corresponding elements to add them to
  2878. 2:15:45each other element wise and then we are
  2879. 2:15:47getting the result that has the same
  2880. 2:15:49size so n by 1 so this is a more General
  2881. 2:15:53description of how you can add two
  2882. 2:15:58vectors let's now look into this
  2883. 2:16:00specific example so we have a vector
  2884. 2:16:03with the entry 073 so this comes from R
  2885. 2:16:07three you can see so three dimensional
  2886. 2:16:09vectors the second Vector is 1 2 0 and
  2887. 2:16:13then the final result is 1 193 so how we
  2888. 2:16:16got this we took zero we added 1 7 we
  2889. 2:16:20added two and then three we added zero
  2890. 2:16:23so you can see all these
  2891. 2:16:25elements element Y and then this is
  2892. 2:16:28equal to 0 + 1 is 1 7 + 2 is 9 and then
  2893. 2:16:313 + 0 is 3 exactly what we got here so
  2894. 2:16:35again the same sizes and the result is
  2895. 2:16:38from the same
  2896. 2:16:39size so quite
  2897. 2:16:41straightforward now when it comes to the
  2898. 2:16:43vector substruction what are we doing
  2899. 2:16:46that um so what are we doing here so we
  2900. 2:16:50are doing kind of very similar thing we
  2901. 2:16:53are taking this element one we are
  2902. 2:16:56subtracting the other one in this first
  2903. 2:16:59element then we are taking the nine in
  2904. 2:17:01the second position and subtracting this
  2905. 2:17:05again from the second position of the
  2906. 2:17:06second vector and we are putting in here
  2907. 2:17:091 and then 1 - 1 is = to 0 9 y - 1 is =
  2908. 2:17:13to 8 so we get result Factor 08 like in
  2909. 2:17:17here and you can see that the sizes stay
  2910. 2:17:20the same so also in this case let's
  2911. 2:17:22write more General um this idea of
  2912. 2:17:25subtraction if we got a vector
  2913. 2:17:29a
  2914. 2:17:31from RN so n dimensional space and it
  2915. 2:17:34can be represented by A1 A2 all the way
  2916. 2:17:38down to a n so it has n elements n by
  2917. 2:17:43one and then we got
  2918. 2:17:47B also from RN so coming from the n
  2919. 2:17:51dimensional space which means that it
  2920. 2:17:53got n elements so B1 B2 all the way down
  2921. 2:17:57to BN again with the same size n by one
  2922. 2:18:02then a minus B is simply equal
  2923. 2:18:08to a A1 let me actually use the same
  2924. 2:18:13colors to make it easier to
  2925. 2:18:18follow so let me first draw my Square
  2926. 2:18:23races and then here I will use blue for
  2927. 2:18:28a and then red for the uh color for
  2928. 2:18:32second Vector which is
  2929. 2:18:34B here I will use black
  2930. 2:18:44minus then given that the same size
  2931. 2:18:48should be for the result Vector I I
  2932. 2:18:50already know that I expect n different
  2933. 2:18:53elements for this and then
  2934. 2:18:56here I'm taking
  2935. 2:19:01this first element that comes from
  2936. 2:19:04Vector
  2937. 2:19:05a I substracting from this the first
  2938. 2:19:09element that comes from Vector B so
  2939. 2:19:11element wise subtraction B1 and I'm
  2940. 2:19:15already getting the result for the first
  2941. 2:19:18element in my result Vector so you can
  2942. 2:19:22see A1 minus B1 I'm taking this element
  2943. 2:19:26and this element and subtracting them
  2944. 2:19:28from each other to get A1 minus B1 and
  2945. 2:19:31then the same holds for all the other
  2946. 2:19:34values only coming from different
  2947. 2:19:37elements from Vector
  2948. 2:19:40a subtracting from this the
  2949. 2:19:44corresponding values element Wise from
  2950. 2:19:47the vector B so B2 B3 all the way to a n
  2951. 2:19:52so you can see that in my result
  2952. 2:19:55Vector a vector minus B Vector in the
  2953. 2:19:58first element I get A1 minus B1 then A2
  2954. 2:20:02- B2 then A3 - B3 in the third element
  2955. 2:20:05all the way down to the end element
  2956. 2:20:07which is equal to oh this should be b a
  2957. 2:20:11n minus
  2958. 2:20:12BN so um this already should makes uh
  2959. 2:20:16much more sense so every time we take
  2960. 2:20:18the element in the same position from
  2961. 2:20:20one vector than the other we subtract
  2962. 2:20:23from each other in order to get the
  2963. 2:20:24corresponding element in the final
  2964. 2:20:29Vector all right so let's now uh before
  2965. 2:20:33moving on to the
  2966. 2:20:34properties um I want to to show you um
  2967. 2:20:39this only in a coordinate space so what
  2968. 2:20:43this means in terms of visualization in
  2969. 2:20:45a coordinate
  2970. 2:20:47space so uh let's say we have a
  2971. 2:20:52coordinate
  2972. 2:20:58space this is my Y
  2973. 2:21:05axis this is my x axis
  2974. 2:21:09so this is X and the Y and this is my
  2975. 2:21:14Center so 0
  2976. 2:21:160 and what I'm doing here
  2977. 2:21:21is
  2978. 2:21:22simply I want to have Vector a let's say
  2979. 2:21:27this is just um Vector a simple one with
  2980. 2:21:31the coordinates um let's say four and
  2981. 2:21:35minus
  2982. 2:21:372 and I got Vector
  2983. 2:21:40B let me use a different
  2984. 2:21:44color Vector
  2985. 2:21:47B that has coordinates
  2986. 2:21:51let's
  2987. 2:21:53say
  2988. 2:21:56minus 4 and
  2989. 2:22:00four so let's actually visualize them
  2990. 2:22:03let's first start with D Vector a uh
  2991. 2:22:07which has a x value of
  2992. 2:22:10four three
  2993. 2:22:12four one 2 three and
  2994. 2:22:15four and the Y value minus 2 so this
  2995. 2:22:25is my Vector
  2996. 2:22:30a and let's now visualize the vector B
  2997. 2:22:35so minus 4 and
  2998. 2:22:374 which means
  2999. 2:22:43that let me
  3000. 2:22:45actually extend
  3001. 2:22:48this this is minus 4 so the x coordinate
  3002. 2:22:52is min - 4 so it should be here and then
  3003. 2:22:56the y coordinate is four so 1 2 3 and 4
  3004. 2:23:01it's this one which means that my Vector
  3005. 2:23:06B is this
  3006. 2:23:13one all
  3007. 2:23:16right so you can see now that the vector
  3008. 2:23:20a is in here and the vector B is in
  3009. 2:23:23here now what I want to do is to add
  3010. 2:23:27these two vectors to each other so what
  3011. 2:23:30I want to do is to take this Vector
  3012. 2:23:34a and add to
  3013. 2:23:37this the vector B which
  3014. 2:23:42is is equal to 4 - 4 = 0 and then - 2 +
  3015. 2:23:484 is = 2 so zero and then two it
  3016. 2:23:57is z and
  3017. 2:24:03two
  3018. 2:24:11two so this is my result Vector so now
  3019. 2:24:18when we are clear on how we can in
  3020. 2:24:20vector s how we can perform these
  3021. 2:24:21different operations and what it means
  3022. 2:24:24in practice when it comes to looking at
  3023. 2:24:26the vectors in a cordan space and adding
  3024. 2:24:29them or subtracting them we are ready to
  3025. 2:24:31look into the properties of vector
  3026. 2:24:35additions so this is something that will
  3027. 2:24:37definitely seem familiar to you uh from
  3028. 2:24:40pre-algebra where we are basically using
  3029. 2:24:43all these properties that we already
  3030. 2:24:45know that holds for uh numeric values
  3031. 2:24:48for the scalers that being transferred
  3032. 2:24:50to this Vector space so we are going to
  3033. 2:24:54talk about this four different
  3034. 2:24:56properties that a vectors have the first
  3035. 2:24:58one is the cumulative property which
  3036. 2:25:01says that if we add a vector a to Vector
  3037. 2:25:05B then this is the same as adding a
  3038. 2:25:08vector B to Vector a so basically the
  3039. 2:25:11order of the vectors doesn't really
  3040. 2:25:13matter when it comes down to adding them
  3041. 2:25:16so formally A + B is equal to B+ a for
  3042. 2:25:19any vectors A and B of the same size
  3043. 2:25:23then we have associative property which
  3044. 2:25:26says A + B + C is equal to a + b + C we
  3045. 2:25:33can write both As A + B + C now what
  3046. 2:25:37does this mean we know from pre-algebra
  3047. 2:25:39that this parenthesis means first do
  3048. 2:25:42this addition and then do the the rest
  3049. 2:25:45of operations in here it basically says
  3050. 2:25:47if you add a to the B first and then you
  3051. 2:25:51add the C is the same as first you add B
  3052. 2:25:55to the C and then on the top of that you
  3053. 2:25:57add D Vector a so then the third
  3054. 2:26:02property is addition of zero vectors
  3055. 2:26:04which says if we add a zero Vector to
  3056. 2:26:06Vector a then this is equal to adding a
  3057. 2:26:10vector zero to a and this is equal to
  3058. 2:26:13Vector a so adding the zero Vector has
  3059. 2:26:16basically no impact on the vector
  3060. 2:26:19whatsoever
  3061. 2:26:21then the final property is subtracting a
  3062. 2:26:23vector from itself which means if we
  3063. 2:26:25take the vector we substract the same
  3064. 2:26:27Vector from itself so a minus a and we
  3065. 2:26:30get a zero Vector so a minus a is equal
  3066. 2:26:34to zero vector and this heals the zero
  3067. 2:26:37Vector now let's look into each of those
  3068. 2:26:39properties one by one and let's uh look
  3069. 2:26:42into specific examples uh in some cases
  3070. 2:26:45we will prove this on the example that
  3071. 2:26:47we have to make this Concepts much more
  3072. 2:26:50clear so let's start with this
  3073. 2:26:52cumulative property of vector additions
  3074. 2:26:56so we want to see whether A+ B is equal
  3075. 2:26:58to B + a so let's say we have a vector
  3076. 2:27:03a that has coordinates or magnitude and
  3077. 2:27:08direction that is equal to one and two
  3078. 2:27:12then we have a vector uh let's say
  3079. 2:27:18B that has a magnitude and direction of
  3080. 2:27:22- 2 and
  3081. 2:27:253 so the first thing that we want to
  3082. 2:27:28check is indeed whether the A + B is
  3083. 2:27:32equal to B +
  3084. 2:27:34a so therefore let's first calculate
  3085. 2:27:37this part and then we will calculate
  3086. 2:27:39this part that I will Define by one and
  3087. 2:27:41two and we will see whether we are
  3088. 2:27:43indeed having the same value the same
  3089. 2:27:46vector or not so let's see so we have
  3090. 2:27:48here a
  3091. 2:27:50so A + B which is the first value that
  3092. 2:27:55we want to calculate a plus b is = to 1
  3093. 2:28:012+ -
  3094. 2:28:0323 and we learned before that this is
  3095. 2:28:06simply equal 2 take this value and then
  3096. 2:28:09add this one so 1 + - 2 and then 2 +
  3097. 2:28:153 so this gives us a vector 1 - 2 is =
  3098. 2:28:20to - 1 and 2 + 3 is = 5 so we get that A
  3099. 2:28:25+ B is = to -1 5 this Vector now let's
  3100. 2:28:30look at the second quantity so B Vector
  3101. 2:28:33B plus Vector a this is equal to - 2 3 +
  3102. 2:28:391 2 and this is equal to - 2 + 1 and
  3103. 2:28:44then 3 + 2 this gives us - 2 + 1 is =
  3104. 2:28:49to- 1 and 3 + 2 is equal to 5 so we can
  3105. 2:28:53already see from here that the quantity
  3106. 2:28:57one is indeed equal to quantity 2 which
  3107. 2:29:01proves that indeed the A + B is equal to
  3108. 2:29:05B+ a what this basically means is that
  3109. 2:29:09adding two different vectors the
  3110. 2:29:11direction or the order is not important
  3111. 2:29:14whether you add a on the top of the b or
  3112. 2:29:16B to a it doesn't matter at the end is
  3113. 2:29:19the same and actually you can also see
  3114. 2:29:21it if you uh combine this or if you do
  3115. 2:29:25this in more general terms so let's say
  3116. 2:29:28if we
  3117. 2:29:29have a vector a which is equal to in an
  3118. 2:29:33N dimensional space A1 A2 up to a n so
  3119. 2:29:39it has n by one dimension and you have a
  3120. 2:29:42vector B with the same size from the
  3121. 2:29:46same RN
  3122. 2:29:48Dimension and it has element B1 B2 up to
  3123. 2:29:52BN and the dimension is equal to M by1
  3124. 2:29:56then if we calculate first
  3125. 2:29:59A+
  3126. 2:30:01B and this is equal to Simply A1 + B1 A2
  3127. 2:30:07+ B2 up to a n +
  3128. 2:30:12BN and if you calculate the second uh
  3129. 2:30:16amount which is B+ a
  3130. 2:30:20this is equal to B1 + A1 B2 + A2 up to
  3131. 2:30:27BN + a n you can see that A1 + B1 is
  3132. 2:30:35equal to B1 + A1 simply from prealgebra
  3133. 2:30:39you know that if those are all constants
  3134. 2:30:41for instance 2 + 3 is equal 3 + 2 in the
  3135. 2:30:45same way A2 + B2 is = to B2 + A2 and
  3136. 2:30:50then here up to a n + BN is equal to BN
  3137. 2:30:55+ a n what this means is that all these
  3138. 2:30:58elements they are basically the same
  3139. 2:31:01which means that we already have a proof
  3140. 2:31:04so we get this proof and we can see that
  3141. 2:31:07even for the general term independent
  3142. 2:31:10what this Vector a is what this Vector B
  3143. 2:31:12is that a + b is equal to B + a
  3144. 2:31:20this is exactly what we saw before in
  3145. 2:31:23the first property which is called
  3146. 2:31:24commutative property of the vectors that
  3147. 2:31:27a plus b is equal to B+ a now let's move
  3148. 2:31:30on to the other property which is called
  3149. 2:31:32associative property of the vectors now
  3150. 2:31:35what this property does and says is that
  3151. 2:31:38a plus b so first we do this plus C is
  3152. 2:31:41equal to a + b + C and this is then
  3153. 2:31:46equal to a + b + C now let's then see um
  3154. 2:31:50this specific property on an actual
  3155. 2:31:54example so what this basically says is
  3156. 2:31:57that if we have this example where a is
  3157. 2:32:00equal to actually I had this before let
  3158. 2:32:03me simply just remove this part let's
  3159. 2:32:07then add our third Vector which is C and
  3160. 2:32:11let's call it let's say it has a
  3161. 2:32:14representation of four and
  3162. 2:32:17five then the IDE behind this property
  3163. 2:32:21is that what we need to prove here that
  3164. 2:32:25A + B within the parenthesis plus C is
  3165. 2:32:29equal to
  3166. 2:32:34a
  3167. 2:32:43plus B+
  3168. 2:32:46C and then this is equal to a plus b
  3169. 2:32:52plus C so let's see actually whether
  3170. 2:32:55this is indeed true for this specific
  3171. 2:32:57case now this should come very intuitive
  3172. 2:33:01so I'm going to do it very
  3173. 2:33:02quickly so first we have this quantity
  3174. 2:33:05this one then we have this one and the
  3175. 2:33:07third one let's do it very quickly so A
  3176. 2:33:11+
  3177. 2:33:12B plus
  3178. 2:33:15C is equal to
  3179. 2:33:20one Tu
  3180. 2:33:24plus and then we had C so it is
  3181. 2:33:30simply 4
  3182. 2:33:32five and then this is equal to we saw
  3183. 2:33:36before when doing this that we were
  3184. 2:33:38getting
  3185. 2:33:391 - 2 2 + 3 and then we add this four
  3186. 2:33:46five this is simply equal to 1 - 2 is
  3187. 2:33:52-1 and 2 + 3 is
  3188. 2:33:565 + 4
  3189. 2:34:005 now given that it doesn't really
  3190. 2:34:02matter no longer that we have uh here
  3191. 2:34:05parenthesis or not this basically means
  3192. 2:34:09that this volue is simply equal
  3193. 2:34:14to -1 + 4 so here -1 + 4 here 5 +
  3194. 2:34:215 so this is then equal to three and
  3195. 2:34:26then
  3196. 2:34:2610 all
  3197. 2:34:29right let's then now quickly do the
  3198. 2:34:33second amount which says first add the
  3199. 2:34:36vector B to Vector
  3200. 2:34:39C and only then add the vector a on the
  3201. 2:34:42top what this means is that we need to
  3202. 2:34:45take one two this is Vector a and we
  3203. 2:34:47will only add this once we have added D
  3204. 2:34:50minus 23 the vector B plus to the Vector
  3205. 2:34:5645 okay
  3206. 2:34:58so we can see that we are just leaving
  3207. 2:35:01this in here let's first add this two
  3208. 2:35:04minus
  3209. 2:35:072 + 4 3 +
  3210. 2:35:125 so this gives us 1
  3211. 2:35:162+ - 2 + 4 is uh 2 and then 3 + 5 is 8
  3212. 2:35:22so this gives
  3213. 2:35:24us let me remove this
  3214. 2:35:30calculations so this gives us 1 + 2 is =
  3215. 2:35:34to 3 and then 2 + 8 is equal to 10 okay
  3216. 2:35:40great so now we got already the quantity
  3217. 2:35:441 being equal to quantity 2 let's check
  3218. 2:35:47whether this is all equal to this one it
  3219. 2:35:50should already be um something that you
  3220. 2:35:53see now given that um we know just from
  3221. 2:35:56mathematics that parentheses doesn't
  3222. 2:35:58really matter when it comes to the
  3223. 2:35:59scalers and adding two vectors is
  3224. 2:36:02basically very close to this idea of
  3225. 2:36:04addited property um of the edited
  3226. 2:36:07property of the scalers but just let's
  3227. 2:36:10quickly do it to be 100% sure so when we
  3228. 2:36:13take this Vector a to the B and to the C
  3229. 2:36:16we had all this this is equal to one
  3230. 2:36:19want to added to minus 2 three and then
  3231. 2:36:24added this to four and five now what
  3232. 2:36:27this is equal
  3233. 2:36:29to let me actually write this in bit
  3234. 2:36:32shorter way such that it can be all fit
  3235. 2:36:35in in the small place so 1 2 + - 2 3 + 4
  3236. 2:36:445 this is equal to basically 1 - 2 + + 4
  3237. 2:36:50and then 2 + 3 +
  3238. 2:36:525 now what is this
  3239. 2:36:59number 1 - 2 + 4 is simply equal to 1 -
  3240. 2:37:032 is = to -1 and then + 4 is equal to 3
  3241. 2:37:07so first element is three 2 + 3 + 5 is
  3242. 2:37:10equal to 5 + 5 which is equal to 10
  3243. 2:37:14perfect so now we get the confirmation
  3244. 2:37:16that indeed a + b plus c C is = to A + B
  3245. 2:37:21+ C is = to A + B +
  3246. 2:37:26C so let's quickly also look into this
  3247. 2:37:29addition of zero vector and the
  3248. 2:37:31subtracting a vector from itself
  3249. 2:37:32properties and uh the detailed
  3250. 2:37:35explanation of this or example of this I
  3251. 2:37:37will leave it to you so when it comes to
  3252. 2:37:39this A+ um 0 is equal to 0 + a is equal
  3253. 2:37:43to a so this property let's say if a is
  3254. 2:37:47equal to this 23 and then we are adding
  3255. 2:37:51on this a plus some zero Vector which
  3256. 2:37:55basically means take two three and then
  3257. 2:37:58added the same size of zero Vector you
  3258. 2:38:01can see that this is the same as adding
  3259. 2:38:04this zeros on these values now what do
  3260. 2:38:08we get we get that this is equal to 2 +
  3261. 2:38:120 is 2 and then 3 + 0 is
  3262. 2:38:15three there we go so we already see very
  3263. 2:38:18quickly that it doesn't really matter
  3264. 2:38:21whether we add a zero Vector to this
  3265. 2:38:23original a vector or not we in all cases
  3266. 2:38:27it just adding a zero Vector has no
  3267. 2:38:29effect and seeing from the commutative
  3268. 2:38:32property that a plus b is equal to B+ a
  3269. 2:38:35we already know that if um a + 0 is
  3270. 2:38:38equal to uh a and is equal to this then
  3271. 2:38:42also 0 + a will be the same and we can
  3272. 2:38:47see indeed that we just saw that a a + 0
  3273. 2:38:50is simply equal to a so we basically
  3274. 2:38:52have quickly proven all
  3275. 2:38:54this now when it comes to the
  3276. 2:38:56subtracting Vector from itself I think
  3277. 2:38:59this is a very nice one just to see how
  3278. 2:39:01we um uh take the same vector and
  3279. 2:39:04subtract from that value and we get zero
  3280. 2:39:07and this is very similar to working with
  3281. 2:39:09just real numbers in the same way as 3
  3282. 2:39:12minus 3 is equal to Z also when we have
  3283. 2:39:15a vector consisting of the scalers like
  3284. 2:39:18a is equal 2
  3285. 2:39:2123 in the same manner if we take this a
  3286. 2:39:25and we subtract it from itself so A Min
  3287. 2:39:27- A then what we will get is 23 - 23 and
  3288. 2:39:33this will give us 2 - 2 is 0 and then 3
  3289. 2:39:36- 3 is zero so we get a vector zero so
  3290. 2:39:39zero
  3291. 2:39:41Vector so now when we are clear on how
  3292. 2:39:44we can perform different operations on
  3293. 2:39:45our vectors and also we know uh what are
  3294. 2:39:48the prop properties of uh adding and
  3295. 2:39:51subtracting uh different vectors we are
  3296. 2:39:54ready to move on to a bit more advanced
  3297. 2:39:56topics so uh in this module we are going
  3298. 2:39:58to discuss this idea of scalar
  3299. 2:40:01multiplication we're going to look into
  3300. 2:40:03the example how uh what happens and how
  3301. 2:40:06we can do the uh Vector multiplication
  3302. 2:40:09with the scalar then we are going to uh
  3303. 2:40:11look into the span of vectors what it
  3304. 2:40:14means to have a sp of vectors uh what is
  3305. 2:40:17this IDE of linear combination and the
  3306. 2:40:19relationship between the span and linear
  3307. 2:40:21combination and the unit vectors then we
  3308. 2:40:24are going to look into the application
  3309. 2:40:26of scalar Vector multiplication in audio
  3310. 2:40:29scaling uh example and then finally we
  3311. 2:40:32are going to finish off this module by
  3312. 2:40:34looking into the length of a vector and
  3313. 2:40:36a DOT product and we are going to uh go
  3314. 2:40:39back to this idea of distance
  3315. 2:40:42understanding vector magnitude and
  3316. 2:40:44understanding Vector
  3317. 2:40:46l so let's get started now before we
  3318. 2:40:49look into this idea of span and linear
  3319. 2:40:51combination I quickly wanted to look
  3320. 2:40:54into this idea of scalar multiplication
  3321. 2:40:56and the um specific definition of it so
  3322. 2:41:00formally the scalar multiplication
  3323. 2:41:02involves multiplying each component of a
  3324. 2:41:05vector by scalar value effectively
  3325. 2:41:07scaling the vector's magnitude so what
  3326. 2:41:10do I mean here let's say we have a
  3327. 2:41:13vector and I will write it in the
  3328. 2:41:16general terms to keep everything General
  3329. 2:41:18so let's see we have a vector a let me
  3330. 2:41:21pick up my pen a and this Vector a is
  3331. 2:41:26from n dimensional space so it is from
  3332. 2:41:30RN and it can be represented by A1 A2 up
  3333. 2:41:35to a
  3334. 2:41:36n and I have this magnitude um of a
  3335. 2:41:41vector and now I want to scale this uh
  3336. 2:41:45Vector for which I know the magnitude
  3337. 2:41:47and the direction I want to scale it
  3338. 2:41:49with a scaler and we learned before that
  3339. 2:41:51the scaler is just a number so um scaler
  3340. 2:41:55in this case I will be uh referring it
  3341. 2:41:58to uh by C so c will be my scaler and uh
  3342. 2:42:02this comes from R which means that it's
  3343. 2:42:05a real
  3344. 2:42:06number let me actually use a different
  3345. 2:42:10color to make it easier to
  3346. 2:42:13follow okay so my scaler will be with
  3347. 2:42:16the color uh red so C and C comes from
  3348. 2:42:23R
  3349. 2:42:25so what do I mean by scalar
  3350. 2:42:27multiplication I mean that I want to
  3351. 2:42:29find what is
  3352. 2:42:32this c
  3353. 2:42:35times
  3354. 2:42:37a this is what we mean by scalar
  3355. 2:42:41multiplying with Vector now what does
  3356. 2:42:44this definition say it says when we are
  3357. 2:42:47multiplying scalar we Vector so the
  3358. 2:42:50scalar multiplication meaning
  3359. 2:42:51multiplying Vector with the scalar it
  3360. 2:42:54involves multiplying each component of a
  3361. 2:42:57vector by a scalar volume so if we
  3362. 2:43:00translate it to this specific example it
  3363. 2:43:03means
  3364. 2:43:04that this
  3365. 2:43:06amount so this amount is equal
  3366. 2:43:16to taking C and multiply find it with
  3367. 2:43:20each
  3368. 2:43:21element of this Vector so each component
  3369. 2:43:25of vector and what are the components of
  3370. 2:43:27my Vector the A1 A2 a up to the point of
  3371. 2:43:31a n so all these
  3372. 2:43:33components so that means that the first
  3373. 2:43:35element of this new Vector the scalar
  3374. 2:43:39multiplication result will be C *
  3375. 2:43:44A1 C * A2
  3376. 2:43:49dot dot dot so all this middle elements
  3377. 2:43:51and at the end again c times and then a
  3378. 2:43:57n and then in both cases of course the
  3379. 2:44:01number of elements doesn't change so the
  3380. 2:44:03so the number of rows of my Vector
  3381. 2:44:06doesn't change it's n so here also n and
  3382. 2:44:09then number of columns is the same so
  3383. 2:44:11it's just a column Vector so one
  3384. 2:44:15column so what we see here is that we go
  3385. 2:44:18from a 1 to C * A1 we go from A2 to C C
  3386. 2:44:23* A2 up to the a n transforms into C * a
  3387. 2:44:29n so we see very easily that I keep all
  3388. 2:44:33the elements from this Vector I take
  3389. 2:44:35them in here and instead what I'm doing
  3390. 2:44:37is that I'm multiplying every element
  3391. 2:44:40from this vector by the scaler
  3392. 2:44:44C so this is exactly what this
  3393. 2:44:46definition says and let's actually go
  3394. 2:44:50ahead and do a Hands-On example with
  3395. 2:44:54some real numbers to have this um method
  3396. 2:44:58and to have this uh definition very
  3397. 2:45:00clear in our mind because we are going
  3398. 2:45:02to make use of this fundamental
  3399. 2:45:04operation scalar multiplication on and
  3400. 2:45:07on in the upcoming lectures and just in
  3401. 2:45:09general in your journey in any applied
  3402. 2:45:13sciences so this is an example of scalar
  3403. 2:45:16multiplication uh here what we are doing
  3404. 2:45:18is that we want to multiply this Vector
  3405. 2:45:21C so in this case the vector is defined
  3406. 2:45:25by a letter C and then on the top we can
  3407. 2:45:27see the arrow indicating that this is
  3408. 2:45:29the vector now and here we refer the
  3409. 2:45:32scalar by a letter K we are saying we
  3410. 2:45:36want to perform scalar multiplication
  3411. 2:45:38which means that we want to
  3412. 2:45:40multiply the uh a vector C by the scaler
  3413. 2:45:45K so how we can do that so what we want
  3414. 2:45:49is to multiply K by C and we just
  3415. 2:45:52learned that for that what we need to do
  3416. 2:45:56let me write this
  3417. 2:45:57over so this equal to minus 2 multiply
  3418. 2:46:04it by 4 - 3 this is my Vector so this is
  3419. 2:46:09the K and this is the C this is equal to
  3420. 2:46:13so I take my
  3421. 2:46:15scaler and I multiply it with the each
  3422. 2:46:18of the ele element of the C so - 2 * 4
  3423. 2:46:21and then - 2 *
  3424. 2:46:25-3 so - 2 * 4 is = to - 8 and then - 2 *
  3425. 2:46:32- 3 so- minus it goes away it becomes a
  3426. 2:46:35plus and 2 * 3 is 6 so my end result the
  3427. 2:46:39K * C is equal to - 8 6 this is my final
  3428. 2:46:45result so let's quickly also do yet
  3429. 2:46:49another example and this one is a unique
  3430. 2:46:52one because it's relating to this idea
  3431. 2:46:54of U multiplying something with a zero
  3432. 2:46:59uh which is something that we also uh
  3433. 2:47:01know from a high school that when we
  3434. 2:47:03multiply number let's say seven by zero
  3435. 2:47:06we are getting zero and here in this
  3436. 2:47:09example the uh problem is describe the
  3437. 2:47:13effect of a scalar multiplication by
  3438. 2:47:15zero on any Vector which means
  3439. 2:47:19what we are doing is that in this
  3440. 2:47:21example is we want to know what is this
  3441. 2:47:24result
  3442. 2:47:25of any Vector let's say Vector uh C so
  3443. 2:47:29we will use the same example C only this
  3444. 2:47:32time instead of multiplying it with
  3445. 2:47:34scalar k equal to minus 2 our scalar
  3446. 2:47:36will be zero which means that c is equal
  3447. 2:47:39to 4 - 3 and then K is now equal to zero
  3448. 2:47:43and we want to find out what is this K *
  3449. 2:47:47C let me actually write down the K with
  3450. 2:47:50a different
  3451. 2:47:58color k is equal to zero so what we want
  3452. 2:48:02to find out is K * and then
  3453. 2:48:05C and this is that equal
  3454. 2:48:12to0 so I'm taking the
  3455. 2:48:15k0 times then I'm taking each of the
  3456. 2:48:19elements of C which is four and then
  3457. 2:48:22minus 3 and I know that when multiplying
  3458. 2:48:25the number with is 0 it gives me 0o
  3459. 2:48:28which means that I end up with 0 here 0
  3460. 2:48:31* 4 is 0 0 * - 3 is also 0 so I end up
  3461. 2:48:35with a zero Vector now this gives me an
  3462. 2:48:40idea already that I can make a general
  3463. 2:48:43conclusion that independent of the type
  3464. 2:48:47of vector that I have independ and what
  3465. 2:48:49are this values in my C uh if I have any
  3466. 2:48:53Vector C and I'm multiplying it with
  3467. 2:48:58zero then this will always give me a
  3468. 2:49:01vector of zero because all the members
  3469. 2:49:05of this final Vector will be just zeros
  3470. 2:49:10so if for instance the C comes from uh
  3471. 2:49:15let's say r n so it has n different
  3472. 2:49:18elements it comes from n dimensional
  3473. 2:49:20space then my final result of 0 * C so
  3474. 2:49:27this zero Vector this one so zero that
  3475. 2:49:31this one will come also from RN so you
  3476. 2:49:35will be having a vector so 0
  3477. 2:49:40* c will then be equal to z0 blah blah
  3478. 2:49:45blah blah zero so n time zeros
  3479. 2:49:49so this is then the idea of multiplying
  3480. 2:49:52so scaling a vector with zero and this
  3481. 2:49:56is our example two all right so let's
  3482. 2:50:01now move on on to our application of
  3483. 2:50:04scalar vectal multiplication and then
  3484. 2:50:06after this we will go back to this idea
  3485. 2:50:08of linear combinations and
  3486. 2:50:10dispense so in this specific application
  3487. 2:50:13we have a scalar Vector multiplication
  3488. 2:50:15and we are looking into application of
  3489. 2:50:17audio scaling
  3490. 2:50:19so the scalar Vector multiplication
  3491. 2:50:21audio processing uh this can change the
  3492. 2:50:23volume for instance of an audio signal
  3493. 2:50:25without altering its content so um you
  3494. 2:50:29might have noticed that um when uh when
  3495. 2:50:33you are listening to video you can
  3496. 2:50:35simply increase the volume of that video
  3497. 2:50:38or decrease it but you will notice that
  3498. 2:50:40the content doesn't change you are just
  3499. 2:50:42increasing the volume or decreasing it
  3500. 2:50:44even on the TV when you are watching a
  3501. 2:50:46show you are increasing The Voice or
  3502. 2:50:48decreasing
  3503. 2:50:49now what you're basically doing behind
  3504. 2:50:51and this is super interesting is that
  3505. 2:50:53behind the scenes what is happening is
  3506. 2:50:55that there is simply um audio that um
  3507. 2:51:00contains that show and the audio of that
  3508. 2:51:03show is being multiplied with a scaler
  3509. 2:51:06and that scale is simply the volume
  3510. 2:51:08scale if you scale it in such way that
  3511. 2:51:12you want to decrease the volume so the
  3512. 2:51:15audio will then have a lower volume then
  3513. 2:51:18you are simply multiplying it uh your
  3514. 2:51:21vector containing the audio information
  3515. 2:51:24in such way that those newer volume
  3516. 2:51:27indications they will be they will be
  3517. 2:51:30containing lower
  3518. 2:51:31numbers hope this makes sense let's look
  3519. 2:51:33into the example this make uh this will
  3520. 2:51:36definitely clear this out so um let's
  3521. 2:51:39assume we have an a vector a that
  3522. 2:51:42represents the audio signal and we want
  3523. 2:51:46to multiply Vector a a by scalar B to
  3524. 2:51:50adjust the volume so B is some sort of
  3525. 2:51:53number it can be so B comes from R so is
  3526. 2:51:59a real number while
  3527. 2:52:01a is simply a vector given that it
  3528. 2:52:04doesn't mentioning here I'm assuming
  3529. 2:52:06that a comes from RN so it comes from r
  3530. 2:52:10n dimensional space so imagine of a as
  3531. 2:52:14this Vector A1 A2 blah blah blah blah to
  3532. 2:52:19a n and each of these values it
  3533. 2:52:22basically describes uh an uh the audio
  3534. 2:52:25signal so it represents um uh an amount
  3535. 2:52:29so it contains an amount that represents
  3536. 2:52:31the audio signal of your uh video or uh
  3537. 2:52:35your uh
  3538. 2:52:37show and then the b in this case for
  3539. 2:52:40instance in this example you can see
  3540. 2:52:42that the B is then uh equal to for
  3541. 2:52:45instance 1.2 1 / 2 or B is equal to Min
  3542. 2:52:49- 1 / 2 so you can see that b is equal
  3543. 2:52:53to 1 / 2 which basically is a fensive of
  3544. 2:52:56saying that b is equal to 0.5 or B can
  3545. 2:53:01be equal to minus1 / 2 which is minus
  3546. 2:53:060.5 now then it says then the B * a
  3547. 2:53:10which basically means multiplying our um
  3548. 2:53:15scalar
  3549. 2:53:16beta by the Vector containing the audio
  3550. 2:53:20signal a so this B * a is perceived as
  3551. 2:53:24the same audio signal but at the lower
  3552. 2:53:27volume now why lower because you can see
  3553. 2:53:30that b is equal to 0.5 or minus 0.5 it
  3554. 2:53:34means that once you take all these
  3555. 2:53:37elements of your a and you multiply it
  3556. 2:53:40with a number that is smaller than one
  3557. 2:53:42in this case 0.5 then all these numbers
  3558. 2:53:45will decrease which means that also your
  3559. 2:53:48audio volume will
  3560. 2:53:51decrease so let me actually uh show you
  3561. 2:53:55an
  3562. 2:53:56example so let's say our talk show is
  3563. 2:54:00very short and you know the audio
  3564. 2:54:02variation is very low you have a vector
  3565. 2:54:06a that is quite small it comes from a
  3566. 2:54:10three dimensional space so R Tre and it
  3567. 2:54:13has numbers like three uh six and then
  3568. 2:54:16five so 3x1 vector and then we have our
  3569. 2:54:22audio adjustment scalar beta which is
  3570. 2:54:25equal to
  3571. 2:54:260.5 now when we take the beta we're
  3572. 2:54:29multiply it by our audio
  3573. 2:54:31signal then what we
  3574. 2:54:34do
  3575. 2:54:36times is clear so times what we are
  3576. 2:54:40doing is that we are simply taking all
  3577. 2:54:44the elements of our a so Three 6 and
  3578. 2:54:47five and what we are doing is that we
  3579. 2:54:50are multiplying it by
  3580. 2:54:520.5 0.5 and 0.5 or you can also say 1 /
  3581. 2:54:582 so what this is equal is that 3 * 0.5
  3582. 2:55:02is
  3583. 2:55:031.5 6 * 0.5 is 3 and then 5 * 0.5 is
  3584. 2:55:102.5 and you can see that all this
  3585. 2:55:12numbers 1.5 3 and 2.5 they are smaller
  3586. 2:55:17and specifically two times times less
  3587. 2:55:19than all the original values in the um
  3588. 2:55:22original audio so original audio is a
  3589. 2:55:27which was 3 6 and 5 and the new audio
  3590. 2:55:32the the scaled one is so audio scaled so
  3591. 2:55:38B * a is equal to
  3592. 2:55:411.5 3 and
  3593. 2:55:432.5 so you can clearly see this
  3594. 2:55:46transformation where this element three
  3595. 2:55:49is larger than 1.5 6 is larger than
  3596. 2:55:52three and then the last element five is
  3597. 2:55:54larger than 2.5 which means that this
  3598. 2:55:57audio
  3599. 2:55:59audio is much at a higher volume so the
  3600. 2:56:05volume two times
  3601. 2:56:08higher than this
  3602. 2:56:16audio so this is basically the idea of
  3603. 2:56:20uh applying scalar multiplication to our
  3604. 2:56:23audio pre-processing I will leave the
  3605. 2:56:25other example to you that will show that
  3606. 2:56:27when your scaler is equal to minus 0.5
  3607. 2:56:31you again will end up with the lower
  3608. 2:56:34volume only that time the volume will be
  3609. 2:56:36much much lower than the original one so
  3610. 2:56:39now that we know how we can perform
  3611. 2:56:41scale multiplication in theory as well
  3612. 2:56:44as we have looked into an example how we
  3613. 2:56:46can do it in terms of the numbers and
  3614. 2:56:47multiply apping them and we have also
  3615. 2:56:50seen uh applying SK multiplication in
  3616. 2:56:53practice uh so we have seen in this
  3617. 2:56:56audio processing stage the uh
  3618. 2:56:59multiplication process we are ready to
  3619. 2:57:02look into the visualization of it this
  3620. 2:57:04will help us to get a better
  3621. 2:57:07understanding on uh what exactly happens
  3622. 2:57:10when we are scaling different vectors
  3623. 2:57:13let's look actually in the following
  3624. 2:57:14example so let's assume we have a vector
  3625. 2:57:18oh let me remove
  3626. 2:57:22that so let's usum we have a vector and
  3627. 2:57:27the vector is let me get a color this
  3628. 2:57:31one for instance a vector a and this
  3629. 2:57:35Vector a consists of elements one and
  3630. 2:57:38two so where does this Vector Li the
  3631. 2:57:43vector is with um one so here in our
  3632. 2:57:47coord system this is our xaxis this is
  3633. 2:57:50our y AIS and here we got uh let me
  3634. 2:57:53actually pick another color let's say
  3635. 2:57:56black
  3636. 2:57:59one and then we got one and then two
  3637. 2:58:04right this is two this is one so it is
  3638. 2:58:06this one so the line that we get here it
  3639. 2:58:10is this one so this is our Vector
  3640. 2:58:14a now let's assume I want to multiply
  3641. 2:58:18my Vector a so I want to scale my Vector
  3642. 2:58:21a by a constant Tree by scalar tree so I
  3643. 2:58:25have a scaler let's say I call K and
  3644. 2:58:28this
  3645. 2:58:29k a different number let's say k is
  3646. 2:58:33equal to
  3647. 2:58:35three so what I wanted to do is to
  3648. 2:58:38perform a scale of multiplication so I
  3649. 2:58:40want to obtain K multiplied by a and we
  3650. 2:58:45learned that this is simply equal to
  3651. 2:58:49three
  3652. 2:58:51times and
  3653. 2:58:53then one
  3654. 2:58:55two and then this is equal
  3655. 2:59:01to 3 * 1 3 * 2 which is equal to 3 and
  3656. 2:59:08then
  3657. 2:59:09six so let's also visualize this scaled
  3658. 2:59:13uh
  3659. 2:59:14Vector so let me pick this yellow color
  3660. 2:59:18this will be our scaled Vector so we
  3661. 2:59:21have done scale multiplication and we
  3662. 2:59:23are going to visualize that so we have
  3663. 2:59:26three and six so this is three 1 2 three
  3664. 2:59:30and this is
  3665. 2:59:32six so we have this
  3666. 2:59:34point so you should already see what is
  3667. 2:59:37going on
  3668. 2:59:38here
  3669. 2:59:40so we
  3670. 2:59:43got 3A
  3671. 2:59:47here so you can see that this part is
  3672. 2:59:50our Vector a and this longer one is 3 a
  3673. 2:59:54and even visually you can see that this
  3674. 2:59:57longer Vector is simply the three times
  3675. 3:00:00of the shorter Vector so we got this and
  3676. 3:00:05then if you add on the top of this the
  3677. 3:00:07same three times you will then end up
  3678. 3:00:11with
  3679. 3:00:13the
  3680. 3:00:15original so scaled version of that
  3681. 3:00:22so basically this is a this is a this is
  3682. 3:00:25a we combine three different so we scale
  3683. 3:00:28a three times and we simply get a three
  3684. 3:00:32times longer version with the same
  3685. 3:00:35direction so you can see that when we
  3686. 3:00:37are scaling even visually it makes sense
  3687. 3:00:40so we are scaling our Vector a three
  3688. 3:00:43times and we are just getting that
  3689. 3:00:45Vector so we are transforming
  3690. 3:00:48oh let me remove
  3691. 3:00:55this so
  3692. 3:00:58basically we are taking this vector and
  3693. 3:01:02we are scaling it up to this
  3694. 3:01:06point if I would do it only two times
  3695. 3:01:10then it would be something like
  3696. 3:01:14this or one and a half times it would be
  3697. 3:01:18something like this so only half of
  3698. 3:01:24it so now this should make much more
  3699. 3:01:27sense let us actually do yet another
  3700. 3:01:29example to uh make sure that we are
  3701. 3:01:32clear on this visualizations because we
  3702. 3:01:34are going to make use of it when uh
  3703. 3:01:36looking into this idea of linear
  3704. 3:01:38combination in a span so let's say we
  3705. 3:01:42have a vector B and this Vector B has
  3706. 3:01:46elements zero and three
  3707. 3:01:48so let's visualize and uh plot this
  3708. 3:01:51Vector so it contains elements Z zero
  3709. 3:01:55and three so zero and three so this is
  3710. 3:01:59the X element and the Y element on the Y
  3711. 3:02:02AIS we can see this is three which means
  3712. 3:02:04that our Vector B is this
  3713. 3:02:08Vector all right perfect so this is our
  3714. 3:02:11B let's now multiply so scale our Vector
  3715. 3:02:15B by scaler t Q so let's say we want to
  3716. 3:02:20get 2
  3717. 3:02:22*
  3718. 3:02:24B so what is this amount this is equal
  3719. 3:02:28to 2 * 2 times and I'm simply taking
  3720. 3:02:31each of those elements zero and then
  3721. 3:02:34three
  3722. 3:02:37so this is then equal to 2 * 0 is 0 and
  3723. 3:02:40then 2 * 3 is equal to
  3724. 3:02:436 so this is my new scaled Vector 2 *
  3725. 3:02:47time B Vector this one so let's
  3726. 3:02:50visualize this the xais value is zero so
  3727. 3:02:54we are still here and then the y- axis
  3728. 3:02:57value is six so what is sixth this thing
  3729. 3:03:02all right so you already should see that
  3730. 3:03:05this is very similar what we had before
  3731. 3:03:08so this is 2
  3732. 3:03:11B all right so this all uh should make
  3733. 3:03:15sense uh also we learned as part of the
  3734. 3:03:18um High School when visualizing
  3735. 3:03:20different plots so this is quite similar
  3736. 3:03:22to this idea of having Y is equal to X
  3737. 3:03:25and then scaling it getting like Y is
  3738. 3:03:27equal to 2x so in this case only we know
  3739. 3:03:31exactly where the vector starts and ends
  3740. 3:03:34uh so we have a much more specific
  3741. 3:03:38definition instead of having all this
  3742. 3:03:40infinite number of points on the
  3743. 3:03:42line but the idea stays the same so we
  3744. 3:03:45are taking this vector and we are then
  3745. 3:03:48scaling it two times so we get 2 B
  3746. 3:03:51vector and I could do the same only
  3747. 3:03:55instead what I could also do is I could
  3748. 3:03:57do like uh 0.5 or 1 / 2 * B so I take
  3749. 3:04:02the half of it which means I would get
  3750. 3:04:04this
  3751. 3:04:06vector or I could multiply it with minus
  3752. 3:04:09one so
  3753. 3:04:12minus - 1 * B so I was scale with minus1
  3754. 3:04:17and and then I will simply get the
  3755. 3:04:19negative
  3756. 3:04:21version of
  3757. 3:04:23my original Vector so this thing this
  3758. 3:04:27would be minus b or min-1 * B so this is
  3759. 3:04:32basically the idea of uh scaling
  3760. 3:04:35multiplication when visualizing it in
  3761. 3:04:37our coordinate system cartisian
  3762. 3:04:40coordinate system and now when we know
  3763. 3:04:42all this we are ready to move on on this
  3764. 3:04:45idea of linear combin
  3765. 3:04:48and now when we know all this we are
  3766. 3:04:50ready to move on on this idea of linear
  3767. 3:04:54combination so let's now formally Define
  3768. 3:04:56this ideal linear combinations a linear
  3769. 3:04:59combination of vectors A1 up to a m
  3770. 3:05:02using scalers B1 up to BM or what we
  3771. 3:05:05also refer as beta 1 to Beta m is the
  3772. 3:05:09vector beta 1 * A1 Plus up to Beta M * a
  3773. 3:05:14m and the scalers are called the
  3774. 3:05:17coefficient
  3775. 3:05:18of linear
  3776. 3:05:19combination and any Vector B in N
  3777. 3:05:23Dimensions can be expressed as a linear
  3778. 3:05:26combination of the standard unit vectors
  3779. 3:05:28E1 up to n the coefficients in this
  3780. 3:05:31combination are then the entries of B
  3781. 3:05:34itself well this is whole bunch of
  3782. 3:05:37information uh let's unpack them one by
  3783. 3:05:40one firstly um I want to mention about
  3784. 3:05:43this m so far we have seen this idea of
  3785. 3:05:45n so I just wanted P to experiment with
  3786. 3:05:49a different one just to ensure that we
  3787. 3:05:51are clear that you can use any source of
  3788. 3:05:54identifier to describe the size of your
  3789. 3:05:58um uh number of vectors that you got and
  3790. 3:06:02uh in this case we got M different
  3791. 3:06:05vectors because so far we were using
  3792. 3:06:07this n in order to describe the size of
  3793. 3:06:10a vector and now we are no longer
  3794. 3:06:12talking about the size of a vector but
  3795. 3:06:14the number of vectors therefore I
  3796. 3:06:16specifically didn't use use the letter N
  3797. 3:06:18so here m is simply the number of
  3798. 3:06:24vectors so don't confuse this with this
  3799. 3:06:27thing where we were plotting this and we
  3800. 3:06:29were saying this A1 A2 up to a n because
  3801. 3:06:33in here we basically mean that we are
  3802. 3:06:35dealing with some Vector a and this has
  3803. 3:06:39n different elements whereas in here we
  3804. 3:06:42are already moving from this idea of one
  3805. 3:06:45vector and now we are talking about mve
  3806. 3:06:47multiple vectors so we have M different
  3807. 3:06:50vectors they all look like kind of this
  3808. 3:06:53only with bit more complex indexing that
  3809. 3:06:56we also saw
  3810. 3:06:58before all right but we will learn this
  3811. 3:07:01um that's not an issue I just wanted to
  3812. 3:07:04mention this to ensure we are at the
  3813. 3:07:06same page so then let's move on to this
  3814. 3:07:09idea of using scalers beta 1 till beta M
  3815. 3:07:14so it's a common uh practice in linear
  3816. 3:07:17algebra in just in general in
  3817. 3:07:19mathematics but also definitely in data
  3818. 3:07:22science statistics and in artificial
  3819. 3:07:23intelligence to use beta 1 as a way to
  3820. 3:07:27describe the coefficient so what do you
  3821. 3:07:30mean by coefficient it is just a scalar
  3822. 3:07:32so it's just a constant or a number so
  3823. 3:07:35in this case for instance this beta 1
  3824. 3:07:38can be 0.5 beta 1 can be uh two bet one
  3825. 3:07:43can be let's say 100 it just describes
  3826. 3:07:46how much we are multiplying scaling this
  3827. 3:07:49Vector A1 so so far we have done a lot
  3828. 3:07:53of scal and multiplication already lot
  3829. 3:07:56of details there and we have seen
  3830. 3:07:58different times different scalers that
  3831. 3:07:59we use we can use um zero as a scaler we
  3832. 3:08:02can use any other number as long as it's
  3833. 3:08:05a real number so this beta 1 should
  3834. 3:08:09belong uh in the a real number space so
  3835. 3:08:13it's a real number and of course the
  3836. 3:08:15same holds for uh all the betas so we
  3837. 3:08:19have M different vectors which means we
  3838. 3:08:20are going to have M different scalers
  3839. 3:08:23because each of those vectors we are
  3840. 3:08:25going to multiply with their
  3841. 3:08:27corresponding or respective scalers so
  3842. 3:08:31beta one is basically the scaler uh or
  3843. 3:08:34the um uh coefficient that we are using
  3844. 3:08:38to
  3845. 3:08:40scale a one maybe I can actually write
  3846. 3:08:44this down on a new page such that we can
  3847. 3:08:46save this as a SL Light page for you
  3848. 3:08:49let's write it down so what do we have
  3849. 3:08:51as this idea of linear combination so a
  3850. 3:08:54linear combination simply involves
  3851. 3:08:57taking several vectors uh to go from
  3852. 3:09:00this uh formal definition to more
  3853. 3:09:02practical uh terms so we got this
  3854. 3:09:06A1 A2 up to
  3855. 3:09:10a and what we want to do is to take the
  3856. 3:09:13linear combination of this m different
  3857. 3:09:16vectors so we got m is the number of
  3858. 3:09:21vectors and to get a linear combination
  3859. 3:09:25we need to uh scale each of those
  3860. 3:09:28vectors which means that we need to have
  3861. 3:09:32this different scalers let's say beta
  3862. 3:09:361 for
  3863. 3:09:38A1 and then plus beta 2 for A2 so each
  3864. 3:09:43time we are scaling each of those
  3865. 3:09:45vectors where beta 1 is the uh scaler or
  3866. 3:09:49the coefficient of the vector A1 and we
  3867. 3:09:53are multiplying we are performing scalar
  3868. 3:09:56multiplication of our scalar beta 1 with
  3869. 3:09:59the vector A1 and then we are adding to
  3870. 3:10:02this our beta 2 which is the coefficient
  3871. 3:10:06corresponding to the vector A2 and then
  3872. 3:10:08adding beta 3 * A3 and then dot dot dot
  3873. 3:10:12so all these different uh vectors up to
  3874. 3:10:15the point of beta
  3875. 3:10:17M time a
  3876. 3:10:21m and all this so A1 A2 up to a those
  3877. 3:10:27are all vectors belonging to the
  3878. 3:10:31m space so those are all vectors coming
  3879. 3:10:35from the um M dimensional
  3880. 3:10:39space so um in
  3881. 3:10:43here this is the linear combination of
  3882. 3:10:47our
  3883. 3:10:47M different vectors and the uh beta
  3884. 3:10:531 beta 2 up to Beta M those are all
  3885. 3:11:01constants so those are scalers or real
  3886. 3:11:05numbers that belong to R so those are
  3887. 3:11:10real
  3888. 3:11:12numbers all right so now when we are
  3889. 3:11:14clear on that let's also unpack this
  3890. 3:11:16idea of coefficients so the scalers are
  3891. 3:11:19called the coefficients of linear
  3892. 3:11:20combination so basically all this
  3893. 3:11:24members so beta 1 beta 2 of two beta M
  3894. 3:11:31that belong to real number
  3895. 3:11:34space they are
  3896. 3:11:38called
  3897. 3:11:42coefficients this is what we are
  3898. 3:11:43referring as coefficients and this
  3899. 3:11:45coefficients this IDE and name is super
  3900. 3:11:48important because you will see this time
  3901. 3:11:50and time again appearing in your uh very
  3902. 3:11:52basic machine learning models or some
  3903. 3:11:55other applications of linear algebra
  3904. 3:11:57because the end goal is always to find
  3905. 3:11:59these coefficients so these coefficients
  3906. 3:12:02those are numbers that we are using to
  3907. 3:12:05scale these different vectors and uh the
  3908. 3:12:08idea of coefficients is very Central
  3909. 3:12:11because those are numbers that Define
  3910. 3:12:14how exactly we are combin ining all
  3911. 3:12:18these different vectors because this
  3912. 3:12:20beta 1 beta 2 Beta 3 they can be
  3913. 3:12:22different numbers real numbers and every
  3914. 3:12:25time when we are choosing these
  3915. 3:12:27coefficients or these betas we will then
  3916. 3:12:30end up with a different combination of
  3917. 3:12:33these vectors so we are basically mixing
  3918. 3:12:37all these different vectors and the way
  3919. 3:12:39we mix it and how we will mix it it will
  3920. 3:12:42depend on the values of this beta 1 beta
  3921. 3:12:452 Beta 3 up to Beta m so these
  3922. 3:12:48coefficients so therefore coefficients
  3923. 3:12:50are super important and they Define the
  3924. 3:12:53end results from our linear
  3925. 3:12:56combination so any Vector B in N
  3926. 3:13:00Dimensions can be expressed as a linear
  3927. 3:13:03combination of standard unit vectors E1
  3928. 3:13:06up to n so when looking into this um
  3929. 3:13:09idea of unit vectors uh we saw already
  3930. 3:13:14what this E1 is what is E2 is up to e n
  3931. 3:13:19and we saw that E1 is for instance if
  3932. 3:13:22it's from an N dimensional
  3933. 3:13:24space and it says from n
  3934. 3:13:27dimensions then E1 simply means 1 0 0
  3935. 3:13:32dot dot dot dot Z then E2 means 0 1 Z
  3936. 3:13:37dot dot dot dot zero so we already saw
  3937. 3:13:39this this is not something new that we
  3938. 3:13:41are seeing so 0 Z blah blah blah and
  3939. 3:13:44then one at the end and what this
  3940. 3:13:47definition basically says is that any
  3941. 3:13:51Vector b as long as the B comes from n
  3942. 3:13:55dimensional space we can represent this
  3943. 3:13:59by using this uh unit vectors and by
  3944. 3:14:04linearly combining
  3945. 3:14:05them so this is yet another part of this
  3946. 3:14:08definition and we are going to by the
  3947. 3:14:11way um go through each of the parts of
  3948. 3:14:13this definition one by one going to each
  3949. 3:14:16of the examp examples as well as
  3950. 3:14:18visualizing them so now I just want to
  3951. 3:14:20quickly unpack all the parts in this
  3952. 3:14:23definition before moving on to step by
  3953. 3:14:25step examples and
  3954. 3:14:27explanation so this is about this linear
  3955. 3:14:30combination of any n dimensional uh
  3956. 3:14:33Vector B that we can uh create by using
  3957. 3:14:37a linear combination of these unit
  3958. 3:14:39vectors I will come to this in a bit so
  3959. 3:14:42then the final part of this definition
  3960. 3:14:45is that the coefficient in this
  3961. 3:14:48combination are the entries of B
  3962. 3:14:51itself so it says that the coefficients
  3963. 3:14:56so beta 1 up to Beta m in this linear
  3964. 3:14:59combination that we can create are the
  3965. 3:15:02entries of B
  3966. 3:15:05itself so we will come to this section
  3967. 3:15:08once we are done with the first part so
  3968. 3:15:11first let's have a good understanding of
  3969. 3:15:13what this linear combination is and also
  3970. 3:15:17touch base and we will also formally
  3971. 3:15:19Define the idea of span and after that
  3972. 3:15:22we will move on on uh representing and
  3973. 3:15:26expressing any Vector B in N Dimension
  3974. 3:15:29Space by using standard unit vectors E1
  3975. 3:15:32up to e n and this idea of coefficients
  3976. 3:15:35and then entries of B so let's start
  3977. 3:15:38with the first one so let's assume we
  3978. 3:15:41have two different
  3979. 3:15:43vectors we have Vector a
  3980. 3:15:47and this Vector a is equal to one
  3981. 3:15:512 so let's plot
  3982. 3:15:54this one and two in our coordinate space
  3983. 3:15:58that is this one which means that our
  3984. 3:16:00Vector a is this
  3985. 3:16:03one and let's assume that we have a
  3986. 3:16:07vector
  3987. 3:16:10B and this Vector
  3988. 3:16:13B is equal to Z
  3989. 3:16:1803 so 0 is here and then three is here
  3990. 3:16:22which means that our Vector B is this
  3991. 3:16:25one this is Vector
  3992. 3:16:27B now I want to create a linear
  3993. 3:16:31combination of this Vector a and Vector
  3994. 3:16:35B so we just learned from the formal
  3995. 3:16:38definition that in order to do so I need
  3996. 3:16:41a beta
  3997. 3:16:431 to
  3998. 3:16:45multiply the vector
  3999. 3:16:58a and then I need beta 2 which is the
  4000. 3:17:01coefficient corresponding to to my
  4001. 3:17:03second Vector in order to multiply the
  4002. 3:17:06second Vector which is
  4003. 3:17:08B Vector B okay so I'm getting the
  4004. 3:17:11linear combination of A and B by taking
  4005. 3:17:15any beta 1 and beta 2 which are real
  4006. 3:17:18numbers so beta 1 and beta 2 belong to R
  4007. 3:17:24so they are real numbers and then I'm
  4008. 3:17:26getting a linear combination of the two
  4009. 3:17:29so let's look into a few examples of a
  4010. 3:17:31linear combination of vector A and B
  4011. 3:17:35depending on the different choice of the
  4012. 3:17:37coefficients like beta 1 and beta 2 so
  4013. 3:17:41example one is that beta 1 is equal to
  4014. 3:17:45zero and then beta beta 2 is equal to Z
  4015. 3:17:49Now what is the linear combination of A
  4016. 3:17:52and B when my coefficients beta 1 and
  4017. 3:17:54beta 2 both are zero it just means that
  4018. 3:17:57I'm
  4019. 3:17:59getting 0
  4020. 3:18:05time
  4021. 3:18:08A
  4022. 3:18:12Plus 0 times
  4023. 3:18:19B which is of
  4024. 3:18:27course 0 * 1 0 *
  4025. 3:18:332
  4026. 3:18:35plus and then multiplying Vector B with
  4027. 3:18:38a scaler zero which is 0 * 0 0 * 3 so
  4028. 3:18:43let's quickly do this what this value is
  4029. 3:18:46this is equal to 0 * 1 is 0 0 * 2 is
  4030. 3:18:520 0 * 0 is equal to 0 0 * 3 is equal to
  4031. 3:18:570 and this is then equal to 0 + 0 0 0 +
  4032. 3:19:030 is0 so I'm basically getting a vector
  4033. 3:19:08zero all right so this is then equal to
  4034. 3:19:14zero so this equal to vector is
  4035. 3:19:20zero so I can also say that this vector
  4036. 3:19:26or it's actually a point so this
  4037. 3:19:30point is simply a linear combination of
  4038. 3:19:34these two
  4039. 3:19:35vectors now this is a super basic case
  4040. 3:19:38let's look at another case when our in
  4041. 3:19:41our second example the beta 1 and beta 2
  4042. 3:19:43so our coefficients they are actually
  4043. 3:19:46not zero there are some other nonzero
  4044. 3:19:49real
  4045. 3:19:58numbers so in this example I will then
  4046. 3:20:02take beta 1 = to 3 and then beta 2 is =
  4047. 3:20:06to
  4048. 3:20:092 and then what I will do is that I will
  4049. 3:20:13take actually I will take the um minus
  4050. 3:20:16two
  4051. 3:20:18then I can also get rid of one of the
  4052. 3:20:20elements and I can get actually a zero
  4053. 3:20:22for one of the elements I will show you
  4054. 3:20:23in a bit so then the linear combination
  4055. 3:20:28of A and B using these coefficients beta
  4056. 3:20:311 and beta 2 where beta 1 isal to 3 and
  4057. 3:20:33beta 2 is equal to minus 2 is then equal
  4058. 3:20:37to so this
  4059. 3:20:42amount this
  4060. 3:20:45amount is equal =
  4061. 3:20:482 3
  4062. 3:20:51* 1
  4063. 3:20:542 and then
  4064. 3:20:57plus we got - 2
  4065. 3:21:04* 0 and three now what does this give
  4066. 3:21:10us 3 * 1 is = 3 3 * 2 is = 6 plus and
  4067. 3:21:17then - 2 * 0 is = to
  4068. 3:21:200 and then - 2 * 3 is = - 6 so you might
  4069. 3:21:25have already noticed why I picked the
  4070. 3:21:27beta 2 equal to minus 2 I wanted these
  4071. 3:21:29two numbers to actually cancel each
  4072. 3:21:32other so you see because 6 + - 6 is
  4073. 3:21:36equal to Z so what do I get in my final
  4074. 3:21:38result as a linear combination of these
  4075. 3:21:40two vectors I get 3 + 0 so 3 + 0
  4076. 3:21:51so 3 + 0 and then 6 + -
  4077. 3:21:576 and this gives me 3 + 0 is 3 6 + - 6
  4078. 3:22:02is zero there we go so this is my linear
  4079. 3:22:06combination of the vector A and B when
  4080. 3:22:10using the coefficients equal to 3 and
  4081. 3:22:12minus 2 respectively so this value is
  4082. 3:22:16actually = to three and zero in this
  4083. 3:22:20case all right so let me actually clean
  4084. 3:22:23this up because I also want to visualize
  4085. 3:22:26this idea and then we will go uh back to
  4086. 3:22:29this uh linear combination let just
  4087. 3:22:32summarize uh what we got before moving
  4088. 3:22:35on to the plotting part so if we simply
  4089. 3:22:37take a and we add to this B so this is
  4090. 3:22:41the first case so this is as you might
  4091. 3:22:44have already guessed this is also l your
  4092. 3:22:46combination here we are saying take 1 *
  4093. 3:22:49a and take a 1 * B and this is yet in
  4094. 3:22:54our linear combination here the beta 1
  4095. 3:22:57is equal to 1 and then beta 2 is equal
  4096. 3:23:00to 1 so this linear combination gives us
  4097. 3:23:04a vector that is 1 + 0 is = to 1 and
  4098. 3:23:08then 2 + 3 is = 5 this is our first
  4099. 3:23:13linear combination when the beta 1 and
  4100. 3:23:15beta 2 is equal to one this is a basic
  4101. 3:23:18case so doesn't require too much
  4102. 3:23:20explanation here we have seen already
  4103. 3:23:22this let's now look into the other
  4104. 3:23:25example that we saw when we use uh the
  4105. 3:23:28zeros as our coefficient so that is 0 *
  4106. 3:23:33A+ 0 * B then this gave
  4107. 3:23:38us 0 0 this was our second linear
  4108. 3:23:43combination when beta 1 and beta 2 were
  4109. 3:23:46both equal to
  4110. 3:23:48zero and then the third linear
  4111. 3:23:50combination that we saw was that 3 *
  4112. 3:23:55A+ - 2 * B this gave
  4113. 3:24:01us 3 and zero this was our third linear
  4114. 3:24:05combination where beta 1 was three and
  4115. 3:24:07then beta 2 was minus
  4116. 3:24:102 so so then the linear combination of
  4117. 3:24:14these two vectors is basically
  4118. 3:24:17all the possible combinations of these
  4119. 3:24:19two vectors that I can get when scaling
  4120. 3:24:23or when multiplying these two different
  4121. 3:24:26vectors by different sorts of uh vector
  4122. 3:24:29by different sorts of scalars so in all
  4123. 3:24:33these different cases what I'm simply
  4124. 3:24:34doing is I'm taking different sorts of
  4125. 3:24:36coefficients beta 1 and beta 2 and then
  4126. 3:24:40I'm getting the linear combination of
  4127. 3:24:42these two vectors we saw that in the
  4128. 3:24:44simple case when we take a and we had to
  4129. 3:24:47B so basically the coefficients are
  4130. 3:24:48equal to 1 so 1 * a + 1 * B then the
  4131. 3:24:52corresponding linear combination is
  4132. 3:24:54equal to one and five it means that we
  4133. 3:24:57are getting this vectors so one and five
  4134. 3:24:59is in here which means that we are
  4135. 3:25:01getting this one this Vector if we get
  4136. 3:25:04if we take the zero as a scal so beta 1
  4137. 3:25:06and beta 2 are both equal to zero then
  4138. 3:25:09the linear combination of these two
  4139. 3:25:10vectors is simply the vector zero which
  4140. 3:25:13means that it is this point then if if
  4141. 3:25:16we take the linear combination using
  4142. 3:25:18three and minus 2 as coefficients then
  4143. 3:25:20we are getting this so 0o and three so
  4144. 3:25:24one two and three this is three then
  4145. 3:25:26this is our linear
  4146. 3:25:28combination I can also take any other uh
  4147. 3:25:33like scaled version of my B and of my a
  4148. 3:25:37and then I will get entirely different
  4149. 3:25:39sort of vector so let me actually show
  4150. 3:25:43you a few more times um a couple of
  4151. 3:25:45other examples so let's say I keep my a
  4152. 3:25:48so I just take the beta 1 equal to 1 but
  4153. 3:25:51instead I scale my Vector B two times so
  4154. 3:25:55this was at three I'm taking two times
  4155. 3:25:58of my Beta which means that I'm
  4156. 3:26:01here then I can take this I can add this
  4157. 3:26:05to my a so this is 2
  4158. 3:26:07B this will give me another linear
  4159. 3:26:11combination of these two different
  4160. 3:26:15vectors I can also you might recall that
  4161. 3:26:18we said that the starting point and the
  4162. 3:26:20end point doesn't really matter for for
  4163. 3:26:22us what matters is that we uh have the
  4164. 3:26:26same magnitude and the same direction
  4165. 3:26:28for our vectors so this means that for
  4166. 3:26:32me the vector being here and the vector
  4167. 3:26:35being here doesn't matter when I scale
  4168. 3:26:37it with two I can be here with three I
  4169. 3:26:40can be here so this is the same as my B
  4170. 3:26:43only 3 * B this is basically basically
  4171. 3:26:46scaling B with three and this in here
  4172. 3:26:51means that my Beta 2 is simply equal to
  4173. 3:26:54tree and then this means that I can
  4174. 3:26:57combine this with my a which was in here
  4175. 3:27:02you remember so this here this means
  4176. 3:27:06that I get yet another linear
  4177. 3:27:08combination of these vectors which means
  4178. 3:27:11that I'm
  4179. 3:27:12taking
  4180. 3:27:143B and I'm on this my a so 1 * a my beta
  4181. 3:27:211 is equal to 1 my Beta 2 is equal to 3
  4182. 3:27:24which means that the linear combination
  4183. 3:27:26of this is equal to one two plus and
  4184. 3:27:29then 3 * B is equal to 0 and then 3 * 3
  4185. 3:27:32is 9 this is then the new linear
  4186. 3:27:35combination which is 1 and 11 so the new
  4187. 3:27:38linear combination is equal to 1 and
  4188. 3:27:4211 so this thing
  4189. 3:27:48which is the same
  4190. 3:27:50as this
  4191. 3:27:53thing and then you can go on and on you
  4192. 3:27:57can also calculate the same with a
  4193. 3:27:59negative B so you can take B and then
  4194. 3:28:01you can scale it with minus one so this
  4195. 3:28:04is minus b or you can go in here in here
  4196. 3:28:09the same holds for a so you can scale it
  4197. 3:28:11all the way to here or in the negative
  4198. 3:28:14side so so this already uh give us the
  4199. 3:28:19idea that we will go into to the next
  4200. 3:28:21point which is the span so when it comes
  4201. 3:28:24to the linear combination and in this
  4202. 3:28:26specific case when we have these two
  4203. 3:28:28vectors we can combine these two vectors
  4204. 3:28:31in anyway and uh we can mix them up by
  4205. 3:28:35using different sorts of coefficients of
  4206. 3:28:37beta 1 and beta 2 and we will can we can
  4207. 3:28:40get any Vector in our R2 so this means
  4208. 3:28:45that any vector in our R2 we can
  4209. 3:28:47represent by using only these two
  4210. 3:28:50vectors and this is not always the case
  4211. 3:28:53for this specific case we are dealing
  4212. 3:28:55with two vectors that we can use to
  4213. 3:28:57represent any Vector in our r
  4214. 3:29:03two so what I mean here is that let me
  4215. 3:29:07clean this
  4216. 3:29:09up so independent what kind of vector
  4217. 3:29:13you will give me in the R2 so it has two
  4218. 3:29:17different elements it is 2x one I can
  4219. 3:29:21use a linear combination of A and B so a
  4220. 3:29:25linear combination of A and B is beta 1
  4221. 3:29:28* a
  4222. 3:29:30plus beta 2 * B in order to
  4223. 3:29:35represent this
  4224. 3:29:37Vector X1 and
  4225. 3:29:40X2 therefore we are saying and we will
  4226. 3:29:43come to this um in the next slide too
  4227. 3:29:46that the
  4228. 3:29:48spend of the vectors A and B so this is
  4229. 3:29:52the set of all possible combinations of
  4230. 3:29:55these two vectors is equal to R2 because
  4231. 3:29:59any Vector in R2 can be represented as a
  4232. 3:30:04linear combination of these two vectors
  4233. 3:30:08so we have a linear combination of A and
  4234. 3:30:10B and I'm saying that I can represent
  4235. 3:30:13any Vector so here vector X and this
  4236. 3:30:17Vector X I'm representing by X1 and X2
  4237. 3:30:20and X1 and X2 can be any real numbers so
  4238. 3:30:24X1 and X2 they belong to R and X is
  4239. 3:30:30simply a two-dimensional Vector so X1
  4240. 3:30:34and X2 those can be any numbers 0 1 2us
  4241. 3:30:38100 anything and I'm saying any number
  4242. 3:30:42in this two dimensional space so whether
  4243. 3:30:45it is this one any Vector this one this
  4244. 3:30:47one or this vector or this one any
  4245. 3:30:51Vector that you give me in two
  4246. 3:30:52dimensional space I can find a linear
  4247. 3:30:56combination of this A and B that is
  4248. 3:30:59equal to that Vector so I can represent
  4249. 3:31:01that Vector as a linear combination of
  4250. 3:31:03vector A and B that we saw before so
  4251. 3:31:06let's actually prove that so I'm going
  4252. 3:31:09to represent this uh X1 and X2 by a
  4253. 3:31:13linear combination of this Vector A and
  4254. 3:31:15B and how we can do that so we have beta
  4255. 3:31:171 * a plus beta 2 * B it is equal to X1
  4256. 3:31:21and X2 where beta 1 and beta 2 so beta 1
  4257. 3:31:24and beta 2 they are constants so they
  4258. 3:31:27are also real
  4259. 3:31:30numbers so let's unpack this which is
  4260. 3:31:34beta 1 * 1 2 + beta 2 *
  4261. 3:31:4003 and this should be equal to X1 and X2
  4262. 3:31:46now
  4263. 3:31:48this is
  4264. 3:31:51equivalent of so beta 1 * 1 beta 1 * 2
  4265. 3:31:58plus beta 2 * 0 and then beta 2 * 3 and
  4266. 3:32:04this should be equal to X1
  4267. 3:32:08X2 so this is my beta 1 a this is my
  4268. 3:32:12Beta 2 B and this is my
  4269. 3:32:21X all right so now what we get is that
  4270. 3:32:25and this is
  4271. 3:32:31equivalent beta 1 *
  4272. 3:32:341 is equal to beta 1 beta 1 * 2 is 2
  4273. 3:32:39beta
  4274. 3:32:401
  4275. 3:32:41plus then here beta 2 * 0 is 0 and then
  4276. 3:32:45beta 2 * 3 is 3 beta
  4277. 3:32:562 so we have learned U from the uh
  4278. 3:32:59operations on the vectors that beta one
  4279. 3:33:02uh so in this case when we are adding
  4280. 3:33:04two vectors so beta 1 +0 is the uh
  4281. 3:33:08amount that we need to put as our first
  4282. 3:33:10element so when we are adding two
  4283. 3:33:11vectors we just need to take their
  4284. 3:33:12corresponding elements we need to add
  4285. 3:33:14them up so equal to beta 1 + 0 and then
  4286. 3:33:182 beta 1 + 3 beta 2 this is the result
  4287. 3:33:23and this should be equal to X1 and X2 at
  4288. 3:33:26least this is what I'm
  4289. 3:33:34claiming so this zero doesn't matter so
  4290. 3:33:37we what we are getting from here is that
  4291. 3:33:39beta 1 is = to X1 and then 2 beta 1 + 3
  4292. 3:33:46b. 2 is equal to X2 this is the two
  4293. 3:33:49expressions that we are getting based on
  4294. 3:33:51all these different calculations so let
  4295. 3:33:53me actually remove all
  4296. 3:34:05this so we have beta 1 is equal to X1
  4297. 3:34:10and 2 beta 1 + 3 beta 2 is equal to
  4298. 3:34:18X2 so here given that we have already
  4299. 3:34:21that beta 1 is equal to X1 and here we
  4300. 3:34:23have two unknowns I'm going to fill in
  4301. 3:34:27the value for beta 1 in here so I'm
  4302. 3:34:30going to take
  4303. 3:34:33this and I'm going to fill in it in here
  4304. 3:34:37so for this
  4305. 3:34:40volue so remember that beta 1 and beta 2
  4306. 3:34:43are two unknowns and each one and next
  4307. 3:34:45to are just uh numbers that we will get
  4308. 3:34:49when we uh know exactly the vector and
  4309. 3:34:51we just want to represent the vector as
  4310. 3:34:54a linear combination of two vectors so
  4311. 3:34:58when I take this uh value for beta 1
  4312. 3:35:01which is equal to X1 and I'm going to
  4313. 3:35:03fill that in in here it means that I'm
  4314. 3:35:06going to get from here that beta 1 is
  4315. 3:35:10equal to X1 and 2 *
  4316. 3:35:17X1 because beta 1 is equal to X1 and
  4317. 3:35:20here I got beta 1 I'm just filling in
  4318. 3:35:22that value for beta 1 which is equal to
  4319. 3:35:24X1 so 2 *
  4320. 3:35:27X1 and then the rest I'm just taking
  4321. 3:35:29over 3 beta 2 is equal to
  4322. 3:35:34X2 let me remove this and from here what
  4323. 3:35:38we are getting is that beta 1 is equal
  4324. 3:35:41to X1 and I will solve this equation for
  4325. 3:35:44the unknown which is equal beta 2 so I
  4326. 3:35:48will just take the three beta 2 from
  4327. 3:35:51left hand side I will leave it there and
  4328. 3:35:53I will take this and I will take it over
  4329. 3:35:54to the right so I'm taking X2 over and
  4330. 3:35:58this two X1 so this part I'm just taking
  4331. 3:36:02to the right two of the equation so Min
  4332. 3:36:05- 2
  4333. 3:36:09X1 which then on its turn is equal to so
  4334. 3:36:14it goes to B 1 is = to X1 and then beta
  4335. 3:36:192 is = to X2 - 2 X1 / 2
  4336. 3:36:26three perfect so what do we get
  4337. 3:36:30here what is our end result and why is
  4338. 3:36:33it
  4339. 3:36:36significant so what we are getting here
  4340. 3:36:39is that based on all this information
  4341. 3:36:42without knowing beta 1 and beta 2 we got
  4342. 3:36:46that beta 1 should be equal to X1 and
  4343. 3:36:49beta 2 should be equal to X2 -
  4344. 3:36:532x1 / to three this means that
  4345. 3:36:58independent what kind of x's you will
  4346. 3:37:02give me so what kind of vector we have
  4347. 3:37:05in our R2 so this X1 and X2 they are
  4348. 3:37:09just real numbers we can always find
  4349. 3:37:12beta 1 and beta 2 that we can use to
  4350. 3:37:16represent that X1 X2 so our X Vector as
  4351. 3:37:21a linear combination of these two
  4352. 3:37:24vectors let me actually give you an
  4353. 3:37:27example so let's remove
  4354. 3:37:40this so let's assume we have a vector X
  4355. 3:37:44and this x is is equal to four and let's
  4356. 3:37:51say
  4357. 3:37:53three so if we got this Vector X and we
  4358. 3:37:57are saying we can use this Vector A and
  4359. 3:37:59B to represent X as a linear combination
  4360. 3:38:03of vector A and B which means that I can
  4361. 3:38:05find I can find real number beta 1 and
  4362. 3:38:09beta 2 that I can use to multiply the
  4363. 3:38:12vector A and B respectively combine them
  4364. 3:38:14together so their linear combination
  4365. 3:38:17that will be equal to this Vector X so
  4366. 3:38:20this is my
  4367. 3:38:21X1 this is my
  4368. 3:38:24X2 so this is equal to 4 and three Now
  4369. 3:38:30using
  4370. 3:38:31this let's actually see whether that is
  4371. 3:38:35true so based on this example my beta 1
  4372. 3:38:40should be equal to X1 which is four my
  4373. 3:38:43Beta 2 should be equal to X2 which is 3
  4374. 3:38:46so beta 2 should be equal to X2 which is
  4375. 3:38:503 - 2 * X1 which is 4 / to three and
  4376. 3:38:56what's this number this means that my
  4377. 3:38:59beta 1 should be equal to 4 and my Beta
  4378. 3:39:012 should be equal to 3 - 8 so 3 - 8 / to
  4379. 3:39:063 and this is equal to Minus 5 / to
  4380. 3:39:123 so this means that I use a
  4381. 3:39:16coefficients beta 1 is equal to 4 and
  4382. 3:39:18beta 2 = to - 5 / to 3 to represent my
  4383. 3:39:22Vector X as a linear combination of
  4384. 3:39:26vector a and Vector B so let's actually
  4385. 3:39:30prove that too as a final
  4386. 3:39:37step
  4387. 3:39:39so let's see where the four
  4388. 3:39:42times Vector a which is 1
  4389. 3:39:462 + - 5 / to 3 whether this is indeed
  4390. 3:39:52equal to Vector X so my Vector B is
  4391. 3:39:5803 so this is the first part
  4392. 3:40:16and I want to prove that this is indeed
  4393. 3:40:18equal to X and we already know what x is
  4394. 3:40:24so this is equal to 4 * 1 4 * 2 plus and
  4395. 3:40:31then here we got - 5 / 3 * 0 and then -
  4396. 3:40:355 / to 3 *
  4397. 3:40:373 this is equal
  4398. 3:40:41to 4 * 1 is = to 4 4 * 2 is = to 8
  4399. 3:40:46and then here we need to subtract minus
  4400. 3:40:4953 5 5 / 3 * 0 is equal to 0 so this one
  4401. 3:40:54is zero and then minus 5 / to 3 so 5/3 *
  4402. 3:40:593 this ones are canceling out and we got
  4403. 3:41:028 + - 5 so here the plus and here minus
  4404. 3:41:06just to make sure we got everything
  4405. 3:41:08right and this is equal to 4 and then 8
  4406. 3:41:12+ - 5 is equal to 3
  4407. 3:41:15so you can see already that this amount
  4408. 3:41:18that we got here is equal to X which was
  4409. 3:41:21equal to 4 / to3 and this helps us to uh
  4410. 3:41:27verify and to know for sure that indeed
  4411. 3:41:32while given any Vector in a two
  4412. 3:41:35dimensional space in R2 X independent
  4413. 3:41:39what this X1 is or X2 is we can always
  4414. 3:41:42find a pair of beta 1 and beta 2 that
  4415. 3:41:46will ensure that the beta 1 a plus beta
  4416. 3:41:502 B is actually equal to this
  4417. 3:41:54x where X A and B they are part of
  4418. 3:42:00R2 and a is equal to 1 2 and then B is
  4419. 3:42:06equal to
  4420. 3:42:0803 so we can represent any Vector in our
  4421. 3:42:12two-dimensional space as a linear comp
  4422. 3:42:15combination of this Vector a with
  4423. 3:42:16elements 1 2 and um Vector B with
  4424. 3:42:20elements 03 and that's exactly what we
  4425. 3:42:22saw here because we could find any
  4426. 3:42:25vector and we can represent this Vector
  4427. 3:42:27as a linear combination of this Vector A
  4428. 3:42:29and B this Vector as a linear
  4429. 3:42:31combination of this A and B this Vector
  4430. 3:42:33as a linear combination in any vector or
  4431. 3:42:36a point in this plane we can represent
  4432. 3:42:38as a linear combination of this Vector a
  4433. 3:42:42and Vector B and in this specific case
  4434. 3:42:45with this Vector a and Vector B we are
  4435. 3:42:47saying that Vector a and Vector B they
  4436. 3:42:50spin
  4437. 3:42:51R2 so Vector
  4438. 3:42:56A and
  4439. 3:42:58B
  4440. 3:43:00span R 2 now we will come to these
  4441. 3:43:05definitions of the span and uh just in
  4442. 3:43:08general for different sorts of vectors
  4443. 3:43:11we will see what this IDE of span is but
  4444. 3:43:13for now given that we just proved that
  4445. 3:43:16we can represent any Vector in R2 as a
  4446. 3:43:19linear combination of these two vectors
  4447. 3:43:22A and B therefore we can say and we
  4448. 3:43:25usually say it in linear algebra that
  4449. 3:43:28the vector a and Vector B they spend R2
  4450. 3:43:32before moving on onto this concept of
  4451. 3:43:34Spence that we just touched upon in our
  4452. 3:43:37example I wanted to quickly go back to
  4453. 3:43:40this example that I promised to discuss
  4454. 3:43:43uh which was part of the definition of
  4455. 3:43:45the linear combinations and unit vectors
  4456. 3:43:48because we saw in our definition and let
  4457. 3:43:51me just show you that uh the uh
  4458. 3:43:53definition was providing these two
  4459. 3:43:56highlights these two bullet points and
  4460. 3:43:57was saying any Vector B in N Dimensions
  4461. 3:44:00can be expressed as a linear combination
  4462. 3:44:02of the standard unit vectors E1 to up to
  4463. 3:44:05e n and the coefficients in this
  4464. 3:44:07combination are the entries of B itself
  4465. 3:44:11so let's look into the example and see
  4466. 3:44:13what we mean by that in this specific
  4467. 3:44:16example we have this Vector B it is
  4468. 3:44:19coming from the three dimensional space
  4469. 3:44:21which we can see given that we have
  4470. 3:44:22three different uh three entries so
  4471. 3:44:24three uh elements in our Vector so it's
  4472. 3:44:273 by one and this means that b belongs
  4473. 3:44:32to
  4474. 3:44:34R3 and in here we can see that B can be
  4475. 3:44:38written as a linear combination of these
  4476. 3:44:42three vectors so you can see that b e is
  4477. 3:44:45equal to -1 * this Vector 1 0 0 so this
  4478. 3:44:52one then we have + 3 * 0 1 0 Vector so
  4479. 3:44:59this
  4480. 3:45:00one and plus 5 * this third Vector which
  4481. 3:45:05is 0
  4482. 3:45:0601 now we already know from the unit
  4483. 3:45:10vectors that
  4484. 3:45:13E1 is equal to
  4485. 3:45:151 0
  4486. 3:45:170 assuming that we are in three
  4487. 3:45:19dimensional
  4488. 3:45:22space E2 is equal to 0 1
  4489. 3:45:260 and E3 is equal to 0 01 you can notice
  4490. 3:45:33that that's exactly what we got here
  4491. 3:45:35this Vector is E1 this Vector is E2 and
  4492. 3:45:39this Vector is E3 where E1 E2 and E3
  4493. 3:45:44belong to three-dimensional
  4494. 3:45:47space okay so another thing that we can
  4495. 3:45:50see is that here we got coefficients
  4496. 3:45:54minus one here three and here five so
  4497. 3:45:57this is basically how beta 1 beta 2 and
  4498. 3:46:00beta 3 using the common conventions that
  4499. 3:46:02we saw before when describing the linear
  4500. 3:46:05combination so let's actually check that
  4501. 3:46:08and then we will comment on these values
  4502. 3:46:16so let's check whether -1 * E1 + 3 * E2
  4503. 3:46:21+ 5 * E3 is indeed equal to this B so
  4504. 3:46:25this is equal to -1 * this Vector gives
  4505. 3:46:29us -1 0
  4506. 3:46:310 three times this E2 gives us 0 3 and
  4507. 3:46:37zero and then 5 * E3 gives us 0 0 5 and
  4508. 3:46:44this is equal to
  4509. 3:46:45-1 + 0 + 0 is = -1 0 + 3 + 0 is = 3 and
  4510. 3:46:52then 0 + 0 + 5 is equal to
  4511. 3:46:555 now what do we get here we see that
  4512. 3:46:58this which is equal to this it is equal
  4513. 3:47:02to this Vector B indeed okay so now when
  4514. 3:47:06we have indeed checked that B can be
  4515. 3:47:10represented as a linear combination of
  4516. 3:47:14this three vectors this unit vectors E1
  4517. 3:47:19E2 E3 another thing that we can notice
  4518. 3:47:22and I'm sure you already
  4519. 3:47:24did is that those coefficients they are
  4520. 3:47:27not just randomly picked coefficients
  4521. 3:47:30those are the entries of this Vector B
  4522. 3:47:34so this is exactly what that definition
  4523. 3:47:37was about it was saying that any Vector
  4524. 3:47:39B including this example in in this case
  4525. 3:47:42threedimensional space can be Express as
  4526. 3:47:45a linear combination of the standard
  4527. 3:47:48unit vectors E1 A2 E3 Etc so this
  4528. 3:47:53coefficients in this combination so you
  4529. 3:47:55can see that the beta 1 beta 2 and beta
  4530. 3:47:583 which are our coefficients in our
  4531. 3:47:59linear combination they are the entries
  4532. 3:48:02so this
  4533. 3:48:04values of the B
  4534. 3:48:06itself so the same will hold for
  4535. 3:48:09four-dimensional case five dimensional
  4536. 3:48:12case n dimensional case so this means
  4537. 3:48:15that if we write this down for General
  4538. 3:48:19case just to ensure that we are clear on
  4539. 3:48:23this part of the
  4540. 3:48:26definition so if we got
  4541. 3:48:30B Vector in N dimensional space so it
  4542. 3:48:34got B1 B2 up to BN as the elements of it
  4543. 3:48:39comes from
  4544. 3:48:41RN then we can represent this B
  4545. 3:48:45as a linear combination of unit vectors
  4546. 3:48:49coming from the N dimensional space so
  4547. 3:48:52we got E1 E2 up to e n that belong to n
  4548. 3:48:58dimensional space and we can represent
  4549. 3:49:00this B as a linear combination of these
  4550. 3:49:03unit vectors so by using beta 1
  4551. 3:49:08time so this this is a common Convention
  4552. 3:49:10of the coefficient as you Rec called
  4553. 3:49:12time C1 then B beta 2 * E2 blah blah
  4554. 3:49:17blah plus beta n * e n and what is
  4555. 3:49:22important here is that this beta 1 beta
  4556. 3:49:252 and beta
  4557. 3:49:28n those are not just some coefficients
  4558. 3:49:31but we already know what these
  4559. 3:49:32coefficients are
  4560. 3:49:35because we can then represent this
  4561. 3:49:40beta by taking the values so those are
  4562. 3:49:44the entries the elements of the vector B
  4563. 3:49:47itself so it is B1
  4564. 3:49:52*
  4565. 3:49:55B1
  4566. 3:49:57plus b2 time E2 dot dot dot
  4567. 3:50:04plus BN
  4568. 3:50:07times e
  4569. 3:50:10n where B1 B2 up Q BN they are all real
  4570. 3:50:18numbers so basically knowing what these
  4571. 3:50:22Vector is these elements of this
  4572. 3:50:25Vector we can always describe and
  4573. 3:50:28express it as a linear combination of
  4574. 3:50:31the standard unit vectors and if you're
  4575. 3:50:33wondering why is this important in some
  4576. 3:50:36cases when performing different
  4577. 3:50:38operations or working on different
  4578. 3:50:40algorithms it just becomes handy to
  4579. 3:50:43represent your vector as a linear
  4580. 3:50:45combination of multiple
  4581. 3:50:47vectors and in those cases exactly you
  4582. 3:50:50can make use of this property of linear
  4583. 3:50:52combinations to express your n
  4584. 3:50:54dimensional Vector b as a linear
  4585. 3:50:56combination of the standard unit vectors
  4586. 3:50:59because everything is then down to you
  4587. 3:51:01by having this Vector B you will already
  4588. 3:51:03know what are the entries that you can
  4589. 3:51:05use as your coefficients in this case
  4590. 3:51:08beta 1 beta 2 so those are all these
  4591. 3:51:10values coming from your vector itself
  4592. 3:51:12and then the remaining is also none
  4593. 3:51:14because you know exactly what these unit
  4594. 3:51:16vectors are and how they are represented
  4595. 3:51:19so here for instance the E1 is basically
  4596. 3:51:22one 0 0 blah blah blah blah 0 and then
  4597. 3:51:25this is n by1 Vector here the E2 is
  4598. 3:51:28equal to 0 1 Z blah blah blah and then
  4599. 3:51:31zero here so n * 1 again up to the point
  4600. 3:51:35where you have the N where you have all
  4601. 3:51:38the zeros only the last element is one
  4602. 3:51:41again n by one vector so this is the
  4603. 3:51:44idea behind this second part of this
  4604. 3:51:46definition which says that any Vector
  4605. 3:51:49being in N dimensional space can be
  4606. 3:51:51expressed as a linear combination of the
  4607. 3:51:53standard unit vectors E1 up to e n let's
  4608. 3:51:58now talk about other concept which is
  4609. 3:52:00also super important which is the span
  4610. 3:52:03of vectors so by definition the span of
  4611. 3:52:06a set of vectors is a set of all
  4612. 3:52:08possible linear combinations of these
  4613. 3:52:10vectors so if V is equal to V1 V2 up to
  4614. 3:52:14V K and is a set of vectors then the
  4615. 3:52:17span of V is written as a span V and it
  4616. 3:52:21includes any vectors that can be
  4617. 3:52:23expressed as C1 V1 up to C2 V2 up to CK
  4618. 3:52:29VK so basically it is a common uh
  4619. 3:52:34notation uh to say that if we got for
  4620. 3:52:37instance vectors V1 V2 up to VN so we
  4621. 3:52:43have n different vectors then we say
  4622. 3:52:46that the
  4623. 3:52:49span
  4624. 3:52:51of
  4625. 3:52:53V1 V2 up to
  4626. 3:52:58VN that this is simply the notation that
  4627. 3:53:02we use in order to describe the span of
  4628. 3:53:04these vectors and we briefly spoke about
  4629. 3:53:07this concept of span when we were
  4630. 3:53:10looking into our example that we saw
  4631. 3:53:12before so you might recall vectors A and
  4632. 3:53:15B that we had and we saw and we said
  4633. 3:53:19that the span of a and b is the entire
  4634. 3:53:23space in the two dimensional uh real
  4635. 3:53:25number space so we said that span of a
  4636. 3:53:28and b is equal to R2 where our Vector a
  4637. 3:53:33was simply equal to one 2 and B was
  4638. 3:53:39equal to
  4639. 3:53:4103 so we proved that the span
  4640. 3:53:45of one two and
  4641. 3:53:4903 was the
  4642. 3:53:52entire R2 and how we knew that because
  4643. 3:53:56we proved that any Vector in R2 could be
  4644. 3:54:00represented as a linear combination of
  4645. 3:54:03these uh two vectors so you might recall
  4646. 3:54:05that we solved this equations we saw
  4647. 3:54:08that in depend what kind of X1 and X2 uh
  4648. 3:54:11one will give us we can always use the
  4649. 3:54:14uh
  4650. 3:54:15um we we found this amount let me see
  4651. 3:54:18where I can find it back I no longer
  4652. 3:54:20have this so we saw that for uh specific
  4653. 3:54:23values of um beta 1 and beta 2 we can
  4654. 3:54:28always get a linear combination of this
  4655. 3:54:31A and B in order to get our desired
  4656. 3:54:34factor
  4657. 3:54:35x so beta 1 * a plus beta 2 * e will
  4658. 3:54:39always then be equal to X1 and X2 if our
  4659. 3:54:42Vector a and Vector B are those but of
  4660. 3:54:45course this doesn't hold for all the
  4661. 3:54:47vectors so not for all two-dimensional A
  4662. 3:54:51and B uh we can say that the span of
  4663. 3:54:54these vectors is the entire R2 therefore
  4664. 3:54:57to better understand this concept of
  4665. 3:54:59span and this concept of span of vectors
  4666. 3:55:01I wanted to distinguish five different
  4667. 3:55:04cases one of which we already spoke
  4668. 3:55:06about and that is the case when we had
  4669. 3:55:08this Vector a and Vector B and we said
  4670. 3:55:10that the span of a and b is the entire
  4671. 3:55:13R2 but we will also look into the case
  4672. 3:55:16when we for instance have a span of the
  4673. 3:55:18zero Vector the span of a single vector
  4674. 3:55:21and the span of perpendicular vectors we
  4675. 3:55:24might also look if there is time left we
  4676. 3:55:26will also look into the span of parallel
  4677. 3:55:29vectors so let's now look into this
  4678. 3:55:32cases one by
  4679. 3:55:36one so let's say we have a vector of
  4680. 3:55:42zero so we have a zero vector so this is
  4681. 3:55:45a very simple case we will start with
  4682. 3:55:46the simplest case and we will move on B
  4683. 3:55:48to two more advanced cases if we have a
  4684. 3:55:51vector a that is a zero
  4685. 3:55:58Vector 0
  4686. 3:56:000 then
  4687. 3:56:02independent what kind of scaler we will
  4688. 3:56:05use to scale this so let's say um we
  4689. 3:56:08Define it by C so C * Z independent what
  4690. 3:56:13kind of scale we will use this will
  4691. 3:56:16always end up being equal to 0 0 so if C
  4692. 3:56:19is equal
  4693. 3:56:20to0 C * 0 will be equal to
  4694. 3:56:250 if C is equal to 1 C * 0 will be equal
  4695. 3:56:30to
  4696. 3:56:32Z or C is equal to 100 C * 0 will still
  4697. 3:56:38be 0 0 so independent what kind of scal
  4698. 3:56:42we will be using what kind of lead
  4699. 3:56:44linear combination we will create from
  4700. 3:56:47our Vector
  4701. 3:56:50a this will always stay in here so the
  4702. 3:56:54point the vector will always stay in
  4703. 3:56:57here in our two Dimension space so this
  4704. 3:57:00is completely different from what we saw
  4705. 3:57:02before when we could create and we could
  4706. 3:57:04take any Vector in our R2 and we could
  4707. 3:57:06represent it as a linear combination of
  4708. 3:57:08these two vectors that we saw in the
  4709. 3:57:10previous example so in this specific
  4710. 3:57:13case
  4711. 3:57:14um scaling the zero with independent of
  4712. 3:57:19any scalers we use this will not change
  4713. 3:57:21the magnitude nor it will change the
  4714. 3:57:23direction of our Vector so no matter how
  4715. 3:57:26we scale it we still get zero this means
  4716. 3:57:30that
  4717. 3:57:31the
  4718. 3:57:33span of zero
  4719. 3:57:40Vector is just the zero Vector itself
  4720. 3:57:45so you can see that independent what I
  4721. 3:57:47scale the zero Vector I always end up
  4722. 3:57:49with the same zero Vector so therefore
  4723. 3:57:52this span of the zero Vector is equal to
  4724. 3:57:54zero because by definition this Spen of
  4725. 3:57:57set of vectors is the collection of all
  4726. 3:58:00possible vectors that I can reach by
  4727. 3:58:02performing linear combination and in
  4728. 3:58:04this case I will always Reach This Z 0
  4729. 3:58:08Vector so all possible collections of
  4730. 3:58:11these vectors are the vector 0 0 which
  4731. 3:58:13is single vector and the same as the
  4732. 3:58:17input so this is the basic case now
  4733. 3:58:20let's move on onto bit more uh Advanced
  4734. 3:58:23case so bit more complicated than this
  4735. 3:58:26one but itself also very easy which is
  4736. 3:58:29when we got a single Vector
  4737. 3:58:32a so let's say a is equal
  4738. 3:58:40to one and two now I want to know what
  4739. 3:58:45is the span of
  4740. 3:58:48a in order to know what is the span of a
  4741. 3:58:52we simply need to understand what are
  4742. 3:58:54all these possible collections of
  4743. 3:58:56vectors that I can get when I'm uh
  4744. 3:58:59combining um a I'm multiplying a with
  4745. 3:59:02different coefficients so what are the
  4746. 3:59:05all possible linear combinations of this
  4747. 3:59:09Vector because I got just single Vector
  4748. 3:59:11a so a is one one two which means one in
  4749. 3:59:15here and then two here my a is this
  4750. 3:59:21vector and let's look into uh different
  4751. 3:59:24uh scalar multiplications of this Vector
  4752. 3:59:27so let's say I want to calculate C
  4753. 3:59:30* a so the scalar multiplication of this
  4754. 3:59:35where C is equal
  4755. 3:59:37to C is equal to 2 C is equal to 3 C is
  4756. 3:59:43equal to uh Min -1 C is = to - 3 and of
  4757. 3:59:48course C is = to
  4758. 3:59:501 so in all these cases when C is equal
  4759. 3:59:54to
  4760. 4:00:031 then the linear combination in this
  4761. 4:00:07case just the scale multiplication of
  4762. 4:00:09this single Vector a so 1 * a is simply
  4763. 4:00:14equal
  4764. 4:00:16to one and two so the same Vector
  4765. 4:00:21a c is equal to 2 this will give me 2
  4766. 4:00:26and
  4767. 4:00:27four C is equal three this will give me
  4768. 4:00:303 and
  4769. 4:00:326 C is = to min-1 will give me -1 - 2
  4770. 4:00:36for my a and then C is equal to -3 will
  4771. 4:00:40give me -3 and then - 6
  4772. 4:00:45so let's plot each of
  4773. 4:00:47those so if we got for instance C is
  4774. 4:00:50equal to one case you can see that we
  4775. 4:00:53already got that Vector in here so it is
  4776. 4:00:55this
  4777. 4:00:56Vector when C is equal to two then we
  4778. 4:00:59got this one so two and four so where is
  4779. 4:01:02that it is in
  4780. 4:01:07here let me use another color it is in
  4781. 4:01:12here when when we got C is equal to
  4782. 4:01:17three then we got so this one three and
  4783. 4:01:22six so this is three and this is
  4784. 4:01:26six so it gives me this
  4785. 4:01:35Vector in the next example so in the
  4786. 4:01:37next linear
  4787. 4:01:39combination we have C is equal to minus
  4788. 4:01:42one so we got Min -1 and Min
  4789. 4:01:45-2 so where is min -1 it is in here
  4790. 4:01:48where is min-2 it is in here so I'm
  4791. 4:01:50getting this
  4792. 4:01:53vector and then
  4793. 4:01:56finally when I have let me change the
  4794. 4:01:59color when I have C is equal to minus 3
  4795. 4:02:02so this case then I got minus 3 and 6
  4796. 4:02:05which means that here is my minus 3 here
  4797. 4:02:08is my minus
  4798. 4:02:106 so we got this thing
  4799. 4:02:14so you already should see what is going
  4800. 4:02:16on here when we got just the single
  4801. 4:02:19Vector for which we need to know what is
  4802. 4:02:21a linear combination and that Vector is
  4803. 4:02:23not a zero Vector it has nonzero
  4804. 4:02:25elements but um it's still it is just a
  4805. 4:02:29single Vector then all its linear
  4806. 4:02:32combinations given that it is simply a
  4807. 4:02:34scaled multiplication of
  4808. 4:02:37it we are all getting them on the same
  4809. 4:02:41line so you can see all the linear
  4810. 4:02:44combinations of this single Vector is
  4811. 4:02:47just a scaled version of it and it lies
  4812. 4:02:49on the same
  4813. 4:02:51line so what this tells us is that
  4814. 4:02:53essentially you can move along the line
  4815. 4:02:56defined by this Vector a but you cannot
  4816. 4:02:58leave it so you cannot get a vector that
  4817. 4:03:01is in here that is in here that is in
  4818. 4:03:03here in here so you cannot leave this uh
  4819. 4:03:07line you will always stay on this line
  4820. 4:03:10so this line essentially spend of
  4821. 4:03:14a so when we got a single vector and
  4822. 4:03:19that Vector is not equal to Z Vector
  4823. 4:03:22then the span of a is equal to and this
  4824. 4:03:25can be expressed as C * a given that the
  4825. 4:03:30C is a real
  4826. 4:03:32number so we already saw this
  4827. 4:03:34independent of what kind of scalar we
  4828. 4:03:36will take any linear combination of it
  4829. 4:03:38will end up simply the C * a so
  4830. 4:03:42therefore we are generally izing this
  4831. 4:03:44and we are seeing that the span of a so
  4832. 4:03:46to set of all possible linear
  4833. 4:03:48combinations of this a is simply equal
  4834. 4:03:51to C * a given that the C is a real
  4835. 4:03:55number this is basically the spend of a
  4836. 4:03:58real uh uh Vector in a two dimensional
  4837. 4:04:02space let's now look into the next case
  4838. 4:04:04the next example when we will calculate
  4839. 4:04:07or we will Define the span of a
  4840. 4:04:11perpendicular vectors so let's look in
  4841. 4:04:13into another example when we are looking
  4842. 4:04:15for a case when the um when we want to
  4843. 4:04:19find out the span of perpendicular
  4844. 4:04:21vectors so imagine we have these two
  4845. 4:04:23vectors Vector a and Vector B where a is
  4846. 4:04:26equal to 1 0 and then B is equal to 0 1
  4847. 4:04:29so we are still in our lovely uh
  4848. 4:04:32two-dimensional space so let's first
  4849. 4:04:35visualize the vector a it's quite basic
  4850. 4:04:37it is this one and then Vector B it is
  4851. 4:04:40simply this one so we can already see
  4852. 4:04:43why they are perpendicular so you can
  4853. 4:04:45see that they are forming this um 90°
  4854. 4:04:48angle so right angle
  4855. 4:04:50here and then we know that the span so
  4856. 4:04:55that's exactly what we want to find out
  4857. 4:04:57so the span of a and b and this is what
  4858. 4:05:03we want to find
  4859. 4:05:05out and we know that the span of two
  4860. 4:05:09vectors is the set of all possible
  4861. 4:05:12linear combination of these vectors so
  4862. 4:05:16we want to see what are these all
  4863. 4:05:18possible inar combinations of
  4864. 4:05:23C1 so all the possible outcomes that we
  4865. 4:05:26will get when we get a linear
  4866. 4:05:28combinations of these two vectors so
  4867. 4:05:30basically C1 *
  4868. 4:05:35a
  4869. 4:05:37plus C2
  4870. 4:05:40* B
  4871. 4:05:44because those are all the linear
  4872. 4:05:47combinations of these two
  4873. 4:05:50vectors C1 * a + C2 *
  4874. 4:05:56B nothing thing that we can see here
  4875. 4:05:58quickly is that C1 * a so this part
  4876. 4:06:03those are all the scaled versions of a
  4877. 4:06:05so scaling multiplications of a and this
  4878. 4:06:10second term in the linear combination
  4879. 4:06:12those are all the scal
  4880. 4:06:14variations so scalar multiplications of
  4881. 4:06:17vector B which means that and we already
  4882. 4:06:21have seen this time and time uh again
  4883. 4:06:24that when it comes to Vector a all its
  4884. 4:06:27linear combinations they will lie on the
  4885. 4:06:29same line so let me take this color so
  4886. 4:06:34if I do 2 a so C1 is equal C2 then I
  4887. 4:06:38will be in here if C1 is equal to three
  4888. 4:06:41then I will be here C1 is equal to 4 I
  4889. 4:06:44will be here C1 is equal to 10 I will be
  4890. 4:06:47in here and then the opposite holds as
  4891. 4:06:51well if C1 is equal to for instance
  4892. 4:06:52minus uh 2 then I will be in here if
  4893. 4:06:55it's equal to Minus 5 I will be uh my
  4894. 4:06:58Vector will look like this and so on so
  4895. 4:07:01this means that all the scaled
  4896. 4:07:04multiplications of vector a will lie on
  4897. 4:07:07this
  4898. 4:07:09line so I can also say that the span of
  4899. 4:07:13see uh the span of a so span of
  4900. 4:07:20a is simply equal
  4901. 4:07:25to
  4902. 4:07:28C1
  4903. 4:07:31a so you can
  4904. 4:07:34see in here so on this line basically so
  4905. 4:07:37this
  4906. 4:07:38is
  4907. 4:07:41C1 a so this basically means independent
  4908. 4:07:44what kind of C1 I will take with is 1 2
  4909. 4:07:473 0 - 5 - 100 I will always end up on
  4910. 4:07:51this line so this
  4911. 4:07:54line so this about the uh scaled
  4912. 4:07:58multiplication of a but of course to
  4913. 4:08:01create this linear combination of A and
  4914. 4:08:02B we also have the second element which
  4915. 4:08:05is the all possible scaled
  4916. 4:08:07multiplications with a vector B so C2 B2
  4917. 4:08:11so let's see what that looks like
  4918. 4:08:13so if I for instance take C2 is equal to
  4919. 4:08:17Z I will be in here if I take C2 is
  4920. 4:08:20equal to uh 2 I will be in here C2 is
  4921. 4:08:24equal to 5 I will be in here C2 is equal
  4922. 4:08:28to Minus 5 I will be here so you are
  4923. 4:08:30already seeing what is happening here so
  4924. 4:08:33all the possible scaled
  4925. 4:08:36multiplications with Vector B will be on
  4926. 4:08:39this line so now we are then getting
  4927. 4:08:42that
  4928. 4:08:45the
  4929. 4:08:47span of B will then be equal
  4930. 4:08:52to
  4931. 4:08:54C2 and then
  4932. 4:08:57B and here I'm not uh using formal
  4933. 4:09:00notation I'm just trying to um I'm just
  4934. 4:09:03trying to uh draft the idea of the spin
  4935. 4:09:06of vector a and uh span of vector B
  4936. 4:09:09because we are not uh done yet we still
  4937. 4:09:12need to combine the two in order to find
  4938. 4:09:14the span of vectors A and B when they
  4939. 4:09:17are perpendicular so when this angle is
  4940. 4:09:20simply
  4941. 4:09:2190° okay so let's also add this on our
  4942. 4:09:26plot so this is C2 and
  4943. 4:09:30then
  4944. 4:09:34B so this already gives us an idea that
  4945. 4:09:40all the
  4946. 4:09:41possible combination of the two so when
  4947. 4:09:44we add these two elements to each
  4948. 4:09:46other the outcome will always lie on
  4949. 4:09:49these two
  4950. 4:09:52lines but there is no way that we can
  4951. 4:09:56find any other coefficient for C1 or C2
  4952. 4:10:00that can help us to get a value that
  4953. 4:10:02will be so a vector that will be in here
  4954. 4:10:05or in here or in here or in here that's
  4955. 4:10:07just not possible so just you can try to
  4956. 4:10:11go ahead and solve that equations like
  4957. 4:10:12we did before before and you will see
  4958. 4:10:14that there there is no way that you can
  4959. 4:10:18pick here a line and you can represent
  4960. 4:10:21it as a linear combination of these two
  4961. 4:10:24vectors it just not possible and later
  4962. 4:10:27on we will see why but just keep in mind
  4963. 4:10:31for now that once we have this this type
  4964. 4:10:34of vectors when two vectors are
  4965. 4:10:37perpendicular then um we cannot find a
  4966. 4:10:41line a vector that is outside of the
  4967. 4:10:45two lines so here you can see the xaxis
  4968. 4:10:48and the Y AIS but it can also be like
  4969. 4:10:51this it can also be like this but then
  4970. 4:10:54you cannot find any other line that lies
  4971. 4:10:56outside of this area that you can uh
  4972. 4:11:00create a linear combination of these two
  4973. 4:11:03different vectors and then you say then
  4974. 4:11:05you cannot say that you can create a
  4975. 4:11:07linear combination of these two vectors
  4976. 4:11:10A and B so therefore
  4977. 4:11:13when it comes to defining the span of
  4978. 4:11:16the two
  4979. 4:11:18perpendicular line we say that the
  4980. 4:11:21span of a and
  4981. 4:11:26b given
  4982. 4:11:28that A and B are perpendicular but also
  4983. 4:11:32given that these values in this case you
  4984. 4:11:34know a is equal to 1 is z b is equal to
  4985. 4:11:370 and one then their spend you might
  4986. 4:11:40have already guessed is equal to
  4987. 4:11:44C1 a plus C2 B given that C1 and C2 are
  4988. 4:11:52of course real
  4989. 4:11:54numbers so in this case C1 and and C2 as
  4990. 4:11:58expected are just scalar so they are
  4991. 4:12:00just some real numbers coming from R and
  4992. 4:12:03uh this A and B those are vectors that
  4993. 4:12:06are being spent and in this case
  4994. 4:12:08specifically the vector a is equal to
  4995. 4:12:11this one zero and Vector B is equal to 0
  4996. 4:12:131 and this expression that we see here
  4997. 4:12:16this pen this simply describes the set
  4998. 4:12:19of all possible vectors that can be
  4999. 4:12:21formed by adding the scaled versions of
  5000. 4:12:23this A and B so C1 a plus C2 B in order
  5001. 4:12:27to form this linear combination so this
  5002. 4:12:30set this set of C1 a plus c2b which is a
  5003. 4:12:33linear combination all possible linear
  5004. 4:12:36combinations of the two
  5005. 4:12:37vectors so um it effectively covers the
  5006. 4:12:41entire plane illustrating that any point
  5007. 4:12:44in 2B space can be reached by some
  5008. 4:12:48combination of A and B let's now move
  5009. 4:12:52towards our final example that we saw
  5010. 4:12:54also as part of our definition for the
  5011. 4:12:56span of vectors in order to check and to
  5012. 4:12:59learn how we can usually check uh
  5013. 4:13:02whether the two vectors they really
  5014. 4:13:04spend the entire space so in this case
  5015. 4:13:07we got two vectors we got Vector uh V1
  5016. 4:13:10which is equal to one two and Vector V2
  5017. 4:13:12which is it's equal to three4 so in here
  5018. 4:13:16and also um we uh have in our example
  5019. 4:13:20that it says the span of V1 and V2 is
  5020. 4:13:23all over the R2 because any Vector in R2
  5021. 4:13:27can be expressed as a linear combination
  5022. 4:13:29of V1 and V2 so the example basically is
  5023. 4:13:32saying that if we know that um we can
  5024. 4:13:37express any Vector in R2 as a linear
  5025. 4:13:41combination of V1 and V2 2 then we say
  5026. 4:13:44that the span of V1 and V2 is the entire
  5027. 4:13:47R2 so let's actually go ahead and prove
  5028. 4:13:50that from our example so we have X which
  5029. 4:13:53we can represent as X1 and X2 and X1 and
  5030. 4:13:56X2 are just real numbers and we got V1
  5031. 4:14:00which is 1 2 V2 which is 3 4 and we got
  5032. 4:14:04in our example that uh we need to prove
  5033. 4:14:08that the
  5034. 4:14:10span of V1
  5035. 4:14:14and
  5036. 4:14:15V2 is the entire
  5037. 4:14:18R2 so for that what we need to do is we
  5038. 4:14:22need to prove that we can express our
  5039. 4:14:26coefficients C1 and C2 in such way using
  5040. 4:14:29X1 and X2 that independent of what these
  5041. 4:14:33X1 and X2 are so what kind of X Vector
  5042. 4:14:36we have whether this is like one two or
  5043. 4:14:40this is 04 or this is th000 and uh 5,000
  5044. 4:14:46independent what kind of vector we get
  5045. 4:14:49uh we give here so X1 and X2 values as
  5046. 4:14:52long as those are real uh numbers we can
  5047. 4:14:56always find a set of C1 and C2 that we
  5048. 4:15:00can use as coefficients in order to
  5049. 4:15:02create a linear combination from vectors
  5050. 4:15:05V1 and V2 and in that case we say then
  5051. 4:15:09the span of V1 and V2 is the in par
  5052. 4:15:14R2 okay so let's go ahead and actually
  5053. 4:15:17prove that using our previous knowledge
  5054. 4:15:20that we already gained so keeping in
  5055. 4:15:22mind that C1 and C2 are unknown numbers
  5056. 4:15:26for us whereas X1 and X2 are just a way
  5057. 4:15:29to describe those elements in our Vector
  5058. 4:15:32X that will be provided to us so X1 and
  5059. 4:15:35X2 will be basically know and C1 and C2
  5060. 4:15:38are the unknowns that we are chasing so
  5061. 4:15:41for that the first thing that I'm going
  5062. 4:15:42to do is to describe this linear
  5063. 4:15:44combination that we got here C1 V1 plus
  5064. 4:15:47C2 V2 with actual equations unknown
  5065. 4:15:51equations and the way I'm going to do it
  5066. 4:15:53is by simply filling in this Vector V1
  5067. 4:15:56and Vector V2 um
  5068. 4:15:59values so we have C1 and then C2 here
  5069. 4:16:05and then here I got one two
  5070. 4:16:09plus and then three and four here and
  5071. 4:16:13what is this amount so this is equal
  5072. 4:16:20to let me actually go on to the next
  5073. 4:16:25row so we can create um set of equations
  5074. 4:16:31for this so this is equal to X
  5075. 4:16:43and we get
  5076. 4:16:46C1 *
  5077. 4:16:501+ C2 * 3 is =
  5078. 4:16:552 and remember that this is X and we
  5079. 4:16:59said that the x is equal to X1 and X2 so
  5080. 4:17:01this basically equal to we can B right
  5081. 4:17:05here is equal to X1 and
  5082. 4:17:09X2 so this is then equal 2
  5083. 4:17:15let's not skip all the
  5084. 4:17:17steps X1 and
  5085. 4:17:21X2 so here then the second elements need
  5086. 4:17:25to be added so C1 *
  5087. 4:17:302 and C2 *
  5088. 4:17:384 which is then the same as
  5089. 4:17:44C1 + 3 C2 and then 2 C1 + 4 C2 and
  5090. 4:17:52then this we are saying this Vector is
  5091. 4:17:54equal to X1 and
  5092. 4:17:57X2 so this is what we have here and
  5093. 4:18:00let's move from the vectors to equations
  5094. 4:18:04so given that we have this we are
  5095. 4:18:07allowed to say that this gives us
  5096. 4:18:08actually two equations this means that
  5097. 4:18:11this element this element from this part
  5098. 4:18:14should be equal to this and this element
  5099. 4:18:17should be equal to this now let's write
  5100. 4:18:19it down we see that
  5101. 4:18:22c1+ 3 C2 should be equal to
  5102. 4:18:26X1 2
  5103. 4:18:28c1+ 4
  5104. 4:18:30C2 is equal to X2 this is all that we
  5105. 4:18:34see in
  5106. 4:18:35here let's remove this to keep the space
  5107. 4:18:40clean now what this means is
  5108. 4:18:43that we have two equations with two
  5109. 4:18:46unknowns C1 and C2 and X1 and X2 are the
  5110. 4:18:50numbers that will be provided to us as
  5111. 4:18:52part of our Vector so what we want to
  5112. 4:18:55prove is that we can describe and we can
  5113. 4:18:58express C1 and C2 which are our
  5114. 4:19:01unknowns using X1 and X2 so you see here
  5115. 4:19:05this is C1 C2 those are our nouns and we
  5116. 4:19:10want to describe them by using X1 x 1
  5117. 4:19:12and
  5118. 4:19:14X2 and very soon we will also see why so
  5119. 4:19:18for now let's try to express those two
  5120. 4:19:21unknowns using our nouns like X1 and X2
  5121. 4:19:25so here I already see that C1 is alone
  5122. 4:19:28so there is no scaler so I will make use
  5123. 4:19:31of that opportunity to keep the C1 on
  5124. 4:19:33the left hand side and I will take this
  5125. 4:19:36this amount to the right so I will say
  5126. 4:19:38C1 is equal to X1 minus 3 C2
  5127. 4:19:43two okay slightly better so I have C1 at
  5128. 4:19:46the left I do have X1 in the right but I
  5129. 4:19:49also have three C2 in here but another
  5130. 4:19:53thing that you will notice is that in my
  5131. 4:19:55second expression here I got 2 C1 + 4 C2
  5132. 4:19:58plus X2 I want to have the C2 only
  5133. 4:20:04because then I will have an expression
  5134. 4:20:06of my C2 only using X1 and X2 um so
  5135. 4:20:12numbers that are that will be provided
  5136. 4:20:14to me that are n so for that what I'm
  5137. 4:20:17going to do is basically trying to solve
  5138. 4:20:20uh two equations with two unknowns
  5139. 4:20:22exactly the same um process so I'm going
  5140. 4:20:25to take this C1 from the first equation
  5141. 4:20:28and I'm going to fill in in the second
  5142. 4:20:30equation so I am going to say two times
  5143. 4:20:35and here I'm going to fill in that C1
  5144. 4:20:38expression from here so X1 - 3 C2
  5145. 4:20:442 so this is my C1 plus just taking over
  5146. 4:20:48this part so 4 C2 is equal to X2 okay
  5147. 4:20:57perfect so now what I end up with is C1
  5148. 4:21:02is = to X1 - 3 C2 just taking it over
  5149. 4:21:06and then here I'm opening parenthesis
  5150. 4:21:08which is 2 X1 - 6
  5151. 4:21:11c2+ 4 C2 is equal to here I forgot an X2
  5152. 4:21:16is equal to X2 okay one step
  5153. 4:21:20closer why because I in my second
  5154. 4:21:23equation I no longer have a C1 I only
  5155. 4:21:27have a C2 which is great which means
  5156. 4:21:29that this gives me an
  5157. 4:21:31indication that I can rewrite the C2
  5158. 4:21:35which is unknown with nouns with X1 and
  5159. 4:21:38X2 so let's make use of that opportunity
  5160. 4:21:41the first equation I would just take
  5161. 4:21:43over so C1 is equal to and then
  5162. 4:21:47X1 - 3
  5163. 4:21:51C2 and
  5164. 4:21:53then here I will do 2 X1 and then here
  5165. 4:21:57we got 2 * c2s which means we can
  5166. 4:22:00combine them so Min - c - 6 * C2 + 4 C2
  5167. 4:22:05it gives me - 2 *
  5168. 4:22:09C2 and this is equal to
  5169. 4:22:13X2 all right let's now solve that
  5170. 4:22:18part so what I want to have is just the
  5171. 4:22:21C2 in the left hand side which means I
  5172. 4:22:23need to bring all this to the right and
  5173. 4:22:25I need to get rid of them such that I
  5174. 4:22:27can leave the C2 in the left entirely
  5175. 4:22:30alone so this is what I'm basically
  5176. 4:22:34chasing for that I'm going to once again
  5177. 4:22:38rewrite C1 is equal to X1 - 3 C2
  5178. 4:22:43and this time I'm going to take them
  5179. 4:22:46minus 2 C2 here I'm going to leave that
  5180. 4:22:49in the left but then this one I'm going
  5181. 4:22:51to bring to the right so X2 - 2
  5182. 4:22:56X1 here I need to be very careful to not
  5183. 4:22:59make a mistake CU that will mess up my
  5184. 4:23:01entire
  5185. 4:23:05calculation all right so now we are one
  5186. 4:23:07step closer just taking over the first
  5187. 4:23:10equation again so C1 is equal to X1 - 3
  5188. 4:23:14C2 and here what I need to do to get rid
  5189. 4:23:17of this minus two is to divide the two
  5190. 4:23:20sides so both 2 minus 2 CU that will
  5191. 4:23:25help me to keep the C2 only in the left
  5192. 4:23:30alone without any scaler so the C2 is
  5193. 4:23:33then equal to X2 minus 2
  5194. 4:23:37X1 / 2 - 2 so this is what I end up
  5195. 4:23:43with
  5196. 4:23:45perfect so we are very close stay with
  5197. 4:23:48me so uh here what we are getting is
  5198. 4:23:52that C2 is equal to this amount we see
  5199. 4:23:55that now we no longer have any other C
  5200. 4:23:59in here which is great and remember that
  5201. 4:24:01X1 and X2 will be numbers that it will
  5202. 4:24:03be provided to us I just wanted to give
  5203. 4:24:05everything General and then uh another
  5204. 4:24:08thing that I want to fix is this C2
  5205. 4:24:11because this C2 is an unknown and I want
  5206. 4:24:14to fill in uh this value of C2 in here
  5207. 4:24:18such that for the C1 I will have a
  5208. 4:24:21similar picture so in the left hand side
  5209. 4:24:23I will have C1 in the right hand side I
  5210. 4:24:25will Express the C1 with no number so X1
  5211. 4:24:28and X2 but not the C2 or others all
  5212. 4:24:32right so let's then go ahead and do that
  5213. 4:24:37first I will write C2 in a simpler way
  5214. 4:24:39so C2 is equal to here I got a min I
  5215. 4:24:42will just write here minus so I will
  5216. 4:24:45take the minus over here and then I will
  5217. 4:24:47write X2 - 2 X1 to U be super careful
  5218. 4:24:51with this minus therefore I'm using
  5219. 4:24:53parenthesis so now I'm going to use this
  5220. 4:24:56C2 and I'm going to fill that in in here
  5221. 4:24:58so C1 is equal to
  5222. 4:24:59X1 minus 3 * I can also make it plus
  5223. 4:25:04because minus of
  5224. 4:25:06here so minus of here and minus of here
  5225. 4:25:10will cancel out therefore I will
  5226. 4:25:14do plus three times and then X2 - 3
  5227. 4:25:22X1 /
  5228. 4:25:2522 and this then gives me
  5229. 4:25:29C1 is equal to X1
  5230. 4:25:33+ 3 / 2 * X2 - 3 sorry 2 almost made a
  5231. 4:25:41mistake 2
  5232. 4:25:43X1 and then C2 is = to X2 - 2
  5233. 4:25:48X1 /
  5234. 4:25:502 2 and here we
  5235. 4:25:55got
  5236. 4:25:57minus
  5237. 4:25:58Perfect all right awesome so now we have
  5238. 4:26:03expressed X1 and
  5239. 4:26:07X2 well careful with this X1 and X2 we
  5240. 4:26:12only noun numbers now what I'm going to
  5241. 4:26:15do is that I'm going to prove that
  5242. 4:26:18independent what kind of X we will be
  5243. 4:26:20taking here we will end up getting the
  5244. 4:26:23C1 and C2 using this what we just found
  5245. 4:26:27here that will give us a linear
  5246. 4:26:29combination of these two vectors that
  5247. 4:26:31will be equal to that eight so for that
  5248. 4:26:34so to prove that this pen of V1 and vs2
  5249. 4:26:37is the entire R2 I need to prove that
  5250. 4:26:40independent what kind of X I will take
  5251. 4:26:42so X1 and X2 I can always find the C1
  5252. 4:26:46and C2 that I um just calculate in here
  5253. 4:26:49using that X1 and X2 that I can then use
  5254. 4:26:53to combine with my V1 and V2 to find the
  5255. 4:26:56linear combination of these two vectors
  5256. 4:26:59with that C1 and C2 which will be equal
  5257. 4:27:02to this
  5258. 4:27:03x so for that what I need to do first is
  5259. 4:27:07to take such a uh random X so let's say
  5260. 4:27:11my X is equal to 0 and 4 this means that
  5261. 4:27:16my X1 is equal to 0 and X2 is equal to 4
  5262. 4:27:20what this means is that this gives me C1
  5263. 4:27:22which is equal to and here X1 so I'm
  5264. 4:27:26basically filling these two values for
  5265. 4:27:28here to obtain my C1 so C1 corresponding
  5266. 4:27:31to this specific Vector X so X1 is equal
  5267. 4:27:35to 0 which means I end up C1 is = 0 + 3
  5268. 4:27:39/ 2 * X2 is = 4
  5269. 4:27:42so 4 minus and then 2 * X1 is equal to -
  5270. 4:27:462 * 0 which is
  5271. 4:27:480 and then C2 is = to minus and then X2
  5272. 4:27:54is equal to 4 so 4 and then minus 2 * XY
  5273. 4:27:59is = to 0 0 and then this divided to two
  5274. 4:28:03now what are those
  5275. 4:28:05numbers
  5276. 4:28:07so C1 is equal
  5277. 4:28:10to 3 / 2 * 4 which is 3 * 2 so 6 and
  5278. 4:28:16then C2 is equal
  5279. 4:28:18to- 4 and then minus so this is zero
  5280. 4:28:22this cancels out which means 4 / 2 is 2
  5281. 4:28:25and then C2 is equal to minus
  5282. 4:28:282 so basically I have calculated the
  5283. 4:28:33coefficients C1 and C2 by just knowing
  5284. 4:28:38what is this Vector so knowing X the
  5285. 4:28:41provide X1 and X2 I have calculated my
  5286. 4:28:45C1 and C2 using my
  5287. 4:28:49derivations in here so let's now get rid
  5288. 4:28:52of
  5289. 4:28:56this this calculations to clear some
  5290. 4:29:00space and to do the final part which is
  5291. 4:29:03compute the linear combination of vector
  5292. 4:29:06V1 and V2 for this specific coefficients
  5293. 4:29:08well knowing what this given Vector now
  5294. 4:29:11is example random Vector so the C1 is
  5295. 4:29:17equal to 6 which means 6 * and then
  5296. 4:29:20Vector V1 is one 2 so this is first part
  5297. 4:29:24of my linear combination
  5298. 4:29:27plus and then C2 is equal to - 2
  5299. 4:29:33times then here 3 4
  5300. 4:29:46what is this this is equal
  5301. 4:29:50to 6 and then 6 * 2 is
  5302. 4:29:5512
  5303. 4:29:57plus now let's calculate the second part
  5304. 4:30:00- 2 * 3 is -
  5305. 4:30:046 and - 2 * 4 is
  5306. 4:30:09-8 so what does this give
  5307. 4:30:14us 6 - 6 and 12 - 8 this gives
  5308. 4:30:21us zero and
  5309. 4:30:25four nice so this confirms that we have
  5310. 4:30:29done everything also correctly which is
  5311. 4:30:31great because we have seen that using
  5312. 4:30:35this C1 and C2 that we have just
  5313. 4:30:38calculated we have successfully uh
  5314. 4:30:42computed the 6
  5315. 4:30:45V1 so linear combination of this uh two
  5316. 4:30:50vectors V1
  5317. 4:30:55plus -
  5318. 4:31:002 minus 2 and then
  5319. 4:31:05V2 and we have seen that this linear
  5320. 4:31:07combination is equal to 04 which is
  5321. 4:31:09exactly our 8 so in this way we have
  5322. 4:31:13proven that independent what kind of
  5323. 4:31:15vector we will pick what kind of X we
  5324. 4:31:18will pick here we can always find and
  5325. 4:31:21calculate the corresponding coefficients
  5326. 4:31:24C1 and C2 in the same way as I just did
  5327. 4:31:27and then by using those when we
  5328. 4:31:30calculate the linear combination of
  5329. 4:31:32these two vectors with this specific
  5330. 4:31:35coefficient this will be exactly equal
  5331. 4:31:37to X and this proves that independent
  5332. 4:31:41what kind of vector we have in our R2 we
  5333. 4:31:44can always express that as a linear
  5334. 4:31:47combination of the vector V1 and V2 and
  5335. 4:31:50this proves and this concludes our proof
  5336. 4:31:52that
  5337. 4:31:54span of V1 and V2 is the entire
  5338. 4:32:02R2 all right so we are very close to
  5339. 4:32:05finishing up this unit so the next topic
  5340. 4:32:08we are going to talk about is a linear
  5341. 4:32:10Independence and all this important
  5342. 4:32:13stuff that we learned as part of the
  5343. 4:32:15previous modules are going to become
  5344. 4:32:17super handy as part of this specific
  5345. 4:32:20concept so we just spoke about the idea
  5346. 4:32:22of span we have plotted a lot of vectors
  5347. 4:32:25we have seen the linear combination of
  5348. 4:32:27that and how we can find out whether the
  5349. 4:32:30span of multiple vectors is the entire
  5350. 4:32:32space uh for instance the R2 or it is
  5351. 4:32:35just the line or it's maybe the zero
  5352. 4:32:38Vector we have seen many examples and
  5353. 4:32:40many operations we have we have also
  5354. 4:32:42seen this idea of unit vectors and we
  5355. 4:32:44are finally ready to come to this very
  5356. 4:32:46important concept which is a concept of
  5357. 4:32:49linear
  5358. 4:32:51Independence so by definition linear
  5359. 4:32:54Independence says that the set of
  5360. 4:32:56vectors is linearly independent if no
  5361. 4:32:59Vector in a set can be written as a
  5362. 4:33:02linear combination of the others
  5363. 4:33:05otherwise they are linearly
  5364. 4:33:08dependent so vectors V1 V2 up to VN are
  5365. 4:33:13linearly independent if and only
  5366. 4:33:17if the only solution to the equation C1
  5367. 4:33:21V1 + C2 V2 plus CN VN is equal to zero
  5368. 4:33:27is C1 is equal to C2 up to CN is equal
  5369. 4:33:31to Zer in other words in a l linearly
  5370. 4:33:35independent set the equation C1 V1 + C2
  5371. 4:33:39V2 plus CN VN is put zero has only the
  5372. 4:33:43trial solution where all CIS are
  5373. 4:33:48zeros so now what do we mean here there
  5374. 4:33:51is a ton of information in this
  5375. 4:33:53definition so let's unpack them firstly
  5376. 4:33:55it's really important to uh keep in mind
  5377. 4:33:58this idea of
  5378. 4:34:00Independence and dependence Independence
  5379. 4:34:03and dependence there are things that we
  5380. 4:34:05commonly use in data science in
  5381. 4:34:07artificial intelligence in statistics so
  5382. 4:34:10those are really important so we
  5383. 4:34:13basically have linear independent
  5384. 4:34:17condition so there is a certain
  5385. 4:34:19condition that our vectors should
  5386. 4:34:20satisfy vectors in our set in our Vector
  5387. 4:34:24space for them to be named as linearly
  5388. 4:34:27independent and otherwise we are calling
  5389. 4:34:30them linearly dependent and you can see
  5390. 4:34:32that here there are a couple of Parts as
  5391. 4:34:35part of this definition first it talks
  5392. 4:34:38about um being unable to create a vector
  5393. 4:34:42in the vector set while using the
  5394. 4:34:45remaining vectors in our set so it says
  5395. 4:34:48if you can use the remaining vectors in
  5396. 4:34:51your vector space and linear create a
  5397. 4:34:55linear combination of them so linearly
  5398. 4:34:57combine them and we have already seen
  5399. 4:35:00the definition of linear combination so
  5400. 4:35:03if we cannot create such linear
  5401. 4:35:05combination from the remaining vectors
  5402. 4:35:08to get our Target vector
  5403. 4:35:12then we are saying that we have a
  5404. 4:35:14linearly independent vectors so if we
  5405. 4:35:17want to say that all our vectors in our
  5406. 4:35:20Vector set they are linearly independent
  5407. 4:35:23it means that each of those vectors we
  5408. 4:35:26should not be able to recreate out of
  5409. 4:35:29the remaining vectors so we should not
  5410. 4:35:31be able to find coefficients to create
  5411. 4:35:34linear combination using the remaining
  5412. 4:35:36vectors in order to get our Target
  5413. 4:35:40vector now what do I mean by this target
  5414. 4:35:43Vector what do I mean by this linear
  5415. 4:35:45combination uh I will come to this in a
  5416. 4:35:47bit for now let's just try to unpack
  5417. 4:35:49this definition cuz uh with examples uh
  5418. 4:35:53we will definitely go through this step
  5419. 4:35:55by step in detail such that this ideal
  5420. 4:35:58linear Independence and dependence is
  5421. 4:36:00super clear so in the second part of the
  5422. 4:36:03definition it says vectors V1 V2 up to
  5423. 4:36:06VN are linearly independent if and only
  5424. 4:36:10if the only solution to the equation and
  5425. 4:36:13we have here in the left hand side you
  5426. 4:36:15might recognize the linear combination
  5427. 4:36:17of our vectors V1 up to VN so in in the
  5428. 4:36:21right hand side you have zero so you are
  5429. 4:36:22saying our linear combination of vectors
  5430. 4:36:24is equal to zero if and only if C1 C2 up
  5431. 4:36:29to CN is equal to zero so linear
  5432. 4:36:33Independence basically claims that we
  5433. 4:36:36will have linearly independent vectors
  5434. 4:36:39only if and only in the condition when
  5435. 4:36:44um the only way we can create linear
  5436. 4:36:47combination of these vectors equal to
  5437. 4:36:50zero only if those coefficients are zero
  5438. 4:36:54there is no other way that we can get a
  5439. 4:36:56linear combination that is equal to zero
  5440. 4:36:59while those coefficients are not zero so
  5441. 4:37:03the only way that we can get a linear
  5442. 4:37:05combination out of all our vectors equal
  5443. 4:37:07zero is only when all of the
  5444. 4:37:10coefficients C1 1 C2 up to CN is equal
  5445. 4:37:13to zero that's something that we will
  5446. 4:37:15come later to this again this something
  5447. 4:37:18also that we are going to come back in
  5448. 4:37:20our next module and the next one so um
  5449. 4:37:24this one will be also super clear once
  5450. 4:37:26we go through those modules but for now
  5451. 4:37:29keep in mind that the uh linear
  5452. 4:37:31combination of all these vectors can
  5453. 4:37:33only be zero in case when all these
  5454. 4:37:36coefficients are equal to zero so and
  5455. 4:37:40then we have the third part in our
  5456. 4:37:42definition which says that in other
  5457. 4:37:45words in a linearly independent set the
  5458. 4:37:49equation C1 V1 plus C2 V2 up to CN VN is
  5459. 4:37:54equal to zero has only the trivial
  5460. 4:37:57solution where all CIS are zero so this
  5461. 4:38:00explanation is basically what we just
  5462. 4:38:02spoke about as part of this second part
  5463. 4:38:04where we said that only in case the
  5464. 4:38:07coefficients are all zero we can have a
  5465. 4:38:09linear combination of our vector V1 V2
  5466. 4:38:12up to VN which is equal to
  5467. 4:38:16Zer and why we would like this linear
  5468. 4:38:18combination to be equal to zero because
  5469. 4:38:21it's a common way to find solution to
  5470. 4:38:23our linear system so this is something
  5471. 4:38:26that we will also see as part of the
  5472. 4:38:28next module when we'll be discussing the
  5473. 4:38:31idea of solving linear systems we will
  5474. 4:38:33go into more uh Advanced topics but for
  5475. 4:38:36now in order to understand this idea of
  5476. 4:38:38linear Independence we should just keep
  5477. 4:38:40in mind that we cannot find any CIS so
  5478. 4:38:45C1 C2 so any coefficients that is not
  5479. 4:38:48equal to zero and then expect that the
  5480. 4:38:50linear
  5481. 4:38:51combination of these uh linearly
  5482. 4:38:54independent vectors is equal to zero so
  5483. 4:38:56that's the uh if and only uh if and only
  5484. 4:38:59uh if part which means that this holds
  5485. 4:39:01from both sides on one hand we have V1
  5486. 4:39:04V2 up to VN which are linearly
  5487. 4:39:07independent only if the linear equation
  5488. 4:39:11so the linear combination of all these
  5489. 4:39:13vectors is equal to zero if all these
  5490. 4:39:14coefficients are zero but also the other
  5491. 4:39:17way around holds as well so if we have a
  5492. 4:39:19linear combination that is equal to zero
  5493. 4:39:22only if those coefficients are zero that
  5494. 4:39:24means that we are dealing with a
  5495. 4:39:26linearly independent vectors this is the
  5496. 4:39:30if and only if part which means that we
  5497. 4:39:33have this uh conditions from both sides
  5498. 4:39:35if one holds the other one holds but
  5499. 4:39:37also the other way
  5500. 4:39:39around all right so let's now look into
  5501. 4:39:42specific examples that will make our
  5502. 4:39:44journey in understanding linear
  5503. 4:39:46dependence much more convenient so let's
  5504. 4:39:49say we have our coordinate system and we
  5505. 4:39:52have these two different vectors so we
  5506. 4:39:55have Vector let's
  5507. 4:40:06say 2 and three which is our Vector a
  5508. 4:40:11and we have a vector
  5509. 4:40:14B that is equal
  5510. 4:40:162 6 and
  5511. 4:40:20N so those two are our vectors and what
  5512. 4:40:24we want to understand is where those two
  5513. 4:40:26vectors are linearly independent or
  5514. 4:40:29linearly
  5515. 4:40:31dependent so one thing that you can
  5516. 4:40:34quickly notice is that b looks quite
  5517. 4:40:38similar to a in terms of its scal so
  5518. 4:40:42there is a way that we can recreate
  5519. 4:40:45Vector B by using Vector a now you can
  5520. 4:40:50see that if I take Vector
  5521. 4:40:55a which is equal to
  5522. 4:40:5923 if I take Vector a and I multiply it
  5523. 4:41:03by three so three * Vector a this is a
  5524. 4:41:07scale
  5525. 4:41:08multiplication then what I can get is
  5526. 4:41:14three times and then I have here two
  5527. 4:41:18three and this is then equal
  5528. 4:41:21to 3 * 2 is 6 3 * 3 is 9 this gives me 6
  5529. 4:41:27and 9 which is our uh Vector now another
  5530. 4:41:31thing that you can notice that that is
  5531. 4:41:33exactly my B so you can see that those
  5532. 4:41:37two are similar which means that three *
  5533. 4:41:43a is equal to
  5534. 4:41:47B now what this means is that I can
  5535. 4:41:50recreate Vector B by using Vector a so
  5536. 4:41:56in our definition we saw that a set of
  5537. 4:41:59vectors is linearly independent if no
  5538. 4:42:03Vector in the set can be written as a
  5539. 4:42:06linear combination of the
  5540. 4:42:08others so here I can take this 3A as a
  5541. 4:42:13way to write down a linear
  5542. 4:42:17combination so 3A + 0 *
  5543. 4:42:22B is then equal to
  5544. 4:42:27B which is basically saying 3 a is equal
  5545. 4:42:30to B so by using these two vectors in a
  5546. 4:42:34set I can then create a linear
  5547. 4:42:36combination of the two and actually even
  5548. 4:42:40basic way of writing this is saying I
  5549. 4:42:44can use the vector a to write a linear
  5550. 4:42:48combination from this so 3A is a linear
  5551. 4:42:51combination so just a scaled
  5552. 4:42:53multiplication in this case of course
  5553. 4:42:55but if we have just two vectors our
  5554. 4:42:58Target Vector is B and I want to write
  5555. 4:43:00this uh I want to see whether I can
  5556. 4:43:02rewrite the vector b as a linear
  5557. 4:43:05combination of the remaining vectors
  5558. 4:43:07which is Vector a so I can then write
  5559. 4:43:10Vector B as a linear combination of
  5560. 4:43:13vector a because I can say that 3 * a is
  5561. 4:43:16equal to Vector
  5562. 4:43:21B so this means that Vector a and Vector
  5563. 4:43:27B they are
  5564. 4:43:31linearly
  5565. 4:43:34dependent this means that I can use
  5566. 4:43:37Vector a to recreate Vector B and of
  5567. 4:43:40course I can also do the other way
  5568. 4:43:42around right what I can do is that I can
  5569. 4:43:45just
  5570. 4:43:46take Vector B so I can take Vector
  5571. 4:43:53B I can multiply it by one ided to
  5572. 4:43:58three 1 / 3 is real number so I'm just
  5573. 4:44:01performing a linear combination using B
  5574. 4:44:05and this will give me 6 / to 3 is 2 9 /
  5575. 4:44:10to 3 is Tre and I'm getting exactly what
  5576. 4:44:13I have under a so I can then also
  5577. 4:44:16rewrite Vector a by using Vector B so I
  5578. 4:44:21created a linear
  5579. 4:44:23combination using Vector B in order to
  5580. 4:44:26get a vector a and that's exactly the
  5581. 4:44:29opposite what we have learned here
  5582. 4:44:31because we should not be able to write
  5583. 4:44:34this a vectors using the other ones in
  5584. 4:44:36our set cuz otherwise we have a linearly
  5585. 4:44:40dependent set
  5586. 4:44:41therefore we are saying that Vector a
  5587. 4:44:43and Vector B they are not a set that is
  5588. 4:44:46linearly independent but they are
  5589. 4:44:49linearly dependent before moving on to
  5590. 4:44:52another example I also wanted to
  5591. 4:44:54visualize these vectors just to see what
  5592. 4:44:56is going on with this pan and uh how the
  5593. 4:44:59two linearly dependent vectors look like
  5594. 4:45:03in R2 so this is our r t we have a
  5595. 4:45:06vector a which has two tree elements so
  5596. 4:45:09we know already the magnitude and the
  5597. 4:45:11direction this is two this is three
  5598. 4:45:13which means here let me actually use
  5599. 4:45:17another
  5600. 4:45:18color so 2 three which means this is my
  5601. 4:45:22Vector a and then my Vector B is simply
  5602. 4:45:27six and N so it is this
  5603. 4:45:32one so you can already see what is going
  5604. 4:45:35on so this is Vector a and this entire
  5605. 4:45:39thing is Vector B
  5606. 4:45:47and you can see that those two vectors
  5607. 4:45:52no matter how I combine them I can I
  5608. 4:45:55will always get the combination so
  5609. 4:45:58linear combination of the two on this
  5610. 4:46:01line if I want to
  5611. 4:46:05get um Vector that is for instance in
  5612. 4:46:09here I can never
  5613. 4:46:11find a scalers of
  5614. 4:46:14C1 and C2 in such way that these
  5615. 4:46:21vectors so A and B they can form a
  5616. 4:46:25linear combination that will give me
  5617. 4:46:27this Vector there is no way that I can
  5618. 4:46:29do that and that's why uh we say that
  5619. 4:46:33this span of this two
  5620. 4:46:36vectors so span
  5621. 4:46:40of A and B with this A and B is this
  5622. 4:46:47line and we cannot express any of these
  5623. 4:46:51other vectors like this one or this one
  5624. 4:46:54using a linear combination of these
  5625. 4:46:56vectors A and B the only linear
  5626. 4:46:58combinations that we can recreate using
  5627. 4:47:00these vectors A and B are on this line
  5628. 4:47:04so you can see that even if I have two
  5629. 4:47:07different vectors I actually just got um
  5630. 4:47:10single Vector because I have two Tre and
  5631. 4:47:13both of these vectors they are actually
  5632. 4:47:16um uh scaled multiplication of the other
  5633. 4:47:19one so B is equal
  5634. 4:47:22to I'm missing here something 1 / 3 so B
  5635. 4:47:27is simply equal to 3 * a and then a is
  5636. 4:47:30equal to 1 / to 3 * B so in both cases
  5637. 4:47:35they are simply a version of scaled
  5638. 4:47:37multiplication of this Vector Q3
  5639. 4:47:41so a is simply equal
  5640. 4:47:46to
  5641. 4:47:49B * 13 and then B is equal to 3 *
  5642. 4:47:57a and both of them they are actually
  5643. 4:47:59based on this Vector 2 Tre on this
  5644. 4:48:02Vector
  5645. 4:48:05a so therefore they both actually form
  5646. 4:48:09and they span or round this single
  5647. 4:48:16line and they are
  5648. 4:48:18both linear we also call it collinear
  5649. 4:48:21and they are linearly
  5650. 4:48:25dependent okay so let's now move on to
  5651. 4:48:28the next uh example where we will have
  5652. 4:48:30bit more interesting case and we will
  5653. 4:48:32look into this example when we have
  5654. 4:48:35linear Independence
  5655. 4:48:41look into another example bit more
  5656. 4:48:43interesting one as we want to see
  5657. 4:48:44whether those two are linearly
  5658. 4:48:46independent or not so the first Vector
  5659. 4:48:49that we got is the vector a the vector a
  5660. 4:48:53is equal to 6 and Z so it is this
  5661. 4:49:00Vector this is Vector a the vector
  5662. 4:49:05B it is this
  5663. 4:49:08one and it contains element of Z 0 and
  5664. 4:49:137 so it is
  5665. 4:49:16this Vector this is the vector B now in
  5666. 4:49:21our definition of linearly independent
  5667. 4:49:25vectors we saw that the idea of linear
  5668. 4:49:28Independence is that the two vectors can
  5669. 4:49:31only be linear independent if we cannot
  5670. 4:49:34rewrite one of them by using the other
  5671. 4:49:37so this means that we cannot rewrite a
  5672. 4:49:41in terms of B and we cannot rewrite B in
  5673. 4:49:44terms of a so there is no way that we
  5674. 4:49:47can scale the vector a to get Vector B
  5675. 4:49:50and there is no way that we can scale
  5676. 4:49:51Vector B with vect with some uh scaler
  5677. 4:49:54in order to get the vector a so there is
  5678. 4:49:57no way that we can create a linear
  5679. 4:49:59combination of this one vector to get
  5680. 4:50:02the other one and the other way around
  5681. 4:50:04so let's see whether this is the case
  5682. 4:50:06just from uh trial and error we have a
  5683. 4:50:10vector a
  5684. 4:50:11which contains elements 6 and zero for
  5685. 4:50:14us to go from A to
  5686. 4:50:18B that has elements from so we need to
  5687. 4:50:23go from 6 to zero in this case and we
  5688. 4:50:26need to go from 0 to 7 now we can
  5689. 4:50:30automatically already see from the
  5690. 4:50:31second element that there is no way that
  5691. 4:50:33we can go from 0 to 7 you cannot find
  5692. 4:50:37any scaler
  5693. 4:50:39C that you can multiply with zero in
  5694. 4:50:43order to
  5695. 4:50:45get seven there is no way that you can
  5696. 4:50:48do that because any number any real
  5697. 4:50:54number that is a real number if you
  5698. 4:50:58multiply it with zero it will never
  5699. 4:51:00become
  5700. 4:51:02seven and of course another thing that
  5701. 4:51:05you can notice here also very quickly is
  5702. 4:51:07the other way around right so here if
  5703. 4:51:10you go from this zero to six there is no
  5704. 4:51:13way you can go from this Z to six
  5705. 4:51:15because there is no such C that you can
  5706. 4:51:19take this zero and multiplying it with
  5707. 4:51:22that so here our
  5708. 4:51:25scaler and you get this equal to six
  5709. 4:51:29this is just not
  5710. 4:51:33possible so what we are seeing here is
  5711. 4:51:36that there is no way that we can somehow
  5712. 4:51:39change this vector so there is no way
  5713. 4:51:42that we can scale them in such
  5714. 4:51:48way so this is minus
  5715. 4:51:51B so all the scales scaled version of
  5716. 4:51:56this or all the um scaled
  5717. 4:51:58multiplications of vector B they will
  5718. 4:52:00always be on this
  5719. 4:52:02line and then the same holds for a as
  5720. 4:52:05well so all the scaled multiplications
  5721. 4:52:08of a will be on this line
  5722. 4:52:11so then one thing we can quickly see
  5723. 4:52:13here is
  5724. 4:52:15that given that those two are
  5725. 4:52:19perpendicular this
  5726. 4:52:22pen of A and B is the entire
  5727. 4:52:28R2 so we can see that by using those two
  5728. 4:52:32lines we can recreate any other line in
  5729. 4:52:35this
  5730. 4:52:38R2 and this is highly related to this
  5731. 4:52:41idea of linear
  5732. 4:52:42Independence and given that we cannot
  5733. 4:52:44come up with a linear combination using
  5734. 4:52:47the a vectors to recreate the other one
  5735. 4:52:50in this case given that we cannot
  5736. 4:52:52recreate a using B and we cannot
  5737. 4:52:55recreate B using a so no linear
  5738. 4:52:58combination that exist that we can use
  5739. 4:53:00to recreate Bay using a and the other
  5740. 4:53:03way around we are saying that Vector a
  5741. 4:53:08and Vector B are are
  5742. 4:53:13linearly
  5743. 4:53:20independent let's now look into another
  5744. 4:53:22example that will uh clarify this linear
  5745. 4:53:25Independence concept so we have three
  5746. 4:53:28different vectors and the first Vector
  5747. 4:53:30is Vector a 1 0 0 Vector B uh 0 1 0 our
  5748. 4:53:34second vector and the third Vector 0 0 1
  5749. 4:53:37you can notice that we are in R Tree
  5750. 4:53:41and then the example goes on and it says
  5751. 4:53:43that those three vectors are linearly
  5752. 4:53:46independent and as an explanation we
  5753. 4:53:48have that there is no way to add these
  5754. 4:53:51vectors together with any scalar
  5755. 4:53:53multiples to equal the zero Vector
  5756. 4:53:56unless all scalers are zero now before
  5757. 4:53:59even going on to next part it's actually
  5758. 4:54:02very quickly um uh provable that those
  5759. 4:54:06three vectors are linearly independent
  5760. 4:54:08and you cannot create a linear
  5761. 4:54:10combination of one using the remaining
  5762. 4:54:12of the two let's look into this example
  5763. 4:54:15in more detail so we have three vectors
  5764. 4:54:24A1
  5765. 4:54:26A2 sorry
  5766. 4:54:29B so we got
  5767. 4:54:33a B and
  5768. 4:54:38C which are
  5769. 4:54:411 0
  5770. 4:54:430 0 1
  5771. 4:54:460 and 0
  5772. 4:54:5001 now you can quickly see that if we
  5773. 4:54:53are in
  5774. 4:54:54R3 and this is actually our unit Vector
  5775. 4:54:57E1 this is our unit Vector E2 and this
  5776. 4:55:00is our unit Vector E3 because in that
  5777. 4:55:03positions we got our ones and the
  5778. 4:55:05remaining they are all zero and this is
  5779. 4:55:09actually very similar to the previous
  5780. 4:55:10example because we can quickly see how
  5781. 4:55:13we are we will not be able to recreate
  5782. 4:55:16one vector using the other ones by even
  5783. 4:55:19looking at the positions of the zeros so
  5784. 4:55:22for us to recreate Vector a which is
  5785. 4:55:27equal to 1 0 0 it means that we should
  5786. 4:55:32be
  5787. 4:55:34able to
  5788. 4:55:36find a linear combination
  5789. 4:55:41C1 C2 and then using these vectors this
  5790. 4:55:45is the vector
  5791. 4:55:48B 0 1
  5792. 4:55:510 plus C2 * Vector C which is 0 0
  5793. 4:55:591
  5794. 4:56:02so in here
  5795. 4:56:04basically we are already seeing a
  5796. 4:56:08problem because we have here here an
  5797. 4:56:12element
  5798. 4:56:14one and we somehow need to be able to
  5799. 4:56:18find
  5800. 4:56:21C1 and
  5801. 4:56:23C2 in such way that 1 is equal
  5802. 4:56:27to C1
  5803. 4:56:30* 0
  5804. 4:56:32+
  5805. 4:56:36C2 time Z but we know that there is no
  5806. 4:56:40C1 and C2 that we can find such this uh
  5807. 4:56:43expression actually is true because C1
  5808. 4:56:47and C2 they should be real numbers and
  5809. 4:56:50there are no real numbers that we can
  5810. 4:56:51find to multiply with zero such that
  5811. 4:56:54this will end up to one because this is
  5812. 4:56:57always equal to zero and we basically
  5813. 4:57:00get 1 is equal to Z which is not
  5814. 4:57:04true and of course the same holds the
  5815. 4:57:07other way around you can prove that B
  5816. 4:57:09can never be um recreated by using the
  5817. 4:57:12linear combination of a and c and also
  5818. 4:57:15the C can never be recreated by using a
  5819. 4:57:17linear combination of A and B therefore
  5820. 4:57:21we are
  5821. 4:57:26saying given that
  5822. 4:57:30a can't be
  5823. 4:57:34written as linear combination
  5824. 4:57:43of B and
  5825. 4:57:48C
  5826. 4:57:51B can be
  5827. 4:57:57written so the same only this time A and
  5828. 4:58:03C and then
  5829. 4:58:05C
  5830. 4:58:07hunt B
  5831. 4:58:11written as linear combination of A and
  5832. 4:58:18B those
  5833. 4:58:22vectors A B and
  5834. 4:58:26C they
  5835. 4:58:28are
  5836. 4:58:30linearly
  5837. 4:58:38independent and if stronger you can
  5838. 4:58:41actually go ahead and prove that this
  5839. 4:58:44Spen of these three vectors is the r Tre
  5840. 4:58:48but that's outside of the scope of this
  5841. 4:58:50example so we will just pass but I will
  5842. 4:58:52leave that um to you to
  5843. 4:58:55prove all right so now when we are done
  5844. 4:58:58with that let's actually move on to the
  5845. 4:59:01last module which is the dot product and
  5846. 4:59:04its
  5847. 4:59:05applications so uh the length of a
  5848. 4:59:08vector and Dot product is a con cep that
  5849. 4:59:10um we um are familiar from the high
  5850. 4:59:13school so the length of a vector is
  5851. 4:59:15deeply related to this do product idea
  5852. 4:59:18the dotproduct of a vector v WID itself
  5853. 4:59:21gives this a square of the length of V
  5854. 4:59:25what basically um it means is that this
  5855. 4:59:29dotproduct of vector v so this thing
  5856. 4:59:33which means take the vector v and
  5857. 4:59:36multiplying it with the with the other
  5858. 4:59:38vector v is simply equal
  5859. 4:59:42to the square of a length of B
  5860. 4:59:47so this is way to express the length of
  5861. 4:59:52the uh of the vector B and once we
  5862. 4:59:55square that that is the dot product so
  5863. 4:59:58that's basically this definition what is
  5864. 5:00:00about so we know what this definition of
  5865. 5:00:03the distance is and we Define it by this
  5866. 5:00:07and then we take the square
  5867. 5:00:10of that distance and there is our DOT
  5868. 5:00:14product and we are going to see this IDE
  5869. 5:00:17of dot product a lot especially when it
  5870. 5:00:19comes to uh matrix multiplication Vector
  5871. 5:00:23multiplications also in many
  5872. 5:00:25applications of linear algebra you will
  5873. 5:00:27see this idea of that product coming
  5874. 5:00:29again uh and coming back to us so uh
  5875. 5:00:32this is a concept that we really need to
  5876. 5:00:35understand so in the two dimensional
  5877. 5:00:37space let's say we have a vector B which
  5878. 5:00:39is um consisting of the two elements X
  5879. 5:00:42and Y then the dot product and the link
  5880. 5:00:45are related by V by V this is the way we
  5881. 5:00:48denote the dot product so we just simply
  5882. 5:00:51use the dot and the name also makes
  5883. 5:00:54sense because we are saying we are using
  5884. 5:00:57the dot to perform dot product so we are
  5885. 5:00:59multiplying to two we are creating the
  5886. 5:01:01product of this Vector with itself and
  5887. 5:01:04this is equal to x² + Y 2 which is equal
  5888. 5:01:08to the uh um squared of the distance of
  5889. 5:01:12this Vector now you might recall from
  5890. 5:01:16the high school that we have learned
  5891. 5:01:18this idea of distance so if we have
  5892. 5:01:20x-axis Y axis then we basically use
  5893. 5:01:24this uh x² + y sare to uh get the uh you
  5894. 5:01:29know the formula for from our Circle and
  5895. 5:01:32then uh we have the x square + y Square
  5896. 5:01:35we take the square root of it and then
  5897. 5:01:37this is our distance so once we take the
  5898. 5:01:40square root of that square of that from
  5899. 5:01:43this uh square root of x square + y
  5900. 5:01:45Square then we are simply getting this
  5901. 5:01:48two cancel out which is equal to x² +
  5902. 5:01:51y^2 So This is highly related to this
  5903. 5:01:54idea because we are again talking about
  5904. 5:01:57distances and we are simply taking the
  5905. 5:02:00distance we are squaring them up and
  5906. 5:02:02then we are getting the dot
  5907. 5:02:05product so this the double uh straight
  5908. 5:02:09line
  5909. 5:02:10this is just a notation that we use and
  5910. 5:02:14we spoke about this also before this
  5911. 5:02:16comes um from the
  5912. 5:02:18pre-algebra and this um this is highly
  5913. 5:02:22important related to this idea of
  5914. 5:02:24pythagore theorem and how we compute the
  5915. 5:02:26distances so for instance when we have
  5916. 5:02:29this uh Square triangular so we have
  5917. 5:02:33this um uh rectangle here and we have
  5918. 5:02:37here the 90 uh
  5919. 5:02:40uh great so here we have the right uh
  5920. 5:02:43right um angle and here we have our C
  5921. 5:02:47which is uh the side right in front of
  5922. 5:02:49this uh 90° angle and here we have the A
  5923. 5:02:53and the B and we say that the c² is
  5924. 5:02:56equal to a sare + b
  5925. 5:03:00sare and if I were to actually write
  5926. 5:03:04this in terms of X and
  5927. 5:03:07Y so if this side is X and this side is
  5928. 5:03:11y and this is my Z let's say then z s
  5929. 5:03:15would be equal to x² +
  5930. 5:03:19y² and this is something that we can see
  5931. 5:03:22here too and the two terms are highly
  5932. 5:03:25related so the Z
  5933. 5:03:27squ is equal to x² + Y 2 and this is
  5934. 5:03:32simply equal to Z * Z right and this is
  5935. 5:03:36something that we know from High School
  5936. 5:03:55welcome to the module one of this new
  5937. 5:03:57unit when we are going to talk about
  5938. 5:04:00about matrices as well as linear systems
  5939. 5:04:02so those are all fundamental concepts
  5940. 5:04:05that you will see time and time again
  5941. 5:04:06when applying linear algebra not only in
  5942. 5:04:09mathematics techs but also in applied
  5943. 5:04:11sciences like data science artificial
  5944. 5:04:13intelligence when training different
  5945. 5:04:15machine learning models and trying to
  5946. 5:04:17see what is this mathematics behind
  5947. 5:04:19machine learning models different
  5948. 5:04:21optimization techniques when you want to
  5949. 5:04:23solve different problems using linear
  5950. 5:04:27algebra so in this first module as part
  5951. 5:04:29of foundations of linear systems and
  5952. 5:04:32matrices we're going to introduce this
  5953. 5:04:34concept of linear systems and then we
  5954. 5:04:37are going to talk about the general
  5955. 5:04:38linear systems we are going to uh see
  5956. 5:04:41this common labeling of the coefficients
  5957. 5:04:43this idea of indices that refer to the
  5958. 5:04:46rows and the columns we are going to see
  5959. 5:04:48what is this differentiation between
  5960. 5:04:50homogeneous and nonhomogeneous systems
  5961. 5:04:54so without further Ado let's get started
  5962. 5:04:57so uh the linear systems form the uh
  5963. 5:05:01bedr of linear algebra modeling this
  5964. 5:05:04array of problems thanks to this
  5965. 5:05:07advancements in these linear systems and
  5966. 5:05:09Sol in it in Computing we can now solve
  5967. 5:05:12a large amount of problems in a very
  5968. 5:05:15efficient and a fast
  5969. 5:05:18way so uh the general linear systems can
  5970. 5:05:21be represented by this uh set of M
  5971. 5:05:24equations with n
  5972. 5:05:26unknown in the previous unit when we
  5973. 5:05:29were looking into this uh linear
  5974. 5:05:32combination of vectors we saw this
  5975. 5:05:35notation which was A1 and then we we
  5976. 5:05:40had C1 multiplied or rather let me keep
  5977. 5:05:44me uh let me keep the same notation so
  5978. 5:05:47we had this linear combination of
  5979. 5:05:48vectors so we had beta 1 and then we had
  5980. 5:05:53A1 Plus beta 2 and then A2 and those are
  5981. 5:05:57all vectors plus A3 so beta 3 * A3 dot
  5982. 5:06:04dot dot and then beta m
  5983. 5:06:09times a m this is the notation that we
  5984. 5:06:13saw before and we said we want to come
  5985. 5:06:16up we wanted to come up with the linear
  5986. 5:06:18combination of these different vectors
  5987. 5:06:20A1 A2 A3 up to a and then we use that in
  5988. 5:06:24order to get a sense of whether we are
  5989. 5:06:26dealing with linearly independent
  5990. 5:06:28variables vectors or linearly dependent
  5991. 5:06:31vectors and then we also commented on
  5992. 5:06:33the span that these vectors
  5993. 5:06:36take now when it comes to um the uh
  5994. 5:06:40vectors and just in general linear
  5995. 5:06:42systems we can represent what we had
  5996. 5:06:45before now in terms of with a bigger
  5997. 5:06:48system so in terms of M equations and
  5998. 5:06:52with n unknowns so here what you can see
  5999. 5:06:55here is that we have M different
  6000. 5:06:59equations so we have beta B1 B2 up to
  6001. 5:07:05BM so you can see it in here and then
  6002. 5:07:09each of these equations it contains n
  6003. 5:07:12unknowns so you can see that the
  6004. 5:07:14unknowns stays the
  6005. 5:07:16same so the unknowns are those X1 X2 up
  6006. 5:07:21to xn so X1 X2 up to xn are the set of
  6007. 5:07:28all n
  6008. 5:07:33unknowns and then M equations that you
  6009. 5:07:36can see in here are all these equations
  6010. 5:07:39so a11 X1 + a12 X2 dot dot dot and then
  6011. 5:07:43a1n and then xn is equal to
  6012. 5:07:46B1 and here one thing that is really
  6013. 5:07:50important to keep in mind is that the
  6014. 5:07:54indexing is what we need to focus on so
  6015. 5:07:58we need to keep this one in mind this a
  6016. 5:08:01i
  6017. 5:08:02j and this
  6018. 5:08:04XI so this is something that we also
  6019. 5:08:08spoke about when uh discussing the
  6020. 5:08:10linear combination of vectors we
  6021. 5:08:13slightly uh touched upon on this topic
  6022. 5:08:17so let's now dive into this this
  6023. 5:08:18indexing and how do we indexes a i j
  6024. 5:08:23what are this A's what are this JS and
  6025. 5:08:27here you can see that we have a11 and
  6026. 5:08:30then a12 and then up to the a1n and this
  6027. 5:08:34is in our equation one and then we have
  6028. 5:08:39in our equation
  6029. 5:08:41two A1
  6030. 5:08:43two let may actually write this with
  6031. 5:08:45different color so in our equation two
  6032. 5:08:48we got a 21 a 23 up to
  6033. 5:08:53a2n
  6034. 5:08:54and this A's that you see here those are
  6035. 5:08:58just real numbers so a11 can be 1 A1 2
  6036. 5:09:02can be three A1 n can be 100 and then
  6037. 5:09:06the same also holds for this B1 for this
  6038. 5:09:09B2 and for this BM and all these values
  6039. 5:09:12A's and B's they are just real numbers
  6040. 5:09:16the only unknowns that we got here are
  6041. 5:09:18those so the X1 X2 up to
  6042. 5:09:31xn all right so what about the indexing
  6043. 5:09:34now so we got a i j
  6044. 5:09:39and as you can see in this
  6045. 5:09:43case the first thing that we can see
  6046. 5:09:45here it stays everywhere the same which
  6047. 5:09:47is the one so we got here one we got
  6048. 5:09:51here one and up to the point we got here
  6049. 5:09:53one whereas the second
  6050. 5:09:55Index this one it does change it grows
  6051. 5:09:59gradually with
  6052. 5:10:02one and it becomes it goes from 1 to two
  6053. 5:10:06and up to n so you can see here that the
  6054. 5:10:11first
  6055. 5:10:15index first
  6056. 5:10:19index or index
  6057. 5:10:23I it
  6058. 5:10:25goes from one it doesn't change it's
  6059. 5:10:29just one so it is one one and one so
  6060. 5:10:32here in all cases for this equation I is
  6061. 5:10:36equal to 1 but another thing that you
  6062. 5:10:39can notice here is that the index 2
  6063. 5:10:43unlike index I so the second index which
  6064. 5:10:46is the J so you see here that the second
  6065. 5:10:49index is referred as J this is a general
  6066. 5:10:52way of defining the indexes so here J is
  6067. 5:10:56equal to 1 2 dot dot dot and then
  6068. 5:11:01n so
  6069. 5:11:05basically the I doesn't change in the
  6070. 5:11:09same row but the G
  6071. 5:11:12changes and then of course we have
  6072. 5:11:15slightly different in terms of I but
  6073. 5:11:17then the same for J for our second
  6074. 5:11:19equation so here I is equal to 2 and
  6075. 5:11:22then J is again equal to one and then
  6076. 5:11:27two dot dot dot and then
  6077. 5:11:29n and then here up
  6078. 5:11:32to for the last equation our I is equal
  6079. 5:11:36to M and then our J is again equal to
  6080. 5:11:42one till two dot dot
  6081. 5:11:45dot so you might notice that I was
  6082. 5:11:48looking at this from the row perspective
  6083. 5:11:51so I was saying pair equation or pair
  6084. 5:11:56Row the I doesn't change but then the J
  6085. 5:12:02stays the same and then it is either one
  6086. 5:12:05two up to n but the set is the same so
  6087. 5:12:08it is it contains all these different
  6088. 5:12:10elements here so one one two and then n
  6089. 5:12:13but it contains all these different real
  6090. 5:12:16numbers going from one till n because we
  6091. 5:12:18are combining and we are creating this
  6092. 5:12:21combination the sum of all these values
  6093. 5:12:24a11 and then X1 a12 X2 A1 n
  6094. 5:12:29xn and another thing that you can also
  6095. 5:12:31notice here is
  6096. 5:12:34that here with the second
  6097. 5:12:39index so with this J J is equal to one
  6098. 5:12:44then here the X's corresponding index is
  6099. 5:12:46also one when the J is equal to two then
  6100. 5:12:50the ex's corresponding index is also two
  6101. 5:12:54and then here the same story and you
  6102. 5:12:56will notice that while the coefficient
  6103. 5:12:58contains two indices 1 one one 2 or 1 n
  6104. 5:13:03which are the two indices for the
  6105. 5:13:06coefficients for the unknowns we got but
  6106. 5:13:09just single index which goes from one
  6107. 5:13:13till n so basically 4 a for the
  6108. 5:13:17coefficients so
  6109. 5:13:20I let me write with the right
  6110. 5:13:23color so I can be one 2 all the way to
  6111. 5:13:30M whereas in case of
  6112. 5:13:36J it can be one to all the way to
  6113. 5:13:41n
  6114. 5:13:43and
  6115. 5:13:46the indices are basically used to help
  6116. 5:13:49us to keep track of in which row we are
  6117. 5:13:53and what is the um
  6118. 5:13:58variable that the coefficient belongs to
  6119. 5:14:01because knowing this second Index this
  6120. 5:14:06helps us to understand that we are
  6121. 5:14:07dealing with a coefficient that
  6122. 5:14:09corresponds to this
  6123. 5:14:10first unknown the first variable X1 and
  6124. 5:14:14then the same holds in here as you can
  6125. 5:14:18see in here and in here we are dealing
  6126. 5:14:20with the same variable X1 therefore the
  6127. 5:14:25second index the index J is then the
  6128. 5:14:28same both in the first equation and in
  6129. 5:14:31the second one in both cases it's equal
  6130. 5:14:33to
  6131. 5:14:35one okay so now when we are clear on
  6132. 5:14:38that let's
  6133. 5:14:41also understand this high level concept
  6134. 5:14:44because you will see this system of
  6135. 5:14:47linear systems this m equations and N
  6136. 5:14:49unknowns appearing a lot not only in
  6137. 5:14:52terms of calculating and finding the
  6138. 5:14:54solution to this linear system but this
  6139. 5:14:57actually has a very common application
  6140. 5:15:00when it comes to um running regression
  6141. 5:15:03linear regression
  6142. 5:15:05specifically and one thing that you can
  6143. 5:15:08notice here is
  6144. 5:15:10that here we got also this B1 B2 up to
  6145. 5:15:14BM and you will notice that here the
  6146. 5:15:17index also uh goes from one but then
  6147. 5:15:20this time to M so when it comes to the
  6148. 5:15:25rows we have M rows or M
  6149. 5:15:30equations therefore we also expect when
  6150. 5:15:33it comes to Counting from the top that
  6151. 5:15:35at the bottom we will see an M whereas
  6152. 5:15:38if we count
  6153. 5:15:39from this side so kind of like imagine
  6154. 5:15:43it like a column then we see that it
  6155. 5:15:45goes from one till
  6156. 5:15:47n so those are common observations and
  6157. 5:15:51reference to um number of observations
  6158. 5:15:55and number of uh features that you will
  6159. 5:15:58see in your data when dealing with data
  6160. 5:16:01analysis or modeling data so just this
  6161. 5:16:04uh just keep those things in mind this
  6162. 5:16:07uh abbrevation of M and then n m
  6163. 5:16:09equations and unknowns because this will
  6164. 5:16:12become very handy and the same also
  6165. 5:16:14holds for this indexing just to keep in
  6166. 5:16:16mind that this I and this J what those
  6167. 5:16:20indices are and how for instance the
  6168. 5:16:23first you know the I the first index
  6169. 5:16:27changes when we go from up to the bottom
  6170. 5:16:30and how the second index J goes and
  6171. 5:16:32changes when we go from left to the
  6172. 5:16:35right when we go through the columns but
  6173. 5:16:38we are going to it is also in the uh
  6174. 5:16:40upcoming slides so uh we can we will
  6175. 5:16:43have time to practice
  6176. 5:16:45it so um this is what we are calling a
  6177. 5:16:48coefficient labeling the coefficient uh
  6178. 5:16:51a i j so this thing in a linear system
  6179. 5:16:56they are labeled where the first index
  6180. 5:16:58represents the row and the second index
  6181. 5:17:01denotes the column so when we see a i j
  6182. 5:17:07we know that this
  6183. 5:17:09refers to the row and the J refers to
  6184. 5:17:14the
  6185. 5:17:15column so this is something that we use
  6186. 5:17:19in order to understand where exactly in
  6187. 5:17:21our metric something that we can we will
  6188. 5:17:24see very soon where exactly our unit or
  6189. 5:17:29our uh member that is part of our Matrix
  6190. 5:17:33where exactly is that located in which
  6191. 5:17:36row and in which column
  6192. 5:17:39the systematic labeling is super
  6193. 5:17:41important because this helps us to keep
  6194. 5:17:43the structure and this helps us to
  6195. 5:17:45understand uh what does this uh
  6196. 5:17:48coefficient represent what what is this
  6197. 5:17:50row that it belongs and what is the
  6198. 5:17:52column it belongs so for which equation
  6199. 5:17:55and for which unknown we have already
  6200. 5:17:57solved the problem such that we can know
  6201. 5:18:00what this uh coefficient
  6202. 5:18:04represents so before moving on onto the
  6203. 5:18:07actual linear systems and the definition
  6204. 5:18:09of metrices let's quickly understand
  6205. 5:18:11this distinction between homogeneous and
  6206. 5:18:13non-homogeneous because this will help
  6207. 5:18:15us to also get an understanding how we
  6208. 5:18:17can solve a system of linear systems so
  6209. 5:18:21a system is homogeneous if all the
  6210. 5:18:23constant terms b i are zero otherwise
  6211. 5:18:28it's non homogeneous so identifying this
  6212. 5:18:31helps us to really understand the nature
  6213. 5:18:34of the solution set that we need to get
  6214. 5:18:37and to understand what kind of strategy
  6215. 5:18:39we need to use in order to solve this
  6216. 5:18:42problem now what do I mean by
  6217. 5:18:44bi we is so that we had this system of M
  6218. 5:18:49equations with n unknowns and we saw
  6219. 5:18:52that that we have in the right hand side
  6220. 5:18:55this B1 B2 up to BM which means that we
  6221. 5:18:58had this m different equations with n
  6222. 5:19:02different unknowns and to find a
  6223. 5:19:05solution to the system it means finding
  6224. 5:19:08this value
  6225. 5:19:11values corresponding
  6226. 5:19:17to X1 X1 here X2 X2 xn so basically
  6227. 5:19:22finding the set of X1 X2 up to xn that
  6228. 5:19:26solves this problem and for us to know
  6229. 5:19:29how to solve this problem we need to
  6230. 5:19:30know whether this B1 is equal to zero or
  6231. 5:19:34not this B2 is equal to zero or not and
  6232. 5:19:39then this BM is equal to zero or
  6233. 5:19:42not this is very similar to this idea of
  6234. 5:19:44solving any sorts of um problems that
  6235. 5:19:48contain unknowns for instance if we have
  6236. 5:19:52three
  6237. 5:19:53x is equal
  6238. 5:19:55to let's say five solving this is
  6239. 5:20:00entirely different than if we know that
  6240. 5:20:01the tree exal to
  6241. 5:20:05Z
  6242. 5:20:07so this is a simplified version of
  6243. 5:20:10course but the IDE is the same knowing
  6244. 5:20:12that this B1 B2 up to BM this R zero
  6245. 5:20:17this gives us an idea how we can solve
  6246. 5:20:20this problem and later on we will see
  6247. 5:20:21this distinction between non-homogeneous
  6248. 5:20:23and homogeneous system and whenever
  6249. 5:20:26these BS so whenever this B1 B2 up to BM
  6250. 5:20:30whenever these BS are zero then we are
  6251. 5:20:33saying that the system is homogeneous
  6252. 5:20:35and we need to solve a homogeneous
  6253. 5:20:37system otherwi wise we are dealing with
  6254. 5:20:39nonhomogeneous system so this means that
  6255. 5:20:42the bis are not all zero let's now move
  6256. 5:20:46on to the second module which is about
  6257. 5:20:48the matrices so we are going to define
  6258. 5:20:50the Matrix we are going to see the
  6259. 5:20:52definition of it as well as the notation
  6260. 5:20:54this idea of rows columns
  6261. 5:20:57Dimensions uh some of which we have
  6262. 5:20:59already touched upon but we are going to
  6263. 5:21:02uh go into the depth of it we are going
  6264. 5:21:04to learn properly as well as we are
  6265. 5:21:06going to see many examples then we are
  6266. 5:21:09going to talk about Matrix types so here
  6267. 5:21:11we will talk about identity Matrix
  6268. 5:21:13diagonal matrices and also special type
  6269. 5:21:16of matrices like matrices containing
  6270. 5:21:18only zeros and only
  6271. 5:21:20ones so by definition add a matrix is a
  6272. 5:21:25rectangular array of real numbers that
  6273. 5:21:28are arranged in rows and in columns for
  6274. 5:21:33example an M byn Matrix a can be
  6275. 5:21:37represented as follows so let's look
  6276. 5:21:41into this definition and this reference
  6277. 5:21:44to Matrix we call this Matrix or
  6278. 5:21:49Matrix
  6279. 5:21:51a and every Matrix it can be described
  6280. 5:21:55by this rows and columns where we always
  6281. 5:22:00have this uh way of describing this
  6282. 5:22:04Matrix always should be
  6283. 5:22:06defined by the
  6284. 5:22:09number of rows and number of
  6285. 5:22:14columns so this is super
  6286. 5:22:16important and let's look into this
  6287. 5:22:19specific Matrix so we have a matrix a
  6288. 5:22:22and all these values they are members of
  6289. 5:22:25this Matrix they form the
  6290. 5:22:28Matrix and we already saw this labeling
  6291. 5:22:31of a i j where we said that I is
  6292. 5:22:36referred to the row so you might recall
  6293. 5:22:39that those were all these equations that
  6294. 5:22:41we got so this horizontal lines where I
  6295. 5:22:47was equal to 1 I I was equal to two I
  6296. 5:22:50was equal to three up to the point of I
  6297. 5:22:52was equal to M and then we had this J so
  6298. 5:22:58this thing and then J was referred to
  6299. 5:23:02the
  6300. 5:23:04columns and we had J
  6301. 5:23:09was here one and then two and then three
  6302. 5:23:12up to the point of n so one 2 3 and
  6303. 5:23:19N this is exactly what you can see here
  6304. 5:23:22so in this Matrix we got all these
  6305. 5:23:24elements a11 is a number a12 is a number
  6306. 5:23:27up to the a1n is a number those are all
  6307. 5:23:30real numbers and one thing that you can
  6308. 5:23:33notice here is that here we got a11 so
  6309. 5:23:37this is our first row and First Column
  6310. 5:23:40here we got A1 two this is our first row
  6311. 5:23:45and second column and then we got up to
  6312. 5:23:49the point of a1n actually let me just
  6313. 5:23:52write this down even at a bigger scale
  6314. 5:23:55such that I can make more
  6315. 5:24:00noes so let's assume we have this Matrix
  6316. 5:24:06a and this Matrix a
  6317. 5:24:13a if I'm
  6318. 5:24:16bigger and we got all these different
  6319. 5:24:19elements so we start with our first row
  6320. 5:24:23and here we have A1 1 so
  6321. 5:24:28here the row that I will write with
  6322. 5:24:33let's say
  6323. 5:24:35with blue the r is equal to 1 and then
  6324. 5:24:41the column is one so this is Row one
  6325. 5:24:47this is Row one row one and this is
  6326. 5:24:51column
  6327. 5:24:53one let me write it with red this is
  6328. 5:24:58column
  6329. 5:24:59one this is column
  6330. 5:25:01two this is column three dot dot dot and
  6331. 5:25:06this is column n
  6332. 5:25:09and this is row two this is Row three
  6333. 5:25:14dot dot dot and this is row M so in
  6334. 5:25:17total I got M rows and N columns I will
  6335. 5:25:24come to this notation that I'm putting
  6336. 5:25:27here later for now let's keep track of
  6337. 5:25:30the rows and the columns to get a good
  6338. 5:25:32understanding what this indices were
  6339. 5:25:34about that we just
  6340. 5:25:36learned so every time I will also
  6341. 5:25:38mention this reference to a i j to keep
  6342. 5:25:42track of this and also let me write it
  6343. 5:25:45with the right colors so a i this is the
  6344. 5:25:51row and
  6345. 5:25:53J which is the
  6346. 5:25:56column so all the elements I'm just
  6347. 5:26:00defining by this a because it just a way
  6348. 5:26:02to reference a part that comes from a
  6349. 5:26:05matrix it's a just common way to write
  6350. 5:26:07the higher matrix by capital letter A
  6351. 5:26:11whereas its members we will write with
  6352. 5:26:13the um with the lower case
  6353. 5:26:18a so this is
  6354. 5:26:21Matrix
  6355. 5:26:23Matrix
  6356. 5:26:25a all right so here in the second row
  6357. 5:26:30But First Column we got
  6358. 5:26:33a two and then one because it is still
  6359. 5:26:38in the First Column and then when it
  6360. 5:26:40comes to this
  6361. 5:26:43element we have here
  6362. 5:26:46a the row is the first one because we
  6363. 5:26:49are in the first
  6364. 5:26:50row but then we are in the second column
  6365. 5:26:53so this one should be
  6366. 5:26:56two then we go on to the next element in
  6367. 5:26:59our first row so a
  6368. 5:27:03one and then
  6369. 5:27:06three and then dot dot
  6370. 5:27:10dot the last element is an a as we are
  6371. 5:27:14still in the first row it will be one
  6372. 5:27:17the I but then given we are in the last
  6373. 5:27:20column the column index or the J will be
  6374. 5:27:23equal to
  6375. 5:27:25n because we got in total n
  6376. 5:27:29columns so we are now ready to go into
  6377. 5:27:32the second row so here given that we
  6378. 5:27:36already have our first element
  6379. 5:27:40a21 this is in our second row and the
  6380. 5:27:43First Column so the I is equal to here
  6381. 5:27:46two and G is equal to 1 let's now write
  6382. 5:27:49down the element in the second draw
  6383. 5:27:52second column as you might have already
  6384. 5:27:54guessed I is equal to here 1 I is equal
  6385. 5:27:56to here two s and then uh the J is equal
  6386. 5:28:00to
  6387. 5:28:022 and then we go on to the next element
  6388. 5:28:05which is in the second row and the third
  6389. 5:28:07column so it's a the
  6390. 5:28:11row index is 2 so I is equal to 2 and
  6391. 5:28:16then the column index is three dot dot
  6392. 5:28:19dot and then we
  6393. 5:28:22got a as we are in the second row it is
  6394. 5:28:27the I is equal to two and as we are in
  6395. 5:28:31the last column the J is equal to n now
  6396. 5:28:34you might have already guessed when I
  6397. 5:28:36was writing this down that whenever you
  6398. 5:28:38are in the row and you move on to all
  6399. 5:28:41the elements in the same
  6400. 5:28:43Row the I so the row index it stays the
  6401. 5:28:47same only you need to uh update the
  6402. 5:28:50column index so here for instance you
  6403. 5:28:52got one one one here also one so all the
  6404. 5:28:56way down in the same row or one which
  6405. 5:28:59logically makes sense because we are in
  6406. 5:29:01the same row so the row index should not
  6407. 5:29:04change but instead you should change the
  6408. 5:29:06column index like here column one column
  6409. 5:29:08two column three all the way to column n
  6410. 5:29:11so those are our
  6411. 5:29:16columns dot dot dot so let me make this
  6412. 5:29:22distinction and
  6413. 5:29:24those are our
  6414. 5:29:28rows as you can
  6415. 5:29:32see so this kind of mentally helps us to
  6416. 5:29:35understand why we are writing all these
  6417. 5:29:37indices
  6418. 5:29:39over time once you practice more with
  6419. 5:29:41this this will become more
  6420. 5:29:48natural very quickly remove
  6421. 5:29:51this so now our ride rest very quickly
  6422. 5:29:55so as you might have already guessed we
  6423. 5:29:57are in the third row so we have a tree
  6424. 5:30:00so everywhere I will just write down
  6425. 5:30:05the ace so first write down the A's and
  6426. 5:30:10then the rows the row index will stay
  6427. 5:30:13the same as I in the same row but then I
  6428. 5:30:16will increase the columns gradually so
  6429. 5:30:18we are in the column one and the column
  6430. 5:30:19two column three up to the column n so
  6431. 5:30:24now the remaining stuff you can actually
  6432. 5:30:26write down yourself to just
  6433. 5:30:29practice let's now move on on to the
  6434. 5:30:32last row and last column so in the last
  6435. 5:30:35row we got a a a up to
  6436. 5:30:40here and in the last show the uh row
  6437. 5:30:44index is M which means that here I need
  6438. 5:30:47to have M M M everywhere I need to have
  6439. 5:30:51M and then the column index is 1 2 3 all
  6440. 5:30:57the way to
  6441. 5:31:00n so this last column is very
  6442. 5:31:03interesting too you can see here that we
  6443. 5:31:06have the opposite of what we have here
  6444. 5:31:10because in the last column we see that
  6445. 5:31:14the uh column index is the same so it is
  6446. 5:31:19everywhere n Only the first index the
  6447. 5:31:21index of the row it changes it goes from
  6448. 5:31:241 2 3 up to M which is of course logical
  6449. 5:31:27because we said that in the last column
  6450. 5:31:29if we are looking it from the
  6451. 5:31:30perspective of column so all these
  6452. 5:31:33values this A's so the all the ends they
  6453. 5:31:36are logical because they we are in the
  6454. 5:31:38last column we are in the same column
  6455. 5:31:41but then the row changes here we are in
  6456. 5:31:42the row one here we are in the row two
  6457. 5:31:44Row three of two row M therefore we have
  6458. 5:31:47also at the end a m
  6459. 5:31:50n now let's talk about this idea of
  6460. 5:31:54MN we said that our Matrix
  6461. 5:31:58a
  6462. 5:32:01has
  6463. 5:32:03M as a number of rows
  6464. 5:32:08and n as a number of
  6465. 5:32:12columns which you can see by the way
  6466. 5:32:14also
  6467. 5:32:16here so we always refer the dimension of
  6468. 5:32:21a
  6469. 5:32:22matrix so the
  6470. 5:32:26dimension dimension of Matrix a by these
  6471. 5:32:31two
  6472. 5:32:34numbers so first we always write down
  6473. 5:32:37the number of rows in this case
  6474. 5:32:42M then as the second element we are
  6475. 5:32:46writing the number of columns in this
  6476. 5:32:49case n we are always putting this small
  6477. 5:32:51X in between two kind of emphasize M by
  6478. 5:32:56n Matrix and we most of the time use the
  6479. 5:33:00square braces to Showcase that we are
  6480. 5:33:02dealing with Dimension and in this case
  6481. 5:33:05we are saying the dimension of Matrix a
  6482. 5:33:08is equal to M byn so we are dealing with
  6483. 5:33:12M byn Matrix this is a common convention
  6484. 5:33:16used in linear algebra in mathematics
  6485. 5:33:18General but also used in data science uh
  6486. 5:33:21in machine learning artificial
  6487. 5:33:23intelligence so whenever you are dealing
  6488. 5:33:25with matrices a it is a common
  6489. 5:33:27convention to talk about this idea of
  6490. 5:33:30dimensions and the idea of Dimensions is
  6491. 5:33:33super important when it comes to the
  6492. 5:33:35idea of multiplication multiplying
  6493. 5:33:38Vector with Matrix Matrix with Matrix so
  6494. 5:33:41this dot product Dimensions play a
  6495. 5:33:44central role in here so keep this one in
  6496. 5:33:47mind once we uh get to the point of that
  6497. 5:33:50products this one will become very handy
  6498. 5:33:52so let's now look into a specific
  6499. 5:33:54example where we see simple Matrix a so
  6500. 5:33:57in this case you can see that we are
  6501. 5:33:59dealing with a matrix that has a 2x3
  6502. 5:34:01Dimensions so like we just learned
  6503. 5:34:062x3 means that we
  6504. 5:34:11got two
  6505. 5:34:15rows and three
  6506. 5:34:19columns that's something that you can
  6507. 5:34:21also see here very quickly so you have a
  6508. 5:34:24small Matrix on the small matrix it's
  6509. 5:34:26really easy to actually count so you can
  6510. 5:34:29see that we got Row one and row two and
  6511. 5:34:32we got column 1 column two and column
  6512. 5:34:35three so this basically confirms this
  6513. 5:34:37Dimensions therefore we are also saying
  6514. 5:34:40that we have a 2
  6515. 5:34:43by three Matrix and like usual we first
  6516. 5:34:48write down the number of rows and then
  6517. 5:34:50the number of columns you can see here
  6518. 5:34:53that here we have this elements for our
  6519. 5:34:56Matrix so a is equal to 1 2 3 for the
  6520. 5:34:58first row and then uh 4 5 6 for the
  6521. 5:35:01second row so from this actually I think
  6522. 5:35:05it's a good exercise to just uh very our
  6523. 5:35:08understanding of indices and from this
  6524. 5:35:11um we can write down that for instance
  6525. 5:35:13all these different elements uh like a 1
  6526. 5:35:171 is equal to 1 A1 2 which means that we
  6527. 5:35:21are in the first row and in the second
  6528. 5:35:24column so we have this element is equal
  6529. 5:35:29to two and then we got a and then one
  6530. 5:35:34Tre so we are in the third column so
  6531. 5:35:37this one 1 is equal
  6532. 5:35:40to 3 and then a 21 is equal to 4 a 22 is
  6533. 5:35:48equal to 5 and then a 23 is equal to 6
  6534. 5:35:53so this is actually a good way to
  6535. 5:35:56practice our understanding of indices
  6536. 5:35:58our understanding of this Matrix
  6537. 5:36:00structure and the understanding of
  6538. 5:36:02dimension of the Matrix which in this
  6539. 5:36:04case is 2x3 so this is yet another
  6540. 5:36:07different definition of a matrix
  6541. 5:36:09structure when it comes to the rows coms
  6542. 5:36:11and dimensions so this is exactly what
  6543. 5:36:14we just spoke about on our example and
  6544. 5:36:17let's just quickly look at the formal
  6545. 5:36:19definition so the rows of a matrix are
  6546. 5:36:22the horizontal lines of the of the
  6547. 5:36:24entries while the comms are the vertical
  6548. 5:36:27lines so basically it's saying those are
  6549. 5:36:32let me remove
  6550. 5:36:34this so the rows are are the horizontal
  6551. 5:36:39line and the columns are those vertical
  6552. 5:36:42lines those are the columns this helps
  6553. 5:36:45us to form these columns so column one
  6554. 5:36:47column two and column three whereas this
  6555. 5:36:49horizontal lines it helps us to create
  6556. 5:36:51the rows so Row one and row
  6557. 5:36:54two so then we have the dimensions of
  6558. 5:36:56Matrix are given by the number of rows
  6559. 5:36:58and columns it has so an M by n Matrix
  6560. 5:37:02has M rows and N columns that's
  6561. 5:37:07something that that we already
  6562. 5:37:08saw so let's look into some special type
  6563. 5:37:12of matrices one Matrix type is the
  6564. 5:37:16identity Matrix so we saw before we had
  6565. 5:37:18this Identity or unit Vector now we have
  6566. 5:37:23identity Matrix so the two are quite
  6567. 5:37:26similar so like before when we had our
  6568. 5:37:29unit vectors we had this for instance E1
  6569. 5:37:34in three dimension we had 1 0 0 then we
  6570. 5:37:37had our E2 which had 0 1 0 and then we
  6571. 5:37:42had our E3 which was 0 01 so you might
  6572. 5:37:46recall this about our identity vectors
  6573. 5:37:49or we were calling it unit factors you
  6574. 5:37:52might notice very quickly that we have
  6575. 5:37:55formed an identity Matrix i n which is a
  6576. 5:37:59square Matrix with one on the diagonal
  6577. 5:38:02and zeros elsewhere is basically a
  6578. 5:38:05matrix that is built using those unit
  6579. 5:38:08vectors so here we have E1 here we have
  6580. 5:38:11E2 and here we have
  6581. 5:38:13E3 so you can also see that this
  6582. 5:38:183x3 Matrix because we got three
  6583. 5:38:22rows and three
  6584. 5:38:27columns so you can see that here we
  6585. 5:38:31have on the diagonal so we call this
  6586. 5:38:35diagonal on this diagonal we have all
  6587. 5:38:38ones and in
  6588. 5:38:40here outside of the diagonal they are
  6589. 5:38:43all zeros and this is the definition of
  6590. 5:38:46identity Matrix it is this i n Matrix
  6591. 5:38:49where n is the dimension of a matrix and
  6592. 5:38:54given that it's a square Matrix it means
  6593. 5:38:56that the dimension of it is n by n so
  6594. 5:38:59all the rows so the number of rows is
  6595. 5:39:01equal to the number of columns on the
  6596. 5:39:04diagonal we have all these ones and
  6597. 5:39:06every where else we got
  6598. 5:39:09zeros and do note that we are forming
  6599. 5:39:12this identity Matrix simply by combining
  6600. 5:39:15these different uh unit vectors so like
  6601. 5:39:18here E1 E2 and
  6602. 5:39:21E3 so let me actually uh give you yet
  6603. 5:39:24another example but of much higher
  6604. 5:39:28Dimension so of this identity Matrix so
  6605. 5:39:31let's say we have I and then this I
  6606. 5:39:38uh let us actually use this notation i
  6607. 5:39:41n so let's say we got i
  6608. 5:39:47n what this means is that we got
  6609. 5:39:50actually this large
  6610. 5:39:52matrix it's a square Matrix which means
  6611. 5:39:56that it is n by n so it has n as the
  6612. 5:40:01number of rows
  6613. 5:40:10and n as number of
  6614. 5:40:13columns so the dimension is n by n you
  6615. 5:40:17got n as number of columns too because
  6616. 5:40:20it's a square and let us actually write
  6617. 5:40:24down that how that Matrix looks like
  6618. 5:40:27it's a large Matrix the N is the size of
  6619. 5:40:30that Matrix so here we got on the
  6620. 5:40:34diagonal we got one here we got one here
  6621. 5:40:37we got one dot dot dot up to the last
  6622. 5:40:39point one and the index of this one here
  6623. 5:40:45so this is the first row this the First
  6624. 5:40:47Column
  6625. 5:40:51basically and everything else is simply
  6626. 5:40:55zero so here we got z0 0 dot dot dot
  6627. 5:41:00zero here we got 0 0 all the way down to
  6628. 5:41:04zero here also zero all the way down to
  6629. 5:41:06Z
  6630. 5:41:08and then here also zero so everywhere
  6631. 5:41:11here and here we all got zeros only on
  6632. 5:41:15this
  6633. 5:41:16diagonal we actually got
  6634. 5:41:19once so basically by using our common
  6635. 5:41:24notation we can say that in the D in the
  6636. 5:41:28identity Matrix we got a 1 1 = to a 22 =
  6637. 5:41:34to a 33 equal to all the way to a NN
  6638. 5:41:40equal to 1 and then when it comes down
  6639. 5:41:45to the rest of
  6640. 5:41:48the cases so all the other
  6641. 5:41:52observations let's
  6642. 5:41:55say a
  6643. 5:41:5921
  6644. 5:42:02a 31 or a 41
  6645. 5:42:08anything so anything that is not um a11
  6646. 5:42:12or a22 anything that is not on the
  6647. 5:42:14diagonal it is simply equal to zero we
  6648. 5:42:17also say in those cases that a i j is
  6649. 5:42:21equal to
  6650. 5:42:241 if I is equal to J because then it
  6651. 5:42:29means that we are talking about item
  6652. 5:42:31that is on diagonal because both the row
  6653. 5:42:33index is equal to the column index
  6654. 5:42:37otherwise
  6655. 5:42:40the a i
  6656. 5:42:43j is equal to Zer if I is not equal to
  6657. 5:42:50J so this is in the nutshell how a large
  6658. 5:42:54identity Matrix in general can be
  6659. 5:42:58defined so let's now move on to another
  6660. 5:43:01type of Matrix which is the diagonal
  6661. 5:43:03matrix so by definition a diagonal
  6662. 5:43:06matrix is a matrix where all of diagonal
  6663. 5:43:09elements are zero so what does this mean
  6664. 5:43:14we is saw um example of a diagonal
  6665. 5:43:18matrix which was our identity Matrix
  6666. 5:43:21because identity Matrix is an example of
  6667. 5:43:25a diagonal matrix and what do I mean by
  6668. 5:43:27that in our just seen example we saw
  6669. 5:43:31that only on the diagonal we had all
  6670. 5:43:33these nonzero elements but the rest were
  6671. 5:43:37all zeros so all the off diagonal
  6672. 5:43:39elements were
  6673. 5:43:41zeros like in here and in here exactly
  6674. 5:43:44the same holdes for the diagonal
  6675. 5:43:46matrices only unlike in the identity
  6676. 5:43:49Matrix we no longer need to have this
  6677. 5:43:52diagonal elements equal to one those can
  6678. 5:43:55be any other numbers so as long as we
  6679. 5:43:58have this um elements D1 D2 D3 that are
  6680. 5:44:03not zeros but then of the diagonal
  6681. 5:44:06numbers so all these elements they are
  6682. 5:44:08zero then we are dealing with the
  6683. 5:44:10diagonal matrix so in this case we got a
  6684. 5:44:143X3 diagonal matrix because we have uh
  6685. 5:44:17three rows and three columns and here we
  6686. 5:44:21can see that the um the first so the a11
  6687. 5:44:25the first element from the first draw
  6688. 5:44:27and First Column is equal to D1 so a 22
  6689. 5:44:32is equal to D2 and then a33 is equal to
  6690. 5:44:37D3 so D1 D2 and D3 those are all so D1
  6691. 5:44:43D2 and D3 those are all real
  6692. 5:44:48numbers now when it comes to the uh this
  6693. 5:44:51numbers for example it can be that D is
  6694. 5:44:55let's say 2 five 6 on diagonal then we
  6695. 5:45:00have those zeros this is a diagonal
  6696. 5:45:04matrix it can also be
  6697. 5:45:08that D is equal to minus 3 and then 0 0
  6698. 5:45:15and then 5 8 and then here we have zeros
  6699. 5:45:20so again we have on the diagonal all
  6700. 5:45:23these elements and the off diagonal
  6701. 5:45:26elements so if all the off diagonal
  6702. 5:45:28elements are zero then we are dealing
  6703. 5:45:30with diagonal matrix and if you
  6704. 5:45:33wondering well what happens if on the
  6705. 5:45:35diagonal we got zero do we still have a
  6706. 5:45:38diagonal matrix it's actually a great
  6707. 5:45:40question but yes indeed we are dealing
  6708. 5:45:43with the diagonal matrix as long as all
  6709. 5:45:46the off diagonal elements are zero so
  6710. 5:45:49for instance if we got D is
  6711. 5:45:53equal here we have zero here we have 0 0
  6712. 5:45:570 and then 7 and then 0o and then 8 and
  6713. 5:46:02then 0 0 so we got this of diagonal
  6714. 5:46:06elements so here are the diagonal
  6715. 5:46:09elements and all the of diagonal
  6716. 5:46:11elements are those given that all the of
  6717. 5:46:15diagonal elements are zero which is the
  6718. 5:46:18definition of the diagonal matrix then
  6719. 5:46:20we can say that our D Matrix in here is
  6720. 5:46:24indeed a diagonal
  6721. 5:46:29matrix let's now look into yet another
  6722. 5:46:31type of Matrix which is a special type
  6723. 5:46:33of Matrix and it's called one's Matrix
  6724. 5:46:37so by definition one's Matrix is denoted
  6725. 5:46:40by 1 M1 so you can see here and here it
  6726. 5:46:44mens the dimension of it so the number
  6727. 5:46:46of rows and number of columns and it's a
  6728. 5:46:49matrix in which all the elements are
  6729. 5:46:52one so this is a very unique Matrix we
  6730. 5:46:56often use it during the programming so
  6731. 5:46:58in data science data analytics but also
  6732. 5:47:01in um uh when creating like data
  6733. 5:47:03structures when designing algorithms
  6734. 5:47:06this becomes very very handy and this
  6735. 5:47:09idea of one's Matrix is that all the
  6736. 5:47:12elements are just one it means that if
  6737. 5:47:15we want to create a placeholder in such
  6738. 5:47:17way that we can then multiply any number
  6739. 5:47:20in here with some other number and get
  6740. 5:47:22that number then it can be done very
  6741. 5:47:24easily because we know that when we
  6742. 5:47:27multiply a number with one then we get
  6743. 5:47:29that number so a * 1 is = to a x * 1 is
  6744. 5:47:34= to X now this is a exactly this
  6745. 5:47:37property exactly is what motivates us to
  6746. 5:47:40create and to have this type of ones
  6747. 5:47:43matrices it means that we are defining
  6748. 5:47:47matrix by its Dimension so it is M by n
  6749. 5:47:51and here the m is equal to two and then
  6750. 5:47:54n is equal to three because we got two
  6751. 5:47:57rows and three columns but you can see
  6752. 5:48:00that all the elements are the same and
  6753. 5:48:02they are equal to one so a11 is equal to
  6754. 5:48:05A1 2 is equal to a13 is equal to a uh 21
  6755. 5:48:11and is equal to a 22 and a 23 and they
  6756. 5:48:15are all equal to one and this is the
  6757. 5:48:18definition of one's Matrix you can have
  6758. 5:48:21um on Matrix of the size 4 by 10 On's
  6759. 5:48:27Matrix of the size
  6760. 5:48:30th let say 10,000
  6761. 5:48:34by 100 Etc so any number any real number
  6762. 5:48:39so M and then n are real numbers you can
  6763. 5:48:42use in order to create this large M by
  6764. 5:48:46n1's
  6765. 5:48:49matrix let's now look into our final
  6766. 5:48:52special type of Matrix before moving on
  6767. 5:48:54onto the next module which is about zero
  6768. 5:48:57matrices so similar to this one Matrix a
  6769. 5:49:01zero Matrix denoted by 0 m by N is a
  6770. 5:49:06matrix in which all the elements are the
  6771. 5:49:08same with the one difference that this
  6772. 5:49:11time all the elements are equal to zero
  6773. 5:49:13so in the on Matrix all the elements
  6774. 5:49:15were ones but in the zero Matrix all the
  6775. 5:49:17elements are zero this type of matrices
  6776. 5:49:21become very handy also during the
  6777. 5:49:23programming creating um different
  6778. 5:49:25algorithms during design encoding um but
  6779. 5:49:29for slightly different purposes usually
  6780. 5:49:32we create the zero matrices as a
  6781. 5:49:34placeholder such that in the beginning
  6782. 5:49:36we can have this uh tups or we can have
  6783. 5:49:38this um uh arrays or nested Loops um
  6784. 5:49:42that we want to perform and then
  6785. 5:49:45gradually add these values to the
  6786. 5:49:47existing Mt array so if we create this
  6787. 5:49:51Zer Matrix and um this is a placeholder
  6788. 5:49:55then next time we can always add on this
  6789. 5:49:58this new data that we get and then we
  6790. 5:50:01know that zero plus a number is always
  6791. 5:50:04equal to number which means that once we
  6792. 5:50:07have this updated information of a we
  6793. 5:50:09can add this to the zero and we will
  6794. 5:50:11then have this new updated information
  6795. 5:50:13in our system therefore the zero Matrix
  6796. 5:50:16is often used as a way to uh have this
  6797. 5:50:20placeholder with the provided Dimension
  6798. 5:50:22where we can always add new information
  6799. 5:50:25and the information can be
  6800. 5:50:27updated so in this specific case we got
  6801. 5:50:30um a zero Matrix that has two rows and
  6802. 5:50:33three columns so you can see two rows
  6803. 5:50:37and three
  6804. 5:50:40columns so m is equal to 2 and then n is
  6805. 5:50:44equal to three three perfect so we are
  6806. 5:50:48done with module 2 and now we are ready
  6807. 5:50:50to go on to our next module which is the
  6808. 5:50:54core Matrix operations so when it comes
  6809. 5:50:57to matrices we often perform Matrix
  6810. 5:51:01additions Matrix subtraction but also
  6811. 5:51:04Matrix um scalar multiplication of this
  6812. 5:51:06Matrix so multiplying Matrix with a
  6813. 5:51:08scaler and then Matrix um multiplication
  6814. 5:51:12just in general so taking two matrices
  6815. 5:51:15and multiplying them we are going to
  6816. 5:51:17look into this concept in detail we are
  6817. 5:51:19going to see many examples like before
  6818. 5:51:22we are going to dive deeper into this
  6819. 5:51:24such that we lay the ground on uh to the
  6820. 5:51:27next module which is solving a system of
  6821. 5:51:30M equations with an unknown so solving
  6822. 5:51:33this General um linear system
  6823. 5:51:37so for the beginning uh we will be
  6824. 5:51:40looking into this Matrix operations
  6825. 5:51:42where we are adding or subtracting
  6826. 5:51:44matrices so by definition the sum of two
  6827. 5:51:47matrices A and B of the same dimensions
  6828. 5:51:50is obtained by adding their
  6829. 5:51:51corresponding elements so by taking the
  6830. 5:51:55element i j from both matrices and
  6831. 5:51:59adding them to each other so in this
  6832. 5:52:01case you can see that Matrix A and B are
  6833. 5:52:04here and uh the uh definition says we
  6834. 5:52:09just simply need to take the
  6835. 5:52:10corresponding elements corresponding
  6836. 5:52:12elements from the row I and the column J
  6837. 5:52:16take them add them and this will become
  6838. 5:52:19an element in our final um Matrix
  6839. 5:52:24because when we are adding two matrices
  6840. 5:52:27of the same size the result is yet
  6841. 5:52:29another Matrix so we will use the Matrix
  6842. 5:52:32a to add to Matrix B and this will give
  6843. 5:52:36us a matrix A + B and this i j simply
  6844. 5:52:42refers to the indices corresponding to
  6845. 5:52:44the row and the
  6846. 5:52:46column we will look into an example in a
  6847. 5:52:48bit and this will make much more sense
  6848. 5:52:51and the same holds also for the
  6849. 5:52:53difference so by definition the
  6850. 5:52:55difference of the two matrices A and B
  6851. 5:52:57of the same dimensions is obtained by
  6852. 5:52:59subtracting their corresponding Elements
  6853. 5:53:02which means that in order to obtain this
  6854. 5:53:05Matrix a minus B this is a new Matrix we
  6855. 5:53:10simply need to look for each element so
  6856. 5:53:13we are going to index them for a row I
  6857. 5:53:16and J we are going to do this pairwise
  6858. 5:53:19element wise subtractions we are going
  6859. 5:53:22to see what is that element
  6860. 5:53:24corresponding to the row I and column G
  6861. 5:53:26in The Matrix a which we say is a i j we
  6862. 5:53:31are going to subtract from this the
  6863. 5:53:33element in the row I
  6864. 5:53:36and column G that comes from Matrix B
  6865. 5:53:39and this will give us our new Matrix
  6866. 5:53:41which is a minus
  6867. 5:53:44B so let's now look into an example in
  6868. 5:53:47this Matrix Matrix um uh a and Matrix B
  6869. 5:53:51are used and Matrix a is of the size 3x3
  6870. 5:53:54Matrix 3 Matrix B is of the
  6871. 5:53:57size 3x 3 in order to obtain a plus b
  6872. 5:54:03what we are doing is that we are
  6873. 5:54:05performing element wise additions now
  6874. 5:54:08let's verify
  6875. 5:54:10this so what we are doing here is that
  6876. 5:54:13we are saying a plus
  6877. 5:54:16b let me actually get a larger area
  6878. 5:54:21here so let's say we have the two
  6879. 5:54:23matrices I want to add the two in such
  6880. 5:54:26way that we do everything one by one
  6881. 5:54:28such that this idea of a plus b and
  6882. 5:54:31addition of the matrices will make
  6883. 5:54:33sense so we want to find out a plus b
  6884. 5:54:37for that what we are going to do is that
  6885. 5:54:40we are going to make use of this
  6886. 5:54:42definition that A + B and then I J is
  6887. 5:54:46equal to a i j+ b i j which is a fancy
  6888. 5:54:53way or mathematical way or describing
  6889. 5:54:55that for each element we need to go and
  6890. 5:54:57look for the row I and column J and take
  6891. 5:55:01that element from the um column from
  6892. 5:55:04that uh Matrix a and from the Matrix
  6893. 5:55:07B so this means
  6894. 5:55:10that for a + b this is going to be a
  6895. 5:55:16matrix that will have the same number of
  6896. 5:55:18rows and the same number of columns as
  6897. 5:55:20two matrices because both A and B are
  6898. 5:55:233x3 which means also their sum is going
  6899. 5:55:26to be 3x3 so this going to be 3x3 and
  6900. 5:55:30here we are going to do so we are going
  6901. 5:55:32to take for the first row in the First
  6902. 5:55:36Column so for
  6903. 5:55:40A+
  6904. 5:55:42b 1 1 so first row and First Column we
  6905. 5:55:46need to go to the first row and First
  6906. 5:55:48Column of Matrix a and the first row and
  6907. 5:55:51First Column of Matrix B and we need to
  6908. 5:55:53add these two elements so we need to do
  6909. 5:55:571 + 1 and then we need to go on to the
  6910. 5:56:01second column so the first row and the
  6911. 5:56:03second column which means that we need
  6912. 5:56:05to be here
  6913. 5:56:08in both
  6914. 5:56:09matrices so here we have 0 + 2 and then
  6915. 5:56:14we got 2 + 3 and then we got 0 + 0 so
  6916. 5:56:18you can see it in
  6917. 5:56:20here and then we have 1 + 0 and then we
  6918. 5:56:23have 3 + 1 0 + 1 and then 0 + 2 and then
  6919. 5:56:291 + three which gives us
  6920. 5:56:37so 1 + 1 is = to 2 0 + 2 is = 2 and then
  6921. 5:56:432 + 3 is = to 5 0 + 0 is equal to 0 0 +
  6922. 5:56:481 is = to 1 1 + 0 is = to 1 0 + 2 is =
  6923. 5:56:52to 2 and then 3 + 1 is = 4 1 + 3 is = to
  6924. 5:56:574 which means that our A + B is equal to
  6925. 5:57:01this Matrix that we got in here so you
  6926. 5:57:05can see that we are getting exactly what
  6927. 5:57:07we uh what we have here only we have
  6928. 5:57:10done it manually one by one so the same
  6929. 5:57:13idea holds exactly when we have a minus
  6930. 5:57:16B only instead of adding you will have
  6931. 5:57:19to do here minuses so minus minus so
  6932. 5:57:23everywhere minus so 1 - 1 0 - 2 2 - 3
  6933. 5:57:30Etc so let's look into another addition
  6934. 5:57:33so in this case by definition it is
  6935. 5:57:36defined as this element wise uh of the
  6936. 5:57:39adding of these two matrices here the
  6937. 5:57:42only difference in this definition is
  6938. 5:57:44that it's saying it's calling this a
  6939. 5:57:46plus b as C so this new Matrix that we
  6940. 5:57:51are getting as a result of adding a to B
  6941. 5:57:54it's calling C so basically it's the
  6942. 5:57:56same as calling this Matrix as C you
  6943. 5:57:59will see also this type of definitions
  6944. 5:58:01so in this case The Matrix C is equal to
  6945. 5:58:04a plus b which basically means that for
  6946. 5:58:06each row with index I and with each
  6947. 5:58:10column with index J go and look for row
  6948. 5:58:14I and index J take the corresponding
  6949. 5:58:16elements from Matrix a and Matrix B add
  6950. 5:58:19them in order to get that corresponding
  6951. 5:58:21element in our new Matrix C and you can
  6952. 5:58:25see that in this example that's exactly
  6953. 5:58:27what we are doing we have a we have B we
  6954. 5:58:29are taking this element and this one so
  6955. 5:58:321 + 1 we are getting here two and then 0
  6956. 5:58:35+ 2 we are getting two here 2 + 3 is 5
  6957. 5:58:39and then 0 + 0 is = 0 1 + 0 is = to 1
  6958. 5:58:43and then 3 + 1 is equal to
  6959. 5:58:464 so now we already go to the next topic
  6960. 5:58:49which is about scalar multiplication of
  6961. 5:58:51a matrix so by definition scalar
  6962. 5:58:54multiplication of a matrix a by scalar
  6963. 5:58:57Alpha results in new Matrix where each
  6964. 5:59:00entry of a is multiplied by Alpha the
  6965. 5:59:04idea of scalar multiplication matrices
  6966. 5:59:06is actually quite similar to this idea
  6967. 5:59:09of scaled multiplication in vectors so
  6968. 5:59:12uh we have already seen in the lecture
  6969. 5:59:15of the vector multiplication that when
  6970. 5:59:17we were having this scaler C and we had
  6971. 5:59:22this Vector
  6972. 5:59:24a then uh when we are multiplying C
  6973. 5:59:28which is a real number with Vector a
  6974. 5:59:30then we simply need to take all the
  6975. 5:59:33elements of vector a so A1 A2 all the
  6976. 5:59:37way down to a n and we need to multiply
  6977. 5:59:40them by this same scaler so
  6978. 5:59:44see this is what we were doing with
  6979. 5:59:47vectors and that's exactly the idea
  6980. 5:59:49behind matrices and when uh doing the
  6981. 5:59:52scalar multiplication of matrices only
  6982. 5:59:55instead of multiplying only just one
  6983. 5:59:58vector with this scaler C now we need to
  6984. 6:00:02apply this to all the rows and all the
  6985. 6:00:04columns so here we got this one column
  6986. 6:00:06and Matrix is simply a combination of
  6987. 6:00:09multiple vectors which means that we
  6988. 6:00:11need to multiply all these elements of
  6989. 6:00:14all the vectors of all the columns in
  6990. 6:00:17this Matrix so let's actually look into
  6991. 6:00:20a specific
  6992. 6:00:22example so in this case we have a matrix
  6993. 6:00:25a and this Matrix a is this thing and we
  6994. 6:00:30have a scaler which is three so in here
  6995. 6:00:32our Alpha is equal to three or you can
  6996. 6:00:34call it C or anything so you can see
  6997. 6:00:39that when we are scaling The Matrix with
  6998. 6:00:43a scaler in this case Tre with this
  6999. 6:00:46Matrix what we are doing is that we are
  7000. 6:00:48simply taking each of these elements and
  7001. 6:00:50multiplying it with this scum so 1 by 3
  7002. 6:00:53is 3 2x 3 is 6 3x 3 is 9 and 4x 3 is
  7003. 6:01:0012 this is the idea behind this entire
  7004. 6:01:04scal multiplication ofation Matrix in
  7005. 6:01:07more general terms if we for instance
  7006. 6:01:10have a matrix a so let's actually look
  7007. 6:01:13into a high level General example where
  7008. 6:01:16we have a DA Matrix M by n so we got M
  7009. 6:01:21rows and N columns and we want to get a
  7010. 6:01:24scal multiplication of this Matrix and
  7011. 6:01:28um scaler that we have here as in our
  7012. 6:01:31definition it is defined by this alpha
  7013. 6:01:34alpha is just a number you can qu C you
  7014. 6:01:36can qu B anything so in this case our
  7015. 6:01:40scaler
  7016. 6:01:42alpha alpha is coming from R so it's a
  7017. 6:01:46real number so Alpha time a is then
  7018. 6:01:52simply equal to to this new
  7019. 6:01:56Matrix where all of these elements are
  7020. 6:02:01simply multiplied by this scal so I will
  7021. 6:02:04just take over all these values H1 up to
  7022. 6:02:09a M1 and then A1 2 a22 all the way down
  7023. 6:02:15to a M2 and then let me also add the
  7024. 6:02:19last column just for fun here a 2 N and
  7025. 6:02:25then here a m
  7026. 6:02:30n so here this new scaled M multiplies
  7027. 6:02:35so so scaled uh Matrix a so Alpha * a is
  7028. 6:02:40simply equal to Alpha time all these
  7029. 6:02:42elements are simply multiplied by the
  7030. 6:02:46scale it is as simple as
  7031. 6:02:55that so that's the simple idea behind um
  7032. 6:02:59Matrix as scaling so when you are doing
  7033. 6:03:02scalar multiplication of this Matrix you
  7034. 6:03:05simp take all the values and you
  7035. 6:03:08multiply them element by element per row
  7036. 6:03:11and per column by that single scalar
  7037. 6:03:14Alpha do note that you are multiplying
  7038. 6:03:17them all without exclusion with exactly
  7039. 6:03:20the same number which is that
  7040. 6:03:24Alpha so let's now look into the
  7041. 6:03:27definition of matrix
  7042. 6:03:29multiplication so here we are no longer
  7043. 6:03:32multiplying a matrix with a scalar but
  7044. 6:03:34we are multiplying Matrix with Matrix so
  7045. 6:03:37the product of an M by n Matrix a and an
  7046. 6:03:40N by P Matrix B results in an M by P
  7047. 6:03:44Matrix C where each entry cig is
  7048. 6:03:47computed as the dotproduct of the e Road
  7049. 6:03:50of a and the J column of B now what does
  7050. 6:03:54this mean firstly let's look and unpack
  7051. 6:03:58this part of the definition so we got
  7052. 6:04:02Matrix
  7053. 6:04:04a that is
  7054. 6:04:06M by n and then we got Matrix B which is
  7055. 6:04:11n by P what this means is that in this
  7056. 6:04:16case Matrix a has M
  7057. 6:04:19rows and N
  7058. 6:04:22columns and Matrix B has n
  7059. 6:04:26rows and P
  7060. 6:04:30cups so this is then simply the
  7061. 6:04:34dimension dimension of the two
  7062. 6:04:39matrices so then it's saying that by
  7063. 6:04:43definition the product of these two
  7064. 6:04:45matrices so the product of A and B the
  7065. 6:04:50product of the
  7066. 6:04:57two
  7067. 6:05:02B is equal to to this Matrix
  7068. 6:05:07C and each entry cig
  7069. 6:05:11J so c i j is computed as the dotproduct
  7070. 6:05:18of the each row of a and the Jade column
  7071. 6:05:23of B now this part might seem bit
  7072. 6:05:27difficult but once we look into the
  7073. 6:05:29actual example and we illustrate this on
  7074. 6:05:32our common high level General
  7075. 6:05:34expressions of Matrix am and their
  7076. 6:05:36multiplication this will make much more
  7077. 6:05:39sense for now before coming to this one
  7078. 6:05:43I just wanted to refresh our memory on
  7079. 6:05:45one thing I said before when discussing
  7080. 6:05:48also this idea of improving uh this uh
  7081. 6:05:51different properties of vectors that
  7082. 6:05:54when we want to
  7083. 6:05:55multiply a vector with a matrix or
  7084. 6:05:58Matrix with Matrix or vector with a
  7085. 6:06:00vector we need to ensure that from the
  7086. 6:06:04first element the number number of comms
  7087. 6:06:06is equal to the number of rows of the
  7088. 6:06:07second element this is also very
  7089. 6:06:10important for this specific case and
  7090. 6:06:12just in general for matrix
  7091. 6:06:14multiplication so you can notice here
  7092. 6:06:17that the number of coms here is equal to
  7093. 6:06:20the number of rows in here and the order
  7094. 6:06:24is very important so in case of matrix
  7095. 6:06:27multiplication the order is really
  7096. 6:06:29important which means that if you have a
  7097. 6:06:32matrix a and you want to multiply with
  7098. 6:06:36the Matrix B then
  7099. 6:06:38the number of
  7100. 6:06:43columns of
  7101. 6:06:46a should be equal to the number of
  7102. 6:06:52rows of
  7103. 6:06:54B otherwise you cannot multiply those
  7104. 6:06:59two matrices with each other so in case
  7105. 6:07:01you got a matrix a that doesn't have the
  7106. 6:07:04same number of columns as the rows of
  7107. 6:07:06number of the Matrix B then there are
  7108. 6:07:09some alternative things that you can do
  7109. 6:07:11including this idea of the transpose
  7110. 6:07:13that we saw also doing when Computing
  7111. 6:07:15the dot product between this Vector a
  7112. 6:07:17and Vector B that's something that we
  7113. 6:07:19also do in programming when we are
  7114. 6:07:21dealing with this Matrix and we want to
  7115. 6:07:23compute this relationship between two
  7116. 6:07:26matrices but the number of columns of
  7117. 6:07:29one of the first one is not equal to the
  7118. 6:07:31number of rows of the second one we are
  7119. 6:07:33simply uh manipul ating this matrices or
  7120. 6:07:36removing some data if that's not hurting
  7121. 6:07:39our problem maybe uh flipping so
  7122. 6:07:42transposing our Matrix or applying any
  7123. 6:07:45other source of operation to it to
  7124. 6:07:48ensure that the two matrices that we are
  7125. 6:07:50multiplying with each other the first
  7126. 6:07:53one's number of columns is equal to the
  7127. 6:07:55second one's number of rows that's just
  7128. 6:07:58the low and that's something that you
  7129. 6:08:00should follow if you want to multiply
  7130. 6:08:02these two
  7131. 6:08:03matrices all right so now let's move on
  7132. 6:08:06onto this idea of multiplying and Dot
  7133. 6:08:08product let's look into a specific
  7134. 6:08:11example and this will uh help us to
  7135. 6:08:14understand this process
  7136. 6:08:16better so before doing that I just want
  7137. 6:08:20to quickly show you this general idea so
  7138. 6:08:23if we have a matrix a that is M by n
  7139. 6:08:28which means that it looks something like
  7140. 6:08:30this like
  7141. 6:08:31A1 1 a 2 one up to the point of a
  7142. 6:08:37M1 and then here we got let's say a 1 2
  7143. 6:08:42a 22 up to the point of a M2 and then at
  7144. 6:08:48the end we got a MN and here we got A1
  7145. 6:08:58n so let me also add this one 2 N and we
  7146. 6:09:03got a matrix B this Matrix B is n by P
  7147. 6:09:08so it has n rows and P columns so we are
  7148. 6:09:13fine in terms of Dimension
  7149. 6:09:15here and we got here
  7150. 6:09:18b11 B21 up to the point of b m sorry b n
  7151. 6:09:25in this case let's not confuse the
  7152. 6:09:28letters so b n 1 B1 2 B 22 up to the
  7153. 6:09:35point of b n 2 because n now is the
  7154. 6:09:40number of rows for Matrix B unlike for
  7155. 6:09:43the Matrix a up to
  7156. 6:09:46B1 p and here b 2 p and here after the
  7157. 6:09:52point of B and then n p this is the last
  7158. 6:09:56element in order to perform um
  7159. 6:09:59multiplication between these two
  7160. 6:10:00matrices so to obtain a matrix C which
  7161. 6:10:05is a equal to a *
  7162. 6:10:08B what we need to do is we simply need
  7163. 6:10:12to take pair case or pair Row for the
  7164. 6:10:15row I for
  7165. 6:10:18instance we need to take this element so
  7166. 6:10:21this row and we need to multiply it with
  7167. 6:10:24this so we need to find the dot product
  7168. 6:10:26between this row and this column then we
  7169. 6:10:30need to move on on to the next one and
  7170. 6:10:33then for the second element we will then
  7171. 6:10:36take this row and we will multiply it
  7172. 6:10:40with this
  7173. 6:10:43one so this is then something that we
  7174. 6:10:46need to do in order to obtain these
  7175. 6:10:49elements and you might have already
  7176. 6:10:50noticed that we got this m by n and n by
  7177. 6:10:54P so you might have already guessed what
  7178. 6:10:57will be the dimension of the C if we got
  7179. 6:11:00that the dimension of a is equal to M by
  7180. 6:11:04n
  7181. 6:11:06and the dimension of B is equal
  7182. 6:11:112 N by P then the
  7183. 6:11:15results Matrix after M multiplying the
  7184. 6:11:18two so Matrix c will be will be having a
  7185. 6:11:22number of rows equal to this and the
  7186. 6:11:25number of columns equal to this so This
  7187. 6:11:27middle part basically disappears and the
  7188. 6:11:30number of rows of the first Matrix will
  7189. 6:11:33be then the number of rows of this
  7190. 6:11:34result Matrix C and the number of
  7191. 6:11:37columns or the second Matrix so Matrix B
  7192. 6:11:40will then be our final number of columns
  7193. 6:11:42so we will then have a matrix C that
  7194. 6:11:44will have a
  7195. 6:11:46dimension so
  7196. 6:11:50Dimension so dimension of C will then be
  7197. 6:11:54equal
  7198. 6:11:57to M
  7199. 6:12:00by P so we will have M rows and P
  7200. 6:12:07columns so how we are going to compute
  7201. 6:12:11this so for c i j which means row
  7202. 6:12:18I and column J let's look into the
  7203. 6:12:23definition of it it's saying c i j is
  7204. 6:12:26computed as a dotproduct of the each row
  7205. 6:12:30and the Jade column so each row from a
  7206. 6:12:32and Jade column of B what where is the
  7207. 6:12:35each Road of a the each Road of a is
  7208. 6:12:39somewhere here so each Road of
  7209. 6:12:42a it is uh the A and then
  7210. 6:12:50I
  7211. 6:12:53one then
  7212. 6:12:56a and then I 2 and then a and then I Tre
  7213. 6:13:01dot dot dot and then
  7214. 6:13:03a i and then then we got in total n
  7215. 6:13:07columns
  7216. 6:13:09n and we always do the transpose right
  7217. 6:13:12when Computing this um dot product so we
  7218. 6:13:15then take the transpose so we take this
  7219. 6:13:19row row I and we multiply it so we do
  7220. 6:13:23the dot product between this one this is
  7221. 6:13:25the a
  7222. 6:13:28i and the
  7223. 6:13:32B J
  7224. 6:13:35this is column J it is somewhere
  7225. 6:13:39here so it is B and then we got the
  7226. 6:13:44first element which is one and then J
  7227. 6:13:48and then b 2 J
  7228. 6:13:51B 3j dot dot dot up to B and then in
  7229. 6:13:56total we got n rows in B so n and then
  7230. 6:14:02the J is the
  7231. 6:14:05column so it stays the
  7232. 6:14:08same so this is then the dot product
  7233. 6:14:13between
  7234. 6:14:14e row that comes from Matrix a and the J
  7235. 6:14:19column that comes from Matrix B so it's
  7236. 6:14:22always like that actually so we always
  7237. 6:14:24take row by row so we
  7238. 6:14:29take this different so every time we
  7239. 6:14:32take just a row
  7240. 6:14:35and we multiply with the corresponding
  7241. 6:14:38column and then we get the dot product
  7242. 6:14:41between this row that comes from the
  7243. 6:14:42first Matrix and then the column that
  7244. 6:14:44comes from the second Matrix in that
  7245. 6:14:46specific order in order to get our DOT
  7246. 6:14:48product and that specific valum and what
  7247. 6:14:51is this amount actually
  7248. 6:14:54so when we calculate this do product you
  7249. 6:14:57can quickly see that we have a
  7250. 6:15:02i1 multiplied by B 1 J plus a I2
  7251. 6:15:09multiplied by b 2 J and then dot dot dot
  7252. 6:15:14a i n multiplied by b n
  7253. 6:15:19g and this new Matrix
  7254. 6:15:23c will then have all these elements so
  7255. 6:15:26C11 C 21 and then c31 dot dot dot and
  7256. 6:15:31then
  7257. 6:15:32C the last
  7258. 6:15:35row as the number of rows of C is m c m
  7259. 6:15:41see here M so C and then here it will be
  7260. 6:15:45one 2 C 22 C3 and then 2 up to the point
  7261. 6:15:51of
  7262. 6:15:53cm and then two and then here the last
  7263. 6:15:56col will be C1 and then p is the number
  7264. 6:16:00of coms in C so C1 p and then C2 p and
  7265. 6:16:04then
  7266. 6:16:05c3p dot dot dot and then
  7267. 6:16:10c m and then
  7268. 6:16:15P
  7269. 6:16:17okay so this is what we get this is our
  7270. 6:16:20final Matrix C when multiplying Matrix a
  7271. 6:16:25and Matrix B so let me clean this
  7272. 6:16:32up C is to now if you want to find out
  7273. 6:16:37what is C11 you can easily fill in this
  7274. 6:16:40general formula that uh that we just
  7275. 6:16:42calculated the I is equal to 1 and then
  7276. 6:16:45J is equal to 1 and this will give you
  7277. 6:16:47C11 by using this formula if you want to
  7278. 6:16:51get the C and P then just fill in the I
  7279. 6:16:53is equal to M and then J is equal to P
  7280. 6:16:56in order to get this value C and P so
  7281. 6:16:59you can already see the amount of
  7282. 6:17:01calculations you need to do in order to
  7283. 6:17:03get all these elements from this l large
  7284. 6:17:05matrices A and B let's actually look
  7285. 6:17:07into a simple example to clarify this so
  7286. 6:17:10we have a matrix a here and Matrix B
  7287. 6:17:13here and we want to do a multiplication
  7288. 6:17:15of the two and we have just learned how
  7289. 6:17:17to do it let's actually do it one by one
  7290. 6:17:19so we got a matrix a which is equal
  7291. 6:17:24to 1 2 3 4 with Dimensions 2 by 2 then
  7292. 6:17:31we got a matrix B which has values two Z
  7293. 6:17:36and then one two so it is 2 by two and I
  7294. 6:17:41want to find what is c that is equal to
  7295. 6:17:44a * B and I know already by looking at
  7296. 6:17:47these Dimensions that c is going to be
  7297. 6:17:50equal to 2 by 2 so you might recall that
  7298. 6:17:54I said that when looking at this final
  7299. 6:17:56result the number of rows or the final
  7300. 6:17:59um Matrix will be this so the number of
  7301. 6:18:03rows of the initial Matrix a and then
  7302. 6:18:06the number of columns of this final
  7303. 6:18:07Vector c will be the number of vectors
  7304. 6:18:10number of columns of this second Matrix
  7305. 6:18:13B so two therefore I know already before
  7306. 6:18:17even doing calculations that the uh
  7307. 6:18:20product Matrix c equal to a * B is going
  7308. 6:18:23to have a dimension 2x two let's
  7309. 6:18:25actually do a calculation to check this
  7310. 6:18:28so C is then equal to a * B and it's
  7311. 6:18:31equal
  7312. 6:18:32to 1 2 3 4 4 multiplied by 2 0 1
  7313. 6:18:392 okay
  7314. 6:18:47so I expect to have four different
  7315. 6:18:49elements here here here and here so to
  7316. 6:18:54obtain the C11 so it is C11 in here what
  7317. 6:18:59I need to do is that I need to look at
  7318. 6:19:02the first row and in the first column in
  7319. 6:19:06here so first row from a and the First
  7320. 6:19:09Column of B and I'm doing the dot
  7321. 6:19:11product which means 1 * 2 + 2 * 1 1 * 2
  7322. 6:19:16is 2 2 * 1 is 1 so here I'm getting 1 *
  7323. 6:19:212 + 2 * 1 which basically gives me 2 + 2
  7324. 6:19:28and that's equal to 4
  7325. 6:19:37so here I'm just writing
  7326. 6:19:39[Music]
  7327. 6:19:43down 1 * 2 + 2 * 1 now when I want to
  7328. 6:19:50get this value which is
  7329. 6:19:52C12 this means that I want to get the
  7330. 6:19:55first row and the second column and
  7331. 6:19:57that's exactly what I'm doing so I'm
  7332. 6:19:59going back and I'm saying let's look at
  7333. 6:20:03the first row but this time will look at
  7334. 6:20:05the second column coming from the uh
  7335. 6:20:07from The Matrix B so 1 *
  7336. 6:20:120 0 + 2 * 2 and then I do the same only
  7337. 6:20:17this time for the second row which means
  7338. 6:20:19I'm picking this row and then this
  7339. 6:20:23column
  7340. 6:20:25so it
  7341. 6:20:27is three * 2 + 4 * 1 and for the final
  7342. 6:20:33element c22
  7343. 6:20:38I'm taking the second row and the second
  7344. 6:20:45column which gives me three * 0 plus 4 *
  7345. 6:20:522 now what does this gives
  7346. 6:20:58me this gives me this 4x4 Matrix where 1
  7347. 6:21:03* 2 + 2 * 1 is 4 1 * 0 + 2 * 2 is 4 3 *
  7348. 6:21:092 + 4 is = to 6 + 4 which is
  7349. 6:21:1410 and then 3 * 0 + 4 * 2 is = to
  7350. 6:21:188 so let's check 4
  7351. 6:21:224108 that's exactly what we have here so
  7352. 6:21:26as you could see here the idea is that
  7353. 6:21:28every time to follow what element I'm
  7354. 6:21:31looking for for the CI J and then I just
  7355. 6:21:34go to the E rows from the first Matrix
  7356. 6:21:38and the J column from the second Matrix
  7357. 6:21:41and I do the dot product of the A and
  7358. 6:21:45then
  7359. 6:21:46I and then K let's say so I'm going to
  7360. 6:21:51the E Row from the first Matrix and I'm
  7361. 6:21:55taking all the elements which means I
  7362. 6:21:57don't even need to mention this index it
  7363. 6:22:00just means the entire each row coming
  7364. 6:22:03from the Matrix a and then I'm doing the
  7365. 6:22:05dot product between this row and the
  7366. 6:22:11column that comes from the Matrix B
  7367. 6:22:14which means B and then
  7368. 6:22:17J which then will give me the cig so I'm
  7369. 6:22:22looking at this and taking this
  7370. 6:22:23multiplying this dot product and this
  7371. 6:22:25gives me the first element then the
  7372. 6:22:27first row and then the second column
  7373. 6:22:29which gives me the uh second element in
  7374. 6:22:32the first row in my Matrix so this one
  7375. 6:22:34and so on so hope this makes sense uh if
  7376. 6:22:38it doesn't make sure to reach out
  7377. 6:22:40because it's a very important concept
  7378. 6:22:43and uh let's also look into another
  7379. 6:22:45example to make sure that we got this
  7380. 6:22:47right so in this case as you can see we
  7381. 6:22:49have another matrices so set of A and B
  7382. 6:22:52matrices again 2 by two a simple
  7383. 6:22:55one and we want to know what is a so
  7384. 6:22:59let's say we call this C we already know
  7385. 6:23:01C should be 2 by 2 and what we are doing
  7386. 6:23:05is basically for
  7387. 6:23:07C11 we are saying let's look at the
  7388. 6:23:11first row so first row and the First
  7389. 6:23:15Column coming from the second Matrix B
  7390. 6:23:19and let's do the dot product so 2 * 1 2
  7391. 6:23:23* 1 2 * 1 4 * 5 4 * 5 we get this and
  7392. 6:23:29then when we want to find what is C oh
  7393. 6:23:34what is C and then one two so in the
  7394. 6:23:37first row but in the second element in
  7395. 6:23:39our final Matrix so I is equal to one
  7396. 6:23:42and J is equal to 2 it means we need to
  7397. 6:23:45look at the first row from The Matrix a
  7398. 6:23:50but this time
  7399. 6:23:52the second column from The Matrix B so
  7400. 6:23:56it is 2 by 3 2 by 3 4 * 7 4 * 7 and this
  7401. 6:24:03gives us a number 13 four even if you
  7402. 6:24:05calculate you can see that 2 * 1 is
  7403. 6:24:07equal to 2 4 * 5 is 5 so 2 4 * 5 is 20
  7404. 6:24:11so 2 + 20 is 22 in here and then you can
  7405. 6:24:15do the rest of calculations and this
  7406. 6:24:17will be a good practice to see how we
  7407. 6:24:20can do a basic matrix multiplication the
  7408. 6:24:23idea is actually quite straightforward
  7409. 6:24:25when it comes to multiplying it it just
  7410. 6:24:27it comes with a practice when we see all
  7411. 6:24:30these uh much bigger matrices
  7412. 6:24:34so um this is another example I will
  7413. 6:24:37leave this one to you to complete it
  7414. 6:24:40just uh to keep in mind we always do uh
  7415. 6:24:44so we always look at the dimension first
  7416. 6:24:46in here 2 * 2 and 2 * 2 which gives me
  7417. 6:24:49an impression already what I can expect
  7418. 6:24:51the result will be 2 by two and when it
  7419. 6:24:55comes to the uh cross elements just
  7420. 6:24:58ensure to always look to the E row and
  7421. 6:25:02the J column
  7422. 6:25:05this comes from Matrix a and this comes
  7423. 6:25:07from Matrix B take them compute the dot
  7424. 6:25:09product and then you will find your C uh
  7425. 6:25:13your final result let's call it
  7426. 6:25:17um kig because in this case we have a
  7427. 6:25:20matrix C already welcome to the module 4
  7428. 6:25:23of this course when we are talking about
  7429. 6:25:26matrices and linear systems so in this
  7430. 6:25:28module we are going to dive deeper into
  7431. 6:25:30this uh idea of linear systems with
  7432. 6:25:33matrices and solve linear systems using
  7433. 6:25:35different techniques and specifically we
  7434. 6:25:37are going to learn the uh concept behind
  7435. 6:25:41solving linear systems using matrices
  7436. 6:25:43named gausian elimination and gaussian
  7437. 6:25:46reduction welcome to the module one in
  7438. 6:25:48this unit so in this uh case we are
  7439. 6:25:51going to talk about algebraic lows for
  7440. 6:25:53matrices we are going to discuss four
  7441. 6:25:55different properties for matrices uh and
  7442. 6:25:59the first one is the communative laow
  7443. 6:26:00for Matrix addition the associative law
  7444. 6:26:03for matrices the distributive laow for
  7445. 6:26:05matrices both the left and the right one
  7446. 6:26:07and then finally we're going to talk
  7447. 6:26:09about the scalar multiplication laow for
  7448. 6:26:12matrices so the algebraic lows or
  7449. 6:26:14matrices they are like in case of real
  7450. 6:26:17numbers like in case of vectors they
  7451. 6:26:19help us to do different operations on
  7452. 6:26:22these entities they are very similar to
  7453. 6:26:24the real numbers and the vector cases
  7454. 6:26:27where we for instance um so that if for
  7455. 6:26:30instance A + B uh is equal to B+ C C or
  7456. 6:26:34a * um b + C is equal to a b + a c those
  7457. 6:26:40are all sorts of lows that we uh learn
  7458. 6:26:43as part of high school prealgebra and we
  7459. 6:26:46have applied it to real numbers we know
  7460. 6:26:48how helpful those can be and similar
  7461. 6:26:51type of lows we have also for the
  7462. 6:26:54matrices and we got in this case four
  7463. 6:26:58different laws that we will be
  7464. 6:27:00discussing the first one is what we are
  7465. 6:27:01referring as associative law the second
  7466. 6:27:04one is the distributive low the SEC the
  7467. 6:27:07third one is the scalar multiplication
  7468. 6:27:09low and the fourth one is the
  7469. 6:27:10communative low for addition so these
  7470. 6:27:12laws help us to do different metrix
  7471. 6:27:14operations they help us to manipulate
  7472. 6:27:17algebraically this metrices and then uh
  7473. 6:27:20this can help us to solve different
  7474. 6:27:22sorts of problems including solving a
  7475. 6:27:24system of linear
  7476. 6:27:26equations so let's start with the
  7477. 6:27:28commutative law for Matrix addition so
  7478. 6:27:31the Matrix addition is cumulative um
  7479. 6:27:34which means that A+ B is equal to B plus
  7480. 6:27:37a so unlike the matrix multiplication
  7481. 6:27:40that we have seen in the previous
  7482. 6:27:43lessons uh where the order did matter
  7483. 6:27:46and we said that we um had to uh ensure
  7484. 6:27:49that the number of columns of the first
  7485. 6:27:51Matrix is equal to the number of rows of
  7486. 6:27:54the second Matrix in case of addition
  7487. 6:27:57that's this is not the case so we should
  7488. 6:27:59not care about the order whenever we
  7489. 6:28:01want to add two matrices the other thing
  7490. 6:28:04that we need to keep in mind though is
  7491. 6:28:06that the two matrices needs to have the
  7492. 6:28:08same size so I mean that both Matrix a
  7493. 6:28:13and Matrix B need to have a dimension so
  7494. 6:28:17dimension of Matrix a should be equal to
  7495. 6:28:19dimension of Matrix B and let's say
  7496. 6:28:21should be equal
  7497. 6:28:23to M
  7498. 6:28:27by n but for the rest we don't really
  7499. 6:28:30need to care uh which one we will put
  7500. 6:28:33first
  7501. 6:28:34will we put first a and then add the b
  7502. 6:28:37or we will do the other way around so we
  7503. 6:28:40will then First Take B and then we will
  7504. 6:28:42add
  7505. 6:28:43a so this is the idea behind communative
  7506. 6:28:46low for Matrix
  7507. 6:28:48addition so first let's look into all
  7508. 6:28:50this uh lows and then we will also look
  7509. 6:28:53into the corresponding
  7510. 6:28:55examples so for this specific case it
  7511. 6:28:58might actually also be helpful to write
  7512. 6:29:00down the general formula which will um
  7513. 6:29:03make sense out of this um low for the uh
  7514. 6:29:08uh which is a communative low for the
  7515. 6:29:10Matrix additions so let's say we got a
  7516. 6:29:14matrix
  7517. 6:29:15a which is M by
  7518. 6:29:18n and this Matrix can be represented as
  7519. 6:29:22a11 dot dot dot a M1 so this is
  7520. 6:29:26something that we saw time and time
  7521. 6:29:28again so I'll just quickly write it down
  7522. 6:29:30the common notation for this and then
  7523. 6:29:34here we have the last column which is a
  7524. 6:29:37MN and this is the Matrix a then we got
  7525. 6:29:42Matrix B which is again M by n and can
  7526. 6:29:47be represented as
  7527. 6:29:48b11 and then dot dot dot and then B M1
  7528. 6:29:53dot dot dot b1n dot dot dot b
  7529. 6:29:59MN
  7530. 6:30:01so the communative lows says that A +
  7531. 6:30:09B should be equal
  7532. 6:30:12to B + a let's check that whether this
  7533. 6:30:16is the case let's first compute this
  7534. 6:30:19part and then we will do this
  7535. 6:30:21one
  7536. 6:30:23well the first
  7537. 6:30:25one means that we get so
  7538. 6:30:31A+ B is and we remember remember how we
  7539. 6:30:34add matrices right so we know that we
  7540. 6:30:37just need to pick their corresponding
  7541. 6:30:39elements and add them to each other so
  7542. 6:30:41we get
  7543. 6:30:44a11 plus
  7544. 6:30:47b11 then dot dot dot and then a
  7545. 6:30:52M1 plus b M1 this is why also D is
  7546. 6:30:57really important that they got um the
  7547. 6:30:59same Dimension which means that they got
  7548. 6:31:01exactly the same amount of elements the
  7549. 6:31:04same uh amount of columns and the same
  7550. 6:31:06amount of rows um in terms of the uh
  7551. 6:31:10Matrix size so then here we have a 1 n
  7552. 6:31:17and then
  7553. 6:31:19plus B1
  7554. 6:31:21n then dot dot dot and then a
  7555. 6:31:27M1 and then plus b m here I need to put
  7556. 6:31:34n we are in the last element of the
  7557. 6:31:36Matrix so
  7558. 6:31:38BMN and that is it this is our Matrix A
  7559. 6:31:42+ B let's now look into the Matrix b + a
  7560. 6:31:48so what that amount
  7561. 6:31:53is so the
  7562. 6:31:56Matrix b + a will then be equal to
  7563. 6:32:07b11 plus
  7564. 6:32:09a11 dot dot dot and then B
  7565. 6:32:15M1 plus a
  7566. 6:32:18M1 then dot dot dot and then b 1
  7567. 6:32:23n plus a 1 n then dot dot dot and then
  7568. 6:32:29the last element will be B
  7569. 6:32:31MN and then Plus
  7570. 6:32:34a m
  7571. 6:32:41n
  7572. 6:32:42so in here if we remember from the real
  7573. 6:32:47numbers we know that a
  7574. 6:32:51+ b is equal to B + a for instance if a
  7575. 6:32:59is equal to 2 and then B is equal to 1
  7576. 6:33:02then a + b is = to 2 + 1 which is equal
  7577. 6:33:06to 3 and then b + 1 is = to 1 + 2 and
  7578. 6:33:10it's equal to 3 so we know that indeed
  7579. 6:33:12for the real numbers a plus b is equal
  7580. 6:33:15to B + a and making use of that property
  7581. 6:33:18we can already state that b11 + a11 is
  7582. 6:33:24equal to A1 1 + B1 1 and then the
  7583. 6:33:29general case is that a
  7584. 6:33:33i
  7585. 6:33:36j plus b i
  7586. 6:33:40j is equal
  7587. 6:33:42to b i
  7588. 6:33:46j plus a i j where I is the index of the
  7589. 6:33:52rows and then J is the index of the
  7590. 6:33:55columns from the coefficient
  7591. 6:33:57labeling so using this property from the
  7592. 6:34:01real numbers given that all these values
  7593. 6:34:03in the m Matrix are real numbers we can
  7594. 6:34:05quickly see that the Matrix B+ a that we
  7595. 6:34:10just got in
  7596. 6:34:11here is equal to this Matrix a plus b
  7597. 6:34:16which means
  7598. 6:34:18that 1 is equal to B and this proves
  7599. 6:34:23that A + B is equal to B + a this is the
  7600. 6:34:27communative property of the Matrix
  7601. 6:34:31additions so the next law is the
  7602. 6:34:34associative law for matrices which says
  7603. 6:34:37that the in case of Matrix addition a +
  7604. 6:34:40B+ C isal to A + B +
  7605. 6:34:45C so
  7606. 6:34:48basically this
  7607. 6:34:50time we go from here to adding one more
  7608. 6:34:54element which is the third Matrix Matrix
  7609. 6:34:57C so we are saying A + B + C is equal to
  7610. 6:35:02a +
  7611. 6:35:04B+ C so it doesn't matter whether we
  7612. 6:35:07will First Take The Matrix a and then B
  7613. 6:35:10and then add them up and then we add
  7614. 6:35:12Matrix C or if we first take the Matrix
  7615. 6:35:16B and C add them up and then we add a to
  7616. 6:35:19this sum it doesn't
  7617. 6:35:21matter we will see an example of this in
  7618. 6:35:24a
  7619. 6:35:25bit and then the uh second part of this
  7620. 6:35:28associative law for matrices says that
  7621. 6:35:30for matrix multiplication a * B * C is
  7622. 6:35:35equal to a * B * C so again in terms of
  7623. 6:35:40the
  7624. 6:35:41um order when it comes to this specific
  7625. 6:35:45multiplication so it doesn't matter
  7626. 6:35:47whether we will first multiply a by B
  7627. 6:35:50and then by C or we will first multiply
  7628. 6:35:52B by C and then we add the a at the end
  7629. 6:35:56we will end up with the same amount so a
  7630. 6:35:59* B and then * C is equal to B * C C and
  7631. 6:36:04then in the left hand side we add the a
  7632. 6:36:06so a * B * C so these properties help us
  7633. 6:36:10to add or multiply matrices without
  7634. 6:36:13really worrying about this idea of
  7635. 6:36:15grouping of the terms so we can always
  7636. 6:36:18group them and perform all sorts of
  7637. 6:36:21operations so this is this first
  7638. 6:36:23property that we see in
  7639. 6:36:25here let's say we have this uh Matrix a
  7640. 6:36:29matrix B and Matrix C so let's prove
  7641. 6:36:33that in
  7642. 6:36:34the order doesn't matter and this
  7643. 6:36:36associative property holdes so let's
  7644. 6:36:39prove
  7645. 6:36:41that so for that the first thing we need
  7646. 6:36:44to do is to
  7647. 6:36:46compute a plus b so this part so A + B +
  7648. 6:36:53C what is that first I need to compute
  7649. 6:36:56this
  7650. 6:36:57part and then I will add C which is the
  7651. 6:37:02second part
  7652. 6:37:04so A + B is equal to my a is equal
  7653. 6:37:10to
  7654. 6:37:121 2 3 4 plus and my B is equal
  7655. 6:37:18to 5
  7656. 6:37:216 7
  7657. 6:37:248 this is then equal to so 1 + 5 is = to
  7658. 6:37:296 2 + 6 is = 8 3 + 7 is = to 10 and then
  7659. 6:37:334 + 8 is equal to 12 this is my A + B
  7660. 6:37:38this is the first part now the second
  7661. 6:37:41part is then to add to this A +
  7662. 6:37:46B this C this I can by the way also call
  7663. 6:37:50some Matrix D so I can say that this is
  7664. 6:37:55equal
  7665. 6:37:56to D+
  7666. 6:37:58C so let's find out what is this amount
  7667. 6:38:03so a plus b or what we're referring as D
  7668. 6:38:07is 6 8 10 12 we just calculated it in
  7669. 6:38:11here I'm also adding now my Matrix C
  7670. 6:38:15which is 91 10 12 so 9 10 11 12 what is
  7671. 6:38:21this amount it is 6 + 9 is 15 8 + 10 is
  7672. 6:38:2618 10 + 11 is 21 12 + 12 is
  7673. 6:38:3124 this is my final Matrix
  7674. 6:38:35so I have checked
  7675. 6:38:38that D A + B + C is equal to 15 18
  7676. 6:38:4821 and
  7677. 6:38:5024 this is the first part let's now go
  7678. 6:38:53ahead and check whether this is equal to
  7679. 6:38:56the second part which is this part so
  7680. 6:38:59this is one this is two so
  7681. 6:39:04this is then A + B + C as you can see it
  7682. 6:39:09in here let's now calculate that amount
  7683. 6:39:12and like previously we will do it in an
  7684. 6:39:14order so first we need to calculate this
  7685. 6:39:17part and then the entire
  7686. 6:39:23thing so B+ C is then equal
  7687. 6:39:29to the B was 5 6 7 8
  7688. 6:39:355 6 7 8 plus and the C
  7689. 6:39:41was 9 10 11
  7690. 6:39:4412 9
  7691. 6:39:4710 11
  7692. 6:39:5012 what is the much 5 + 9 is 14 6 + 10
  7693. 6:39:55is 16 7 + 11 is 18 and 8 + 12 is
  7694. 6:40:0220 this is the first amount let's refer
  7695. 6:40:06refer this as a
  7696. 6:40:08d or we can even call it by some other
  7697. 6:40:11letter let's say k this is Matrix K so B
  7698. 6:40:14plus C is
  7699. 6:40:17k then the second part is to take this
  7700. 6:40:20B+ C so B+
  7701. 6:40:25C which we have referred as
  7702. 6:40:28K say
  7703. 6:40:30K and then we are adding to this
  7704. 6:40:33the A and specifically just to ensure
  7705. 6:40:37that we stay with the same order I'm
  7706. 6:40:38saying I will add from the left side the
  7707. 6:40:42a to this Matrix
  7708. 6:40:45K and this obviously
  7709. 6:40:53means this is equal to so A+ b + C this
  7710. 6:40:59is what I'm referring by just uh in a
  7711. 6:41:02more simpler note a I'm just using K in
  7712. 6:41:05here so this is my B plus C or what I'm
  7713. 6:41:09referring also as a
  7714. 6:41:11k and this amount is equal
  7715. 6:41:15to what is my a my a is 1 2 3
  7716. 6:41:204 1 2 3 4 plus and what is B plus C we
  7717. 6:41:26just calculated that that's the K so 14
  7718. 6:41:3016 18 20
  7719. 6:41:34T So 1 + 14 is 15 2 + 16 is 18 3 + 18 is
  7720. 6:41:4121 4 + 20 is
  7721. 6:41:4524 so we have learned that the A + B + C
  7722. 6:41:51is this
  7723. 6:41:54Vector now is this Vector equal to the a
  7724. 6:41:59plus b and then plus C well here we got
  7725. 6:42:02this 15 18 21
  7726. 6:42:0624 15 18 21 24 so we have just proved
  7727. 6:42:13that the first part is equal to second
  7728. 6:42:16part which means that we have proved
  7729. 6:42:18that
  7730. 6:42:19indeed the order doesn't matter and A +
  7731. 6:42:23B + C is equal to a + B+
  7732. 6:42:27C so this calculation confirms that the
  7733. 6:42:30both sides of this equations they are in
  7734. 6:42:33indeed equal and this confirms the
  7735. 6:42:35associative low for the Matrix
  7736. 6:42:42addition so let's now look into the
  7737. 6:42:45distributive law for matrices which says
  7738. 6:42:48that Matrix addition and multiplication
  7739. 6:42:51they satisfy the distributive property
  7740. 6:42:54which means that if we have a left
  7741. 6:42:56distribution a * b + C is equal to a + a
  7742. 6:43:02c
  7743. 6:43:03and then in the right distribution we
  7744. 6:43:05basically have the Matrix multiplying
  7745. 6:43:07from the right from hence the name right
  7746. 6:43:10distribution A + B * C is equal to a C +
  7747. 6:43:15BC you might very quickly see and
  7748. 6:43:19recognize from here that we have very
  7749. 6:43:22similar actually exactly uh the same
  7750. 6:43:26rule only for real numbers we know that
  7751. 6:43:28a * b + C is equal to and then we open
  7752. 6:43:32the parentheses with say this is equal
  7753. 6:43:33to this times this so AB plus this times
  7754. 6:43:37this a c you can see that we have
  7755. 6:43:41exactly the same here only in the
  7756. 6:43:43capital letters so in the real numbers
  7757. 6:43:45we have exactly the same low so the same
  7758. 6:43:48we have also for our left
  7759. 6:43:51distribution when it comes to Matrix
  7760. 6:43:53additional multiplication and the same
  7761. 6:43:56we have only with a different order here
  7762. 6:43:58you can see the C so this one is
  7763. 6:44:01basically uh with the different order
  7764. 6:44:04instead of having the Matrix multiplied
  7765. 6:44:05in the left here we have from the right
  7766. 6:44:08and this is similar to the property that
  7767. 6:44:11A + B * C is equal to C * a which is a c
  7768. 6:44:17plus c * B which is BC an example uh
  7769. 6:44:22where we will prove that the
  7770. 6:44:23distributive law for matrices um is
  7771. 6:44:25indeed true and I have skipped
  7772. 6:44:30deliberately the uh example for this one
  7773. 6:44:34because uh this a b * C is equal to a *
  7774. 6:44:38b c so the associative law for matrix
  7775. 6:44:41multiplication it's something that you
  7776. 6:44:43can calculate for yourself using the
  7777. 6:44:46same a b and c matrices only this
  7778. 6:44:49includes multiplication of these two
  7779. 6:44:51matrices and it's something that we are
  7780. 6:44:53going to do as part of this example so
  7781. 6:44:56instead of doing and redoing this
  7782. 6:44:59multiplication I thought that it's great
  7783. 6:45:01to leave that for you as a practice and
  7784. 6:45:03instead focus on bit more complex
  7785. 6:45:06problem like this one that one way or
  7786. 6:45:09the other includes the same matrix
  7787. 6:45:12multiplication so I need to calculate
  7788. 6:45:14the a * B in this case which means that
  7789. 6:45:18by providing you this example I'm also
  7790. 6:45:20including what is needed to do the
  7791. 6:45:23previous example only it would be a
  7792. 6:45:24great way to practice the material for
  7793. 6:45:26yourself so let's now move into proving
  7794. 6:45:29the distributive low for matrices so we
  7795. 6:45:32got this mat matrices a b and c and here
  7796. 6:45:36I'm going to apply matrix multiplication
  7797. 6:45:39the same as that is needed for the
  7798. 6:45:40previous uh case and here what we need
  7799. 6:45:44to prove is that a * b + C is equal to a
  7800. 6:45:49* AC so this is the first part this is
  7801. 6:45:52the second part so let's go and
  7802. 6:45:55calculate them
  7803. 6:45:57separately so for the first one we need
  7804. 6:46:00to calculate
  7805. 6:46:05a * b +
  7806. 6:46:08C which is
  7807. 6:46:12then something that we can calculate by
  7808. 6:46:15first doing the addition so we will
  7809. 6:46:18first do the addition of matrices B and
  7810. 6:46:21C and then once we are done with that we
  7811. 6:46:24will then do a * b +
  7812. 6:46:28C so that's the second part
  7813. 6:46:39so let's go ahead and do that
  7814. 6:46:41calculation so first we
  7815. 6:46:43got b + C what is B plus C B is 5 67 8 5
  7816. 6:46:506 7
  7817. 6:46:538 plus and the C is minus one 0 0 minus
  7818. 6:46:57one so on the diagonal we got min-1 and
  7819. 6:47:00minus one and then of diagonal lower and
  7820. 6:47:02upper part we got zero and what is this
  7821. 6:47:05Matrix this is equal to 5 - 1 so 5 + -1
  7822. 6:47:09is equal to 4 6 + 0 is = 6 7 + 0 is = 7
  7823. 6:47:15and then 8 - 1 is = 7 this is our B plus
  7824. 6:47:19C which we can refer also as Matrix D so
  7825. 6:47:23let's call this D which means that now
  7826. 6:47:26we are interested in a
  7827. 6:47:29* B
  7828. 6:47:33so for this second
  7829. 6:47:36part we need to take this Matrix
  7830. 6:47:40a so a
  7831. 6:47:44* D is then equals to we need to take
  7832. 6:47:49the Matrix a which is
  7833. 6:47:521 2 3 4 and we need to multiply it with
  7834. 6:47:57this Matrix that we just got because
  7835. 6:47:59this is the B plus C or the D that we
  7836. 6:48:00were referring 46
  7837. 6:48:0477 okay so let me remove this
  7838. 6:48:09part cuz we are going to need some space
  7839. 6:48:12for
  7840. 6:48:13this and let's do this calculation this
  7841. 6:48:16is 2x two and this is 2x
  7842. 6:48:25two I will do the calculations in here
  7843. 6:48:29so we need to end up with the Matrix
  7844. 6:48:31that is also 2 by 2 because we know 2x 2
  7845. 6:48:36Matrix times 2x two we will pick this
  7846. 6:48:39part so the number of rows and the
  7847. 6:48:41number of columns of the second one this
  7848. 6:48:43will be our resulting Matrix which is 2
  7849. 6:48:45by
  7850. 6:48:47two all right so for the matrix
  7851. 6:48:51multiplication we know that for this
  7852. 6:48:53element in the place of so one a or
  7853. 6:48:58let's call this Matrix we don't even
  7854. 6:49:00actually need to call this anything we
  7855. 6:49:02we can keep it simple so let's say that
  7856. 6:49:04we are in the first draw in the First
  7857. 6:49:06Column so this is the first draw in the
  7858. 6:49:08First Column for this what we need to do
  7859. 6:49:11is we need to take the first row from
  7860. 6:49:14the first Matrix so Matrix a and then
  7861. 6:49:16the First Column of the Matrix D so this
  7862. 6:49:19one and we need to do the dot product
  7863. 6:49:22which means that we do
  7864. 6:49:26basically 1 * 4 1 * 4 plus 2 *
  7865. 6:49:387 so for this element which is in the
  7866. 6:49:42second row and the First Column we need
  7867. 6:49:46to take the second row and First
  7868. 6:49:51Column in here so we end up with three
  7869. 6:49:56times 4 so 3 * 4 and then 4 * 7 so Plus
  7870. 6:50:024 * 7 The Dot product between this one
  7871. 6:50:05and then this
  7872. 6:50:07one so for this element which is in the
  7873. 6:50:10first row and then the second column of
  7874. 6:50:12the final Matrix so first row and second
  7875. 6:50:15column we need to pick the first row and
  7876. 6:50:19second column and do a DOT product which
  7877. 6:50:21means
  7878. 6:50:24one 1 * 6 + 2 * 7 2 *
  7879. 6:50:317 and then in here in this element we
  7880. 6:50:35got the second column and second row so
  7881. 6:50:38second row second
  7882. 6:50:39column which means that we need to pick
  7883. 6:50:42the second
  7884. 6:50:45row and the second column the dot
  7885. 6:50:48product of the second row of Matrix a
  7886. 6:50:51and the second column of Matrix D which
  7887. 6:50:56is 3 *
  7888. 6:51:006 Plus 4 * 7 4 *
  7889. 6:51:077 so let's quickly calculate what this
  7890. 6:51:10amount
  7891. 6:51:13is so this is the a * B+ C basically and
  7892. 6:51:21this Matrix is 1 + 4 is 4 2 * 7 is 14 4
  7893. 6:51:28+ 14 is
  7894. 6:51:3018 1 * 6 X is 6 2 * 7 is 14 and 6 + 14
  7895. 6:51:38is
  7896. 6:51:3920 3 * 4 is 12 4 * 7 is
  7897. 6:51:4728 which means that we got here
  7898. 6:51:5140 3 * 6 is 18 4 * 7 is 28 which means
  7899. 6:51:58we got here 36 and 46
  7900. 6:52:06this is our final a * b +
  7901. 6:52:11C let's now go ahead and calculate the
  7902. 6:52:15second part so the second
  7903. 6:52:18part says that we
  7904. 6:52:22got a * b + a *
  7905. 6:52:26C so a * b + a * C
  7906. 6:52:32which means that first we need to do
  7907. 6:52:34this calculation and then this
  7908. 6:52:37one and then we need to add them to each
  7909. 6:52:41other so let's quickly then calculate
  7910. 6:52:44what is a * B and then a * C and then
  7911. 6:52:48add them to each
  7912. 6:52:51other let me clean up some space in
  7913. 6:52:55here we're going to KN
  7914. 6:53:00that when we write this one in a smaller
  7915. 6:53:03format so this is equal to
  7916. 6:53:0718 20 40 and
  7917. 6:53:1646 and let me take over the second
  7918. 6:53:19element which we still need to calculate
  7919. 6:53:22which is AB plus a
  7920. 6:53:28c first we will do this and then this
  7921. 6:53:32and then we will add them to each
  7922. 6:53:35other so a * B is equal
  7923. 6:53:41to 1 2 3 4 multiplied
  7924. 6:53:46by 5 6 7 8 5 6 7
  7925. 6:53:518 now following the
  7926. 6:53:54same
  7927. 6:53:55approach from the previous example when
  7928. 6:53:58we calculate this Matrix I will then
  7929. 6:54:00quickly calculate what is is a * B so in
  7930. 6:54:04here we got first row and First Column
  7931. 6:54:07so 1 * 5 + 2 * 7 so the dot product
  7932. 6:54:11between the first row and the First
  7933. 6:54:13Column from
  7934. 6:54:14here now for this element here we got
  7935. 6:54:18the second row and the First Column we
  7936. 6:54:21need to take the second row in the First
  7937. 6:54:23Column from here and we do the dot
  7938. 6:54:26product which means 3 * 5 + 4 * 7 in
  7939. 6:54:32here here we got the first draw and
  7940. 6:54:33second column so the first draw and
  7941. 6:54:35second column which
  7942. 6:54:38means that we need to have 1 * 6 + 2 *
  7943. 6:54:468 then here we got the second row and
  7944. 6:54:49then second column which means 3 * 6 + 4
  7945. 6:54:53*
  7946. 6:54:558 and then this is equal
  7947. 6:54:59to 1 * 5 is 5 5 2 * 7 is 14 so this is
  7948. 6:55:0819 1 * 6 is 6 2 * 8 is 16 6 + 16 is
  7949. 6:55:1822 in here 3 * 5 is 15 4 * 7 is 28 so
  7950. 6:55:24this is then 33 and then 43 so
  7951. 6:55:3043 and in here we got 3 * 6 6 is 18 4 *
  7952. 6:55:368 is 32 so we end up with
  7953. 6:55:4650 so hope I haven't made any mistakes
  7954. 6:55:49in the
  7955. 6:55:51calculations so this is the a *
  7956. 6:56:00B so a * B is then equal
  7957. 6:56:06to 19 22 43
  7958. 6:56:1150 let's clean this pce and let's move
  7959. 6:56:14ahead to the second part of the
  7960. 6:56:16calculation which is a *
  7961. 6:56:21C what is a * C well a * C
  7962. 6:56:29is 1 2 3 4 1 2 3 3 4 multiplied by
  7963. 6:56:36-1 0 0 -1 so here we are then
  7964. 6:56:42getting -1 +
  7965. 6:56:450 here we are
  7966. 6:56:47getting -3 + 0 here we
  7967. 6:56:53have -1 +
  7968. 6:56:560
  7969. 6:56:58so no so the first row and second column
  7970. 6:57:04which is 0us
  7971. 6:57:062 and then in here we got the second row
  7972. 6:57:10and the second column which is 0 -
  7973. 6:57:144 which means that we end up with this
  7974. 6:57:17Matrix and it's equal to
  7975. 6:57:20-1
  7976. 6:57:22-3 then -2 and then
  7977. 6:57:29-4 which means that we are getting
  7978. 6:57:33as a final step AB plus a which
  7979. 6:57:37means 19 202 43 and then 50 then
  7980. 6:57:44plus -1 - 2 - 3 - 4 and what is this 19
  7981. 6:57:51- 1 is 18 43 - 3 is 40 22 - 2 is 20 50 -
  7982. 6:58:004 is 46
  7983. 6:58:04okay so we got
  7984. 6:58:08that this amount ab+ a c is equal to 18
  7985. 6:58:1420 40
  7986. 6:58:1646 and as you can see already
  7987. 6:58:20here this Matrix that we got in the
  7988. 6:58:23previous calculation from one is equal
  7989. 6:58:25to this Matrix that we got as part of
  7990. 6:58:27second calculation which means that now
  7991. 6:58:30we have proved that for this specific
  7992. 6:58:32example indeed 1 is equal to 2 which
  7993. 6:58:35means that a * b + C is equal
  7994. 6:58:40to AB
  7995. 6:58:43plus
  7996. 6:58:46AC there we go so let's now look into
  7997. 6:58:50another law which is the scalar
  7998. 6:58:53multiplication law for
  7999. 6:58:55matrices so the scalar multiplication
  8000. 6:58:58law for matrices says
  8001. 6:59:01that if we got a scalar R and a matrix A
  8002. 6:59:05and
  8003. 6:59:06B then R * a * B is equal to R * a * B
  8004. 6:59:13and is equal to a * R *
  8005. 6:59:16B so here the r is just a
  8006. 6:59:21scalar so it's a real
  8007. 6:59:23number and then A and B are
  8008. 6:59:28matrices and what this low basically
  8009. 6:59:31says is is that it doesn't matter what
  8010. 6:59:34in which stage you will do your matrix
  8011. 6:59:37multiplication with the scaler if you
  8012. 6:59:39have this external scaler you can first
  8013. 6:59:42take the two matrices multiply them with
  8014. 6:59:45each other so the A and then B and then
  8015. 6:59:49multiply it with
  8016. 6:59:51r
  8017. 6:59:53or you can
  8018. 6:59:55take the scalar R multiply with your
  8019. 6:59:58first Matrix and then multiply with B
  8020. 7:00:02or you can take your second Matrix
  8021. 7:00:06multiply with the scaler and then
  8022. 7:00:08multiply with a it doesn't matter they
  8023. 7:00:11will all result in the same Matrix so
  8024. 7:00:15let us actually prove this by making use
  8025. 7:00:18of our skills from matrix multiplication
  8026. 7:00:20and scalar multiplication here I've
  8027. 7:00:23picked up bit more uh Advanced example
  8028. 7:00:26where uh a is
  8029. 7:00:292x3 and B is 3x3 in this way we will
  8030. 7:00:32train our multiplication skills for
  8031. 7:00:35matrices and at the same time we will
  8032. 7:00:37also prove that the scalar
  8033. 7:00:39multiplication law of matrices holds so
  8034. 7:00:42let's go ahead and do the
  8035. 7:00:46multiplications so first we have a
  8036. 7:00:48matrix
  8037. 7:00:49a what is that Matrix Matrix a
  8038. 7:00:56is 1 - one 2 so 1 - one and then
  8039. 7:01:03two then we got 0
  8040. 7:01:082 and then
  8041. 7:01:121 which is 2 by 3 and then we got B
  8042. 7:01:19which is equal 2 it is 3x
  8043. 7:01:253 with elements 1
  8044. 7:01:28Z 1 1
  8045. 7:01:332
  8046. 7:01:35Z one one and then 3
  8047. 7:01:411 0 2 so it
  8048. 7:01:46is
  8049. 7:01:483x 4 so it's 3x 4 not 3x 3 but 3x 4
  8050. 7:01:55Matrix now the final part that I need
  8051. 7:02:00here is this which is R is equal to 2
  8052. 7:02:03the scalar value so R is equal to
  8053. 7:02:072 so the first thing that I'm going to
  8054. 7:02:09do is to calculate this amount which is
  8055. 7:02:12R * a * B for that what I need to do is
  8056. 7:02:16to First calculate this a * B so let me
  8057. 7:02:20quickly go and calculate this for us
  8058. 7:02:55so given that the a has Dimension 2x3
  8059. 7:02:57and then B has a dimension 3x4 I can see
  8060. 7:03:00that quickly that my Dimension criteria
  8061. 7:03:03is satisfied the number of columns of a
  8062. 7:03:06is equal to number of rows of B so
  8063. 7:03:08that's fine and then I know also know
  8064. 7:03:11that the final dimension of a * B is
  8065. 7:03:13going to be 2x4 so it's going to be a
  8066. 7:03:182x4 Matrix and how do I know that well
  8067. 7:03:21because I know that from our um all the
  8068. 7:03:26problems that we have solved we have
  8069. 7:03:28already seen that we always need to pick
  8070. 7:03:30the number of rows of the First Column
  8071. 7:03:33and the number of columns of the second
  8072. 7:03:36uh Matrix in order to get the final
  8073. 7:03:38Dimension which is
  8074. 7:03:402x4
  8075. 7:03:42so let me then go ahead and do the
  8076. 7:03:45calculation so we are going to have a
  8077. 7:03:482x4 Matrix let me write it even
  8078. 7:03:52bigger so it's going to be a
  8079. 7:03:572x4 Matrix
  8080. 7:04:12so for the first
  8081. 7:04:15row and First
  8082. 7:04:18Column I need to look in here the first
  8083. 7:04:22row and the First Column which means I
  8084. 7:04:25need to
  8085. 7:04:27take
  8086. 7:04:30one so it's equal to
  8087. 7:04:331 * 1 so + 1 * 1 is 1 - 1 * 2 is -
  8088. 7:04:412 2 * 3 is 6 + 6 this is my first value
  8089. 7:04:48and what is this amount it is equal to 1
  8090. 7:04:50- 2 is - 1 and 6 - 1 is equal to 5 so
  8091. 7:04:56this amount is five
  8092. 7:05:03five so what is this
  8093. 7:05:08amount well this is my second row in the
  8094. 7:05:11First Column so I need to make
  8095. 7:05:15use
  8096. 7:05:18of second row and First Column which is
  8097. 7:05:22equal to 0 * 1 is 0 2 * 2 is 4 and 1 * 3
  8098. 7:05:28is 3 4 + 3 is 7 so this value is 7 seven
  8099. 7:05:33we are ready to go on to the next column
  8100. 7:05:36so column number two so then this
  8101. 7:05:43time I need to look at the first row and
  8102. 7:05:48second column so we are going to use
  8103. 7:05:50this one so first we will use this first
  8104. 7:05:53Row 1 * 0 is 0 - 1 * 0 is 0 0 + 0 is 0
  8105. 7:05:58and then 2 * 1 is the only nonzero
  8106. 7:06:00element 2 * one is two so I already know
  8107. 7:06:03that for my second column I got here
  8108. 7:06:10two and what is this element well for
  8109. 7:06:13this I need to look at the second row
  8110. 7:06:18and second column so this thing so 0 * 0
  8111. 7:06:21is 0 2 * 0 is 0 1 * 1 is one which means
  8112. 7:06:27that here I get a
  8113. 7:06:30one let's not move on to on uh towards
  8114. 7:06:33the third column so in here first I need
  8115. 7:06:37to look at the first row so 1 - one and
  8116. 7:06:39two and then this
  8117. 7:06:43time remove
  8118. 7:06:48this I need to look at the third
  8119. 7:06:52column because I'm here in the third
  8120. 7:06:55column
  8121. 7:06:58so 1 * 1 is 1 -1 * 1 is 1 so here I got
  8122. 7:07:051 - 1 and then 2 * 0 is 0+ 0 1 - 1 + 0
  8123. 7:07:13is 0 because those two cancel
  8124. 7:07:16out this means that here in this element
  8125. 7:07:19I got a zero and what about this element
  8126. 7:07:22where I need to look here in the second
  8127. 7:07:24row and here I need to look at the third
  8128. 7:07:26column 0 * 1 is 0 2 * 1 is 2 1 * 0 is 0
  8129. 7:07:32so 0 + 2 + 0 is equal to 2 so this is
  8130. 7:07:372 and now we are left with the fourth
  8131. 7:07:41column so for that I need to
  8132. 7:07:44look in
  8133. 7:07:46here so for the first row which means
  8134. 7:07:50first row in here and then the fourth
  8135. 7:07:51column in here so first row in here and
  8136. 7:07:53fourth column here 1 * 1 is 1 - 1 * 1 is
  8137. 7:07:581 and then 2 * 2 is 4 which means that I
  8138. 7:08:01end up with 1 - one and then + 4 and
  8139. 7:08:05what is this this two cancel out I end
  8140. 7:08:08up with four which means that here I
  8141. 7:08:10need to fill
  8142. 7:08:11in
  8143. 7:08:13four and what is this final element it
  8144. 7:08:16is the second row in the fourth column
  8145. 7:08:17so the second row in the fourth column 0
  8146. 7:08:20* 1 is 0 2 * 1 is 2 1 * 2 is 2 0 + 2 + 2
  8147. 7:08:26is =
  8148. 7:08:284 so now we obtained that a * B is this
  8149. 7:08:342 * 4 Matrix as we have
  8150. 7:08:39expected so this is then equal to 5 2 04
  8151. 7:08:45and then 7 1 2 4
  8152. 7:09:03so then the next step would be to take
  8153. 7:09:05the scaler R and multiply it with a *
  8154. 7:09:11B let me actually keep the colors
  8155. 7:09:14consistent so a * B this is a * B so the
  8156. 7:09:20only thing that I need to do is to take
  8157. 7:09:24that in here and multiply this two with
  8158. 7:09:29each of those elements so I will end up
  8159. 7:09:32with the same size Matrix so 2x 4 only
  8160. 7:09:37all these elements need to be multiplied
  8161. 7:09:39with the scaler which means that I will
  8162. 7:09:41get 5 * 2 is 10 2 * 2 is 4 0 * 2 is 0 4
  8163. 7:09:47* 2 is 8 and then 7 * 2 is 14 1 * 2 is 2
  8164. 7:09:532 * 2 is 4 and then 4 * 2 is 8 so this
  8165. 7:09:58is the result of the multiplication
  8166. 7:10:04so this is the first part this is what
  8167. 7:10:06we are referring as
  8168. 7:10:08one so we have then
  8169. 7:10:11checked in
  8170. 7:10:14here that the
  8171. 7:10:18r times actually we have already in here
  8172. 7:10:22so I won't be writing again so as part
  8173. 7:10:24of the first
  8174. 7:10:26section we have already seen that R * a
  8175. 7:10:29* B is this Matrix
  8176. 7:10:31let's now move on to the next one which
  8177. 7:10:34is
  8178. 7:10:36calculating the second part so this is
  8179. 7:10:39the first part this is the second and
  8180. 7:10:41this is the third we have this already
  8181. 7:10:44let's now move on and calculate this one
  8182. 7:10:47so for this second case so the second
  8183. 7:10:50case what we want to calculate is R * a
  8184. 7:10:54* B so it is R * a and then * B this is
  8185. 7:11:01what we need to calculate so the first
  8186. 7:11:03thing that we will do is to calculate
  8187. 7:11:05this
  8188. 7:11:06part and then to calculate the entire
  8189. 7:11:09thing the second
  8190. 7:11:11point so let's go ahead and do
  8191. 7:11:14that first we will take the A and then
  8192. 7:11:18we will multiply all its elements by
  8193. 7:11:20scaler two to get the r and then a this
  8194. 7:11:24amount is equal
  8195. 7:11:272 1 * 2 is = 2 - 1 1 * 2 is - 2 2 * 2 is
  8196. 7:11:33= 4 0 * 2 is = 0 2 * 2 is = 4 2 * 1 is
  8197. 7:11:39equal to 2 this is R * a now in The Next
  8198. 7:11:44Step so this was one the next step we
  8199. 7:11:47need to take this amount this
  8200. 7:11:53Matrix to minus 2 4
  8201. 7:11:58042 and multiply it with
  8202. 7:12:041 2 3 0 0 1 and then 1 1 Zer and then 1
  8203. 7:12:13one 2 so basically the Matrix
  8204. 7:12:16B let's now move and work our way out
  8205. 7:12:21with that one actually let me remove
  8206. 7:12:23this from here and keep the space bit
  8207. 7:12:26more clean R time a and I will
  8208. 7:12:31multiplying this with the Matrix 1 2 3
  8209. 7:12:35and then 0 0 1 and then 1 1 1 1 and then
  8210. 7:12:410
  8211. 7:12:422 well I know that this one is 2x3 and
  8212. 7:12:46this one is 3x 4 which means that the
  8213. 7:12:48result will be 2x 4 let's now go ahead
  8214. 7:12:52and calculate that Matrix which is equal
  8215. 7:12:56with a dimension of 2x 4
  8216. 7:13:04well for the first row and First Column
  8217. 7:13:07let me actually go and quickly do those
  8218. 7:13:11calculations let's now go ahead and do
  8219. 7:13:13those calculations so we are going to
  8220. 7:13:16have four columns as previously the
  8221. 7:13:19dimension is going to be
  8222. 7:13:212x4 so let's do it column by column in
  8223. 7:13:24here it means that we are in the row one
  8224. 7:13:27and then column 1 so 2 * 1 is equal to 2
  8225. 7:13:31- 2 * 2 is - 4 and then here we got 4 so
  8226. 7:13:354 * 3 is 12 so we got 2 - 4 and then +
  8227. 7:13:4212 and what is this amount 2 - 4 is - 2
  8228. 7:13:47+ 12 is
  8229. 7:13:5010 so here we got 10 let me remove
  8230. 7:13:57this
  8231. 7:13:5910 this is the second row and the First
  8232. 7:14:02Column which means we got 0 * 1 is 0 4 *
  8233. 7:14:062 is 8 and 2 * 3 is 6 so 8 + 6 is equal
  8234. 7:14:14to 14 so here we got
  8235. 7:14:2014 this is the first row and second
  8236. 7:14:23column which means that we are looking
  8237. 7:14:24at this row and second column this
  8238. 7:14:29time so 2 * 0 is 0 - 2 * 0 is 0 the only
  8239. 7:14:33thing that we care about is this one and
  8240. 7:14:36this element which is 4 * 1 so this
  8241. 7:14:38should be four let's now do the same for
  8242. 7:14:40the second row 0 * 0 is 0 4 * 0 is 0 0 +
  8243. 7:14:440 is 0 which means we are left with 2 *
  8244. 7:14:461 so here it comes
  8245. 7:14:49two let's now do the third column so for
  8246. 7:14:54the third column we got First Row 2 * 2
  8247. 7:14:582 * 1 is 2 - 2 * 1 is - 2 and then 4 * 0
  8248. 7:15:02is 0 which means that here we get 0
  8249. 7:15:06because 2 - 2 + 0 is 0 then we got the
  8250. 7:15:12second row and third column which is
  8251. 7:15:15this row and then third Comm so 0 * 1 is
  8252. 7:15:200 4 * 1 is 4 2 * 0 is 0 0 + 4 + 0 is
  8253. 7:15:25four so this is four and then for the
  8254. 7:15:28first row and then fourth coln so it
  8255. 7:15:31means that we need to look at this
  8256. 7:15:32specific column the first row is 2 * 1
  8257. 7:15:38it is 2 - 2 * 1 is - 2 and then 4 * 2 is
  8258. 7:15:438 so 2 - 2 + 8 is
  8259. 7:15:488 and then finally for the second row
  8260. 7:15:51and the fourth column 0 * 1 is 0 4 * 1
  8261. 7:15:55is 4 2 * 2 is 4 4 + 4 is 8
  8262. 7:16:01this is the final Matrix which means
  8263. 7:16:04that this entire amount that we just
  8264. 7:16:06calculated step by step this is equal to
  8265. 7:16:10this Matrix in
  8266. 7:16:13here okay so this is the second element
  8267. 7:16:16let's check whether the first element is
  8268. 7:16:18equal to the first one so we see here 10
  8269. 7:16:2148 142
  8270. 7:16:23248 as you can see we are dealing with
  8271. 7:16:26exactly the same Matrix which proves
  8272. 7:16:30that indeed
  8273. 7:16:32R * a * B is equal to R * a * B so this
  8274. 7:16:36part we have already proven because we
  8275. 7:16:38have seen that 1 is equal to
  8276. 7:16:412 perfect so the only thing that is
  8277. 7:16:43remaining is to calculate this third
  8278. 7:16:45part and to see whether this is equal to
  8279. 7:16:49this matrices because we have seen that
  8280. 7:16:52the two of those are equal so the
  8281. 7:16:55remaining thing that is left to prove
  8282. 7:16:57this theorem is to calculate this third
  8283. 7:16:58part let's go ahead and do that
  8284. 7:17:06that so the third element says let's
  8285. 7:17:09first calculate the r * B and then
  8286. 7:17:11multiply it by a so we need to
  8287. 7:17:14calculate
  8288. 7:17:16b r *
  8289. 7:17:19B * a this is what we need to calculate
  8290. 7:17:22which means first we need to calculate
  8291. 7:17:24this and then we need to can calculate
  8292. 7:17:26the entire thing all right so let's go
  8293. 7:17:29ahead and do that
  8294. 7:17:33so R * B is equal
  8295. 7:17:43to so we need to multiply each of the
  8296. 7:17:47elements of B by two so we end up with
  8297. 7:17:50this Matrix
  8298. 7:17:532 0 2 2 and then 2 * 2 is 4 2 * 0 is 0
  8299. 7:18:01and then 2 2 and then 2 * 3 is 6 2 * 1
  8300. 7:18:06is 2 2 * 0 is 0 2 * 2 is four this is
  8301. 7:18:11that first Matrix let's now go ahead and
  8302. 7:18:15calculate the second part which is a *
  8303. 7:18:19Matrix a so it
  8304. 7:18:22is 1 - 1 2 and then 0 2 and then 1
  8305. 7:18:32multiplied by this Matrix which is 2 4 6
  8306. 7:18:370 0 2 and then 2 two 0 and then 2 2
  8307. 7:18:444 okay
  8308. 7:18:46perfect so this is then what we need to
  8309. 7:18:50calculate well this is 3 * 4 this is 2 *
  8310. 7:18:543 which means the result should be 2 * 4
  8311. 7:18:58let's go ahead and do those calcul
  8312. 7:19:09ations this first amount will be the
  8313. 7:19:13first row and the First Column
  8314. 7:19:15dotproduct of those which means 1 * 2 is
  8315. 7:19:182 -1 * 4 is - 4 and then 2 * 6 is 12 so
  8316. 7:19:25here we got 2 - 4 + 12 and what is this
  8317. 7:19:31amount well 2 - 4 is - 2 12 - 2 is = to
  8318. 7:19:4010 so this one this element is
  8319. 7:19:4410 then for the second show we need to
  8320. 7:19:46look in here so 0 2 one and the
  8321. 7:19:49dotproduct of the one with the First
  8322. 7:19:51Column so this
  8323. 7:19:54thing and that is 0 * 2 is 0 2 * 4 is 8
  8324. 7:19:59and then 1 * 6 is 6 so what is 8 + 6
  8325. 7:20:06that is
  8326. 7:20:0814 and then for the first row and then
  8327. 7:20:11the second column we need to look to
  8328. 7:20:16the first row in here and then the
  8329. 7:20:19second column in here and the dotproduct
  8330. 7:20:21of the two well 1 * 0 is 0 Min - 1 * 0
  8331. 7:20:25is 0 and then 2 * 2 is four so that's
  8332. 7:20:28what we are left with four
  8333. 7:20:31and then for the second row and then the
  8334. 7:20:35second column so this element we
  8335. 7:20:38got 0 * 0 is 0 2 * 0 is 0 1 * 2 is
  8336. 7:20:462 for the first row and the third column
  8337. 7:20:51so we need to look in
  8338. 7:20:55here 1 * 2 is 2 - 1 * 2 is - 2 and then
  8339. 7:21:012 * 0 is 0 so we are left with
  8340. 7:21:06zero 0 and then once we do the
  8341. 7:21:10calculation for the second row we will
  8342. 7:21:11see that we end up with 0 * 2 is 0 2 * 2
  8343. 7:21:15is 4 and then 1 * 0 is 0 so we end up
  8344. 7:21:20with four and then here for the final
  8345. 7:21:26column 1 * 2 is 2 - 1 * 2 is - 2 and
  8346. 7:21:32then 2 * 4 is 8 the first two cancel out
  8347. 7:21:36and we end up with 8 and then for the
  8348. 7:21:39second row and the fourth column we look
  8349. 7:21:41into here again this time the second row
  8350. 7:21:440 * 2 is 0 2 * 2 is 4 and 1 * 4 is 4 and
  8351. 7:21:50then 4 + 4 is
  8352. 7:21:518 so if we look in here this is our
  8353. 7:21:55third amount we will quickly see that
  8354. 7:21:59again we have the same Matrix with
  8355. 7:22:02exactly the same elements so now we have
  8356. 7:22:05also proved this third part and we have
  8357. 7:22:08seen that in all cases the r * a * B is
  8358. 7:22:12equal to R * a * B is equal to a * R * B
  8359. 7:22:17now we are ready to move on towards the
  8360. 7:22:19second module in this unit which is
  8361. 7:22:21about the determinants and their
  8362. 7:22:23properties we are going to look into the
  8363. 7:22:26uh determinants at high level we are
  8364. 7:22:28going to Define them and going to
  8365. 7:22:30understand what why they matter and why
  8366. 7:22:31they are important then we are going to
  8367. 7:22:34see how we can calculate the
  8368. 7:22:35determinants we are going to see the
  8369. 7:22:38calculation for 2x two Matrix then 3x3
  8370. 7:22:41Matrix and then just in general how we
  8371. 7:22:43can do it and then we are going to see
  8372. 7:22:46the properties of determinants one by
  8373. 7:22:48one and then finally we are going to see
  8374. 7:22:50the determinants interpretation from the
  8375. 7:22:52geometric perspective so when we
  8376. 7:22:54visualize it using
  8377. 7:22:57python so by definition the determinant
  8378. 7:23:00is a scalar value that can be computed
  8379. 7:23:03from the elements of a square
  8380. 7:23:06Matrix so this important Square Matrix
  8381. 7:23:09and encodes certain properties of the
  8382. 7:23:12Matrix so the determinant provides a
  8383. 7:23:15critical information about The Matrix
  8384. 7:23:17such as whether it's
  8385. 7:23:19invertible and the volume scaling factor
  8386. 7:23:24for the linear transformation it
  8387. 7:23:26represents so we see that the uh concept
  8388. 7:23:29of theer detent is highly related to
  8389. 7:23:33many other concept that we have seen
  8390. 7:23:34before so first here it's talking about
  8391. 7:23:36the square Matrix then it's talking
  8392. 7:23:38about encoding certain properties so
  8393. 7:23:41having the determinant it contains
  8394. 7:23:43certain information that um is related
  8395. 7:23:46to the properties of the system that
  8396. 7:23:50that Matrix is representing and then it
  8397. 7:23:53provides critical information about the
  8398. 7:23:55underlying metrix because the
  8399. 7:23:57determinant is calculated from Matrix we
  8400. 7:24:01say the determinant of a matrix so it
  8401. 7:24:03contains a critical information about
  8402. 7:24:05that Matrix such as whether it's
  8403. 7:24:07invertible or not and this goes back to
  8404. 7:24:09the concept of inverse we will see this
  8405. 7:24:12once we learn the concept of determinant
  8406. 7:24:14because the inverse calculation is
  8407. 7:24:16dependent on the
  8408. 7:24:18determinant but keep this thing in mind
  8409. 7:24:21that the determinant contains
  8410. 7:24:23information whether we can get um
  8411. 7:24:26inverse from a matrix or not we will see
  8412. 7:24:29this concept over also in detail in the
  8413. 7:24:32next section but for now we can remember
  8414. 7:24:35that the determinant contains important
  8415. 7:24:37information related to the invertibility
  8416. 7:24:40of the Matrix so having an inverse or
  8417. 7:24:42not and then it also contains
  8418. 7:24:44information about the volume scaling
  8419. 7:24:46factor for the linear transformation it
  8420. 7:24:50represents so here we then go back to
  8421. 7:24:52this concept of a x is equal to B and
  8422. 7:24:55then knowing the determinant we can then
  8423. 7:24:58comment on this volume scaling factor
  8424. 7:25:02for this linear transformation that it
  8425. 7:25:04represents so let's go uh on to the next
  8426. 7:25:08slide to find out bit more about the
  8427. 7:25:11determinants and specifically how we can
  8428. 7:25:13calculate the determinant in the
  8429. 7:25:15mathematical terms when it comes to the
  8430. 7:25:172x two Matrix because the uh determinant
  8431. 7:25:22of a 2X two Matrix is quite
  8432. 7:25:24straightforward so for 2x2 matrix a with
  8433. 7:25:28this elements where a b c and d they are
  8434. 7:25:32all real
  8435. 7:25:35numbers the
  8436. 7:25:37determinant which we Define by this de a
  8437. 7:25:41so that is a short way of saying
  8438. 7:25:43determinant and then in here we always
  8439. 7:25:45write the Matrix of which we are
  8440. 7:25:47Computing the determinant is then equal
  8441. 7:25:50to and then we are taking this a * D so
  8442. 7:25:54we are taking this diagonal elements a *
  8443. 7:25:59d so they are on the diagonal and then
  8444. 7:26:02we are subtracting from this this other
  8445. 7:26:05two the remaining two
  8446. 7:26:08elements of the diagonal so B * C and
  8447. 7:26:14this gives us the determinant of 2x2
  8448. 7:26:17matrix this is just a formula that you
  8449. 7:26:20need to uh remember whenever you want to
  8450. 7:26:22calculate the determinant of a matric by
  8451. 7:26:25hand
  8452. 7:26:26manually so the calculation for larger
  8453. 7:26:29matrices it involves bit more uh
  8454. 7:26:32difficult uh calculation we will see
  8455. 7:26:35also in a bit the uh determinant of a
  8456. 7:26:383X3 Matrix It relies on the determinant
  8457. 7:26:40of a 2X two Matrix and the idea is that
  8458. 7:26:44every time we uh increase the dimension
  8459. 7:26:46of our problem so let's say we are in R4
  8460. 7:26:49then we will go back to the R3 and then
  8461. 7:26:51given that R3 relies on the determinant
  8462. 7:26:54of the underlying 2x two matrices
  8463. 7:26:56anytime we increase the dimension we
  8464. 7:26:58again go back to this IDE of using 2 by
  8465. 7:27:01two matrices that form the entire Matrix
  8466. 7:27:03in order to compute the determinant only
  8467. 7:27:06when it is R4 R5 Etc so it becomes much
  8468. 7:27:10more difficult to describe and to do it
  8469. 7:27:12manually therefore there are other
  8470. 7:27:14algorithms which we will see at the end
  8471. 7:27:16of this course like uh the composition
  8472. 7:27:19algorithms and factorization algorithms
  8473. 7:27:21that can be used in order to calculate
  8474. 7:27:23the determent of a matrix that has
  8475. 7:27:25higher Dimension higher than the tree
  8476. 7:27:27for instance but in this specific unit
  8477. 7:27:30we are going to discuss both the
  8478. 7:27:32calculation of the 2x two matrices
  8479. 7:27:33determinant and the determinant of a 3X3
  8480. 7:27:36matrices and we will also see detailed
  8481. 7:27:38examples of
  8482. 7:27:40them so without further Ado let's then
  8483. 7:27:42go ahead and calculate the determinant
  8484. 7:27:45of this 2x2 matrix so let's now look
  8485. 7:27:47into this specific example where we are
  8486. 7:27:49calculating the determinant of this 2x2
  8487. 7:27:51matrix so this is the A and let's keep
  8488. 7:27:55in mind that this is the um uh a this is
  8489. 7:27:59the
  8490. 7:28:00uh B in this not in this uh way of
  8491. 7:28:05writing the Matrix a so the uh letters
  8492. 7:28:08corresponding of the uh elements of this
  8493. 7:28:11Matrix a so this is the a this is the
  8494. 7:28:13B and then this is the C this is the D
  8495. 7:28:17and we said that the
  8496. 7:28:19determinant
  8497. 7:28:21that of a is equal to the diagonal
  8498. 7:28:26elements so 1 * 4
  8499. 7:28:31minus the of diagonal Elements which is
  8500. 7:28:362x3 because we said that the definition
  8501. 7:28:41of
  8502. 7:28:43this determinant is that is equal to a *
  8503. 7:28:47D and then minus B * C which is exactly
  8504. 7:28:51what we are doing in here so if we
  8505. 7:28:54calculate 1 * 4 is = to 4 and then 2 * 3
  8506. 7:28:57is = 6 4 - 6 is = to - 2 therefore we
  8507. 7:29:01say that the
  8508. 7:29:03determinant of Matrix a is equal to Min
  8509. 7:29:07- 2 let's now go ahead and uh practice
  8510. 7:29:11with calculation of determinants on two
  8511. 7:29:14other matrices so in this case we are
  8512. 7:29:16still in the two dimensional space so we
  8513. 7:29:19have 2 by two matrices we'll first
  8514. 7:29:22calculate the the determinant for Matrix
  8515. 7:29:24a so we see that we got this element
  8516. 7:29:285061 and we know that by definition the
  8517. 7:29:32determinant of the 2x two Matrix so that
  8518. 7:29:36of
  8519. 7:29:38Matrix is equal
  8520. 7:29:41to a * d - B * C where the
  8521. 7:29:50Matrix has the following form so we got
  8522. 7:29:53a and then D in here and then B and the
  8523. 7:29:56C in here so we see that this is basic
  8524. 7:29:59Bally our a this is our D this is our B
  8525. 7:30:04and this our C the way you can also said
  8526. 7:30:08is that those are the diagonal elements
  8527. 7:30:12and those are the of diagonal
  8528. 7:30:16elements so therefore it means that we
  8529. 7:30:19can calculate the
  8530. 7:30:23determinant of Matrix
  8531. 7:30:26a by taking the five multiplying with
  8532. 7:30:31one so it is 5 * 1 minus the off
  8533. 7:30:37diagonal element which is 6 *
  8534. 7:30:400 and this amount is equal to 5 - 0 and
  8535. 7:30:45is equal to 5 let's go ahead and also
  8536. 7:30:48calculate the determinant of Matrix B we
  8537. 7:30:52see here that on the diagonal we have
  8538. 7:30:54this two elements one one and of the
  8539. 7:30:57diagonal elements are both zero
  8540. 7:31:00those two therefore we can calculate the
  8541. 7:31:04determinant of this 2x2 matrix which is
  8542. 7:31:07also sometimes referred as I2 so it is
  8543. 7:31:10the identity Matrix because we got here
  8544. 7:31:13the E1 and then E2 in the two
  8545. 7:31:16dimensional
  8546. 7:31:18space and the determinant of the Matrix
  8547. 7:31:21B using this definition is then equal to
  8548. 7:31:241 * 1 - 0 * 0 so 1 * 1 - 0 *
  8549. 7:31:350 and this is equal to 1 and this is
  8550. 7:31:39actually a special case of determinant
  8551. 7:31:43and later on we will see why it is so
  8552. 7:31:46important to uh have this relationship
  8553. 7:31:49of identity Matrix having a determinant
  8554. 7:31:52and having it equal to one um and this
  8555. 7:31:56relationship between determinant
  8556. 7:31:57identity Matrix is something that we see
  8557. 7:31:59so uh in the upcoming lesson so keep
  8558. 7:32:02this one in mind so now when we are
  8559. 7:32:04clear on how we can calculate the
  8560. 7:32:06determinant for 2 by2 Matrix so this is
  8561. 7:32:09quite simple and straightforward
  8562. 7:32:10calculation by taking the diagonal
  8563. 7:32:13elements a and then D and then
  8564. 7:32:16subtracting from that from that product
  8565. 7:32:18a * C we are subtracting the off
  8566. 7:32:20diagonal elements products B * C we can
  8567. 7:32:23then get our determinant and now when we
  8568. 7:32:26are clear on that we are ready to go on
  8569. 7:32:28to bit more Advanced calculations which
  8570. 7:32:31is calculating the determinant this time
  8571. 7:32:34for the 3X3 Matrix so now we increase
  8572. 7:32:38the um the dimension size and we go from
  8573. 7:32:42R2 to
  8574. 7:32:45R3 because now we have a 3X3 Matrix and
  8575. 7:32:49by definition given a 3X3 Matrix a which
  8576. 7:32:53has the following elements so a11 a21
  8577. 7:32:57a31 and then a12 a32 a 32 so we have
  8578. 7:33:01already seen this coefficient labeling
  8579. 7:33:03this should look very familiar this is
  8580. 7:33:053x3 Matrix 2 and the determinant of a
  8581. 7:33:09matrix a denoted as that a is calculated
  8582. 7:33:13using the formula and here we see the
  8583. 7:33:17formula we are basically using the 2x
  8584. 7:33:22two matrices that form this Matrix a in
  8585. 7:33:27order to calculate the determinant of
  8586. 7:33:29the 3X3 Matrix and how we are doing that
  8587. 7:33:33well we are using this element and then
  8588. 7:33:37this element and this element and every
  8589. 7:33:40time we are
  8590. 7:33:44hiding part of the Matrix so when we
  8591. 7:33:48have for instance this a11 so for this
  8592. 7:33:51first part we are saying well let's hide
  8593. 7:33:57the row and the column
  8594. 7:34:00corresponding to this
  8595. 7:34:02element which means that we need to hide
  8596. 7:34:06this this row and this column and what
  8597. 7:34:11is left is this 2x two
  8598. 7:34:13Matrix we will calculate the determinant
  8599. 7:34:16of this 2x2 matrix and we will multiply
  8600. 7:34:19this with this element that we use in
  8601. 7:34:21order to remove the corresponding row
  8602. 7:34:24and
  8603. 7:34:26column this will form the first element
  8604. 7:34:29in here
  8605. 7:34:30so you can see a11 which is a simple
  8606. 7:34:34value so this is the um uh entry volume
  8607. 7:34:39which is in the first draw and First
  8608. 7:34:41Column a11 multiplied by the determinant
  8609. 7:34:45of this Matrix so this
  8610. 7:34:50Matrix so once we have that and we
  8611. 7:34:53already know how we can calculate a
  8612. 7:34:56determinant of a 2X two Matrix because
  8613. 7:34:59this 2X two so taking the diagonal
  8614. 7:35:01elements and then multiplying them
  8615. 7:35:03together subtracting from that the of
  8616. 7:35:05diagonal elements product now we are
  8617. 7:35:07ready to go on to the next part of the
  8618. 7:35:11calculation which is this time adding a
  8619. 7:35:13minus here so you can see here this here
  8620. 7:35:16is plus and then here is
  8621. 7:35:19minus so we do here
  8622. 7:35:23minus and for this second step what we
  8623. 7:35:27need to do is kind of similar only this
  8624. 7:35:29time
  8625. 7:35:30the element that we will be using to
  8626. 7:35:33understand how we can remove the row and
  8627. 7:35:35the column so we will then dark it out
  8628. 7:35:37it is this
  8629. 7:35:39one
  8630. 7:35:41a12 so then we will need to remove this
  8631. 7:35:44column and this row and then the
  8632. 7:35:47remaining Matrix which
  8633. 7:35:50is this one this 2x two and here I mean
  8634. 7:35:54a
  8635. 7:35:5621 a 31 and then a a
  8636. 7:36:0023 and then
  8637. 7:36:03a33 this is the Matrix that you can see
  8638. 7:36:06in here remaining which means remove
  8639. 7:36:08this
  8640. 7:36:09one and then this one and then the
  8641. 7:36:12remaining 2 by two Matrix is what you
  8642. 7:36:15need to use in order to do your
  8643. 7:36:18calculations so you can see that I got
  8644. 7:36:21exactly the same in here and once again
  8645. 7:36:24we are Computing the determinant of this
  8646. 7:36:27Matrix we are multiplying this with this
  8647. 7:36:29a want to element so this
  8648. 7:36:31element and now we have also the second
  8649. 7:36:34element in our
  8650. 7:36:36calculation and then we go on to the
  8651. 7:36:39next step which is a plus sign here let
  8652. 7:36:42me use the same colors plus sign here
  8653. 7:36:45and then we are using this time our
  8654. 7:36:47final third
  8655. 7:36:50element to understand which row and
  8656. 7:36:53which car we need to dark out which
  8657. 7:36:56is this
  8658. 7:36:57element so we then remove the first row
  8659. 7:37:01and the last column and this is then the
  8660. 7:37:04Matrix the 2x two Matrix that we use in
  8661. 7:37:07order to do our calculation so deter the
  8662. 7:37:09determinant of this Matrix multiplied by
  8663. 7:37:11the
  8664. 7:37:13a13 so we could also use in the same
  8665. 7:37:17manner this row or this row it really
  8666. 7:37:20depends on the kind of values the the
  8667. 7:37:23tip that um I will provide to you or the
  8668. 7:37:25trick is that to always look for these z
  8669. 7:37:28z values wherever I see Z zos or I see
  8670. 7:37:31one one I'm thinking that hey those s u
  8671. 7:37:35values that um give me the more
  8672. 7:37:38straightforward and easy calculations
  8673. 7:37:41because if I have zeros in my Cal in my
  8674. 7:37:46entry so if I got a zero here for
  8675. 7:37:48instance 0 times any determinant is zero
  8676. 7:37:52I don't even then need to calculate the
  8677. 7:37:54determinant right because then I know
  8678. 7:37:56that I'm multiplying that determinant
  8679. 7:37:58with zero therefore if I know that that
  8680. 7:38:01entry for instance this row contains the
  8681. 7:38:03majority uh of zero so it is 0 01 then
  8682. 7:38:07of course it's a great uh row to pick to
  8683. 7:38:10use these Target
  8684. 7:38:12elements so in that way I will then know
  8685. 7:38:15that this is the row that I need to
  8686. 7:38:16Target but if it is like that that for
  8687. 7:38:19instance I got a matrix 10 3 4 and here
  8688. 7:38:23I got 0 1 Zer and here I have 100 three
  8689. 7:38:27and four of of course the easiest thing
  8690. 7:38:30would be to not use this row but instead
  8691. 7:38:34use this one so in that case I will then
  8692. 7:38:37have this zero and zero as my target
  8693. 7:38:40values which means that I will only need
  8694. 7:38:42to calculate the determinant of a 2x2
  8695. 7:38:45matrix this uh for this one for the two
  8696. 7:38:49cases I don't need to do it because I
  8697. 7:38:50know that the corresponding Target
  8698. 7:38:53values the target elements from my
  8699. 7:38:55Matrix will be zero so let me show you
  8700. 7:38:58what I mean by that so if for instance I
  8701. 7:39:02go for this second row and not the first
  8702. 7:39:06one what I need to do is that I can
  8703. 7:39:09calculate the determinant of a by taking
  8704. 7:39:13the
  8705. 7:39:15a21 this then will be my target I will
  8706. 7:39:18then need to remove this uh column and
  8707. 7:39:22this row then I will need to do the
  8708. 7:39:25determinant of A1 2 A1 3 a 3 2
  8709. 7:39:33a33 this is what then I need to do then
  8710. 7:39:37the next thing I need to do is of course
  8711. 7:39:40here I have a plus here I need to do
  8712. 7:39:42minus because we always need to
  8713. 7:39:44Interchange the values so here is a plus
  8714. 7:39:46here is a minus here is a plus so I do
  8715. 7:39:49PL a minus in here then I
  8716. 7:39:52do the next element in my row which is
  8717. 7:39:55this
  8718. 7:39:56one let me use red color so a22 so I'm
  8719. 7:40:01then doing a 22 multiply the determinant
  8720. 7:40:07of so I'm re removing this row and this
  8721. 7:40:10column A1 1
  8722. 7:40:14a13 and then
  8723. 7:40:16a31
  8724. 7:40:20a33 and then the final part is of course
  8725. 7:40:23as you might have already guessed is to
  8726. 7:40:24look into this element so it is
  8727. 7:40:31plus
  8728. 7:40:33a23
  8729. 7:40:35multiplied the determinant of let me
  8730. 7:40:38actually write it down in here the
  8731. 7:40:41determinant of
  8732. 7:40:43a11 a12 and then a31 and then
  8733. 7:40:50a32 so in this way basically independent
  8734. 7:40:54of what row I
  8735. 7:40:57will take as my leading row that I will
  8736. 7:41:01do my calculations and I will just need
  8737. 7:41:03to pick one row I can always get the
  8738. 7:41:06same value for determinant of a but
  8739. 7:41:09choosing intelligently which row to
  8740. 7:41:12pick it will save you a lot of time and
  8741. 7:41:15headache in terms of calculations
  8742. 7:41:17because if you are dealing with a row
  8743. 7:41:20that contains many zeros for instance
  8744. 7:41:22you have 0 0 one or one 0 0 or even
  8745. 7:41:27better 00 0 then you know know
  8746. 7:41:29automatically that you will need to
  8747. 7:41:31calculate your DET the determinant once
  8748. 7:41:34here also once and here you don't even
  8749. 7:41:36need to calculate it you know that you
  8750. 7:41:38got zero here Z here zero here so it's
  8751. 7:41:40automatically equal to zero so I hope
  8752. 7:41:43this makes sense because this is a trick
  8753. 7:41:45that usually you will not come across
  8754. 7:41:47but this just helps you to save a lot of
  8755. 7:41:49time uh when it comes to calculation of
  8756. 7:41:51your determinants in a tree by3
  8757. 7:41:54settings so in this case uh we have this
  8758. 7:41:58um we now we have this definition and we
  8759. 7:42:01know the tricks that we can use but I
  8760. 7:42:03think it's really uh helpful to go ahead
  8761. 7:42:06and to solve a problem so basically this
  8762. 7:42:10is the higher level summary of the steps
  8763. 7:42:12that we just discussed um so the
  8764. 7:42:14determinant of a 3X3 Matrix it simply
  8765. 7:42:16involves multiplying the a11 by the
  8766. 7:42:21determinant of the 2x2 matrix that that
  8767. 7:42:24remains after excluding the row and
  8768. 7:42:26column of a11 so what we did in here by
  8769. 7:42:30doing this and subtracting the product
  8770. 7:42:33of A1 2 and the determinant of its
  8771. 7:42:36respective 2 two Matrix so this
  8772. 7:42:40part and then adding the product of a13
  8773. 7:42:43and the determinant of its respective 2x
  8774. 7:42:46two Matrix so this part and the signs
  8775. 7:42:50alternate so it means first you always
  8776. 7:42:53got the
  8777. 7:42:57plus then you always is get the minus
  8778. 7:43:00and then the
  8779. 7:43:04plus so they interchange you start with
  8780. 7:43:07plus then you do the minus and then the
  8781. 7:43:17plus so let's go ahead and calculate the
  8782. 7:43:20determinant of this
  8783. 7:43:22Matrix so before even looking at the
  8784. 7:43:25answer let's actually go ahead and do
  8785. 7:43:28that on this page paper so we got a
  8786. 7:43:32matrix a which is equal to 1 2 3 4 so
  8787. 7:43:37basically from 1 till 9 1 2 3 4 6
  8788. 7:43:434 5 6 and then 7 8 9 and for this 3x3
  8789. 7:43:51Matrix we need to calculate the
  8790. 7:43:53determinant so the determinant of a the
  8791. 7:43:57first thing that I'm seeing is that
  8792. 7:43:58there are no no rows with zeros or
  8793. 7:44:00columns which means that I cannot use my
  8794. 7:44:02uh trick and instead I will just need to
  8795. 7:44:05go with let's say the first dra and it's
  8796. 7:44:08also convenient given that I got as
  8797. 7:44:10scaler this values this much smaller
  8798. 7:44:12values relatively to the other
  8799. 7:44:15ones all right so first things first
  8800. 7:44:20let's go ahead and write down that
  8801. 7:44:21formula so the determinant of a is equal
  8802. 7:44:24to first we are going to take this one
  8803. 7:44:28so our one
  8804. 7:44:29one times and then we
  8805. 7:44:32got determinant of and then we
  8806. 7:44:37have this Matrix which is 5 6 8 and
  8807. 7:44:449 this is our remaining Matrix then the
  8808. 7:44:49next thing we need to do is to
  8809. 7:44:51Interchange the size uh the the sign
  8810. 7:44:54which is minus and then we got
  8811. 7:45:06so the remaining Matrix is
  8812. 7:45:14then determinant
  8813. 7:45:19of 4 6
  8814. 7:45:2579 and then
  8815. 7:45:27finally Plus plus three
  8816. 7:45:31times and then determinant
  8817. 7:45:36of what do we
  8818. 7:45:40have well this is the
  8819. 7:45:42target so it is
  8820. 7:45:454 5 7
  8821. 7:45:508 right so let's go and do those
  8822. 7:45:53calculations
  8823. 7:45:54quickly this is equal to 1 * the
  8824. 7:45:57determinant of this is the diagonal
  8825. 7:45:59element so 5
  8826. 7:46:03* it is 5 * 9 - 8 * 6 - 2 * 4 * 6 - 7 *
  8827. 7:46:146 Sorry 4 *
  8828. 7:46:189 so the diagonal elements 4 * 9 - 7 * 6
  8829. 7:46:24and plus three * and then 4 *
  8830. 7:46:318 - 5 *
  8831. 7:46:347 this is equal
  8832. 7:46:36to so 9 * 5 is = 45 8 * 6 is =
  8833. 7:46:4548 then - 2 * 4 * 9 is
  8834. 7:46:4936 7 * 6 is =
  8835. 7:46:5449 7 * 6 is = to
  8836. 7:46:5742 + 3 * 4 * 8 is = 32 - 5 * 7 is = 35
  8837. 7:47:05so this is equal to 1 * - 3 - 2 * and
  8838. 7:47:10then here we got 36 - 42 so that's - 6 +
  8839. 7:47:173 * -
  8840. 7:47:213 which is that = to - 3 + 12 - 9 which
  8841. 7:47:28which is equal to
  8842. 7:47:31zero so let's check it indeed we got the
  8843. 7:47:36right answer perfect so now when we are
  8844. 7:47:39clear on how we can do this calculation
  8845. 7:47:41let's now go ahead and calculate yet
  8846. 7:47:43another determinant of a 3X3 Matrix and
  8847. 7:47:46this time I want to show you this uh
  8848. 7:47:48simplified version by you making use of
  8849. 7:47:51this trick that I uh specified so
  8850. 7:47:54instead of using this first dra as an
  8851. 7:47:56indicator I will be using the uh second
  8852. 7:47:59row as my indicator one thing to keep in
  8853. 7:48:03mind when making use of this trick is
  8854. 7:48:05that when you start from the second row
  8855. 7:48:10so from the even
  8856. 7:48:13rows even
  8857. 7:48:15rows second fourth or sixth then in
  8858. 7:48:19those cases you need to flip the signs
  8859. 7:48:22that you will be using so while in here
  8860. 7:48:26you had Des Sign Plus
  8861. 7:48:29in the beginning then you got a minus
  8862. 7:48:31and then a plus when doing all these
  8863. 7:48:33calculations so you remember here we got
  8864. 7:48:36plus minus plus when you start from the
  8865. 7:48:40second row instead of first one you need
  8866. 7:48:42to flip the order of this so you need to
  8867. 7:48:45start with minus you have minus you got
  8868. 7:48:47plus and then
  8869. 7:48:49minus so knowing this trick it also
  8870. 7:48:52means that you go One Step Beyond and
  8871. 7:48:55you know how you need to intelligent
  8872. 7:48:58ently uh reduce the time that you are
  8873. 7:49:01spending on calculation calculation of
  8874. 7:49:04the determinant but it also means that
  8875. 7:49:06you need to be careful on knowing what
  8876. 7:49:09kind of signs you need to use because if
  8877. 7:49:11you start from the first row you start
  8878. 7:49:14with plus and then you do minus plus
  8879. 7:49:16minus plus so knowing how to start you
  8880. 7:49:19already know how you can go on but when
  8881. 7:49:21it comes to the second row so the even
  8882. 7:49:24rows you need to start with a minus so
  8883. 7:49:26you need to do minus plus minus plus dot
  8884. 7:49:29dot
  8885. 7:49:30dot all right so let's now go ahead and
  8886. 7:49:33use that technique in
  8887. 7:49:36here so here I see that my first row
  8888. 7:49:39doesn't contain zeros but my second row
  8889. 7:49:41does so this gives me indication that I
  8890. 7:49:44can reduce the time that I spent on
  8891. 7:49:46calculating the determinant at least one
  8892. 7:49:48time because I didn't no longer need to
  8893. 7:49:51calculate that
  8894. 7:49:52determinant so the determinant of B is
  8895. 7:49:56then equals you I will then start with
  8896. 7:49:59minus given that I'm going to use this
  8897. 7:50:01rope and then I have zero times
  8898. 7:50:05so because this is my element the
  8899. 7:50:10determinant the determinant of
  8900. 7:50:152306 and then
  8901. 7:50:20plus then this time the second element
  8902. 7:50:24Target element is this one so it's four
  8903. 7:50:31times and then we
  8904. 7:50:33got determinant of 1 3 1 6 and then
  8905. 7:50:42minus the five
  8906. 7:50:48times so this
  8907. 7:50:52five determinant of 1 2 1 0
  8908. 7:50:59and what is this amount it is equal to
  8909. 7:51:02this I don't need to calculate because I
  8910. 7:51:05got a zero in here this this trick is
  8911. 7:51:07all about this to not calculate the
  8912. 7:51:09determinant too often and
  8913. 7:51:13then this equals you four
  8914. 7:51:18times four times determinant of this is
  8915. 7:51:226 - 3 so 1 * 6 - 1 * 3 which is equal to
  8916. 7:51:283
  8917. 7:51:32and then
  8918. 7:51:37minus 5
  8919. 7:51:39* determinant of 1 2 1 0 which is 0 - 2
  8920. 7:51:49so this equal to 4 * 32 - 5 * - 2 which
  8921. 7:51:55is equal to 12 + 10 and this is equal to
  8922. 7:51:5922 let's go ahead and check this and
  8923. 7:52:02this is the more detailed and formal
  8924. 7:52:05derivation so one uh interesting thing
  8925. 7:52:08is that I calculated with my second row
  8926. 7:52:11and in here in this slides you can see
  8927. 7:52:13calculation with the first dra this is
  8928. 7:52:15just a nice way of seeing the difference
  8929. 7:52:17that you can do and here uh in this
  8930. 7:52:20solution what we have is that we have
  8931. 7:52:22manually calculated this first
  8932. 7:52:24determinant too so in total three
  8933. 7:52:26determinants but we again in end up with
  8934. 7:52:29the same determinant so independ what
  8935. 7:52:31kind of row you will use in order to
  8936. 7:52:33calculate your uh determinant of Matrix
  8937. 7:52:36B you will all always end up with the um
  8938. 7:52:39with the same similar volume unless you
  8939. 7:52:42have made a mistake in your calculations
  8940. 7:52:45so you just need to keep track of the uh
  8941. 7:52:47rows that contain many zeros and you
  8942. 7:52:50need to um be careful in terms of the
  8943. 7:52:53signs that you need to use and the sign
  8944. 7:52:56that you will need to start if you start
  8945. 7:52:58with the first row then start with plus
  8946. 7:53:00if you start with the second row then it
  8947. 7:53:02is minus and then plus Etc so as you can
  8948. 7:53:05see here it's a plus and then minus and
  8949. 7:53:08then Plus in my case I did with my
  8950. 7:53:10second row therefore I started with
  8951. 7:53:14minus all right so let's now move on to
  8952. 7:53:17the properties of determinants so the
  8953. 7:53:20determinant of an identity Matrix is one
  8954. 7:53:23that's something that we have also seen
  8955. 7:53:25when doing our calculations because we
  8956. 7:53:28are so that in one specific case when we
  8957. 7:53:30had this example so this Matrix B and
  8958. 7:53:34the Matrix B was the identity 2 in the
  8959. 7:53:36two dimensional space we have calculated
  8960. 7:53:39its determinant and we saw that it's
  8961. 7:53:41equal to one and this was not a
  8962. 7:53:42coincidence because the determinant of
  8963. 7:53:45identity matrices is always equal to
  8964. 7:53:49one then the second property is that
  8965. 7:53:52swapping two rows or Columns of a matrix
  8966. 7:53:55changes the sign of its
  8967. 7:53:57determinant so if you swap rows or
  8968. 7:54:00columns in your Matrix so if you end up
  8969. 7:54:04with Matrix A and B they are exactly the
  8970. 7:54:06same only one swaps the two columns or
  8971. 7:54:10two rows then you are changing the
  8972. 7:54:12determinant of that Matrix uh the sign
  8973. 7:54:16of that determinant but not devalue
  8974. 7:54:18itself it means that if you got a and
  8975. 7:54:20you got B and your a is equal to let's
  8976. 7:54:25say uh A1 and then uh A2 and then A3 so
  8977. 7:54:31it contains these
  8978. 7:54:33columns and then Matrix
  8979. 7:54:37B is equal to um let's say
  8980. 7:54:43A2 and then
  8981. 7:54:45A1
  8982. 7:54:47A3 then the
  8983. 7:54:51determinant determinant of a will be
  8984. 7:54:55equal to minus of the determinant of B
  8985. 7:55:00you can also say determinant of B will
  8986. 7:55:03then be equal to the minus determinant
  8987. 7:55:07of a this is basically the idea of this
  8988. 7:55:11property let's now move on to the third
  8989. 7:55:14property which says that if a matrix has
  8990. 7:55:17a row or a column of zeros its
  8991. 7:55:19determinant is zero
  8992. 7:55:23so if you got a matrix a that contains
  8993. 7:55:27this different values a11 H1 dot dot dot
  8994. 7:55:31a and uh M1 and then here you got
  8995. 7:55:35suddenly um column that contains all
  8996. 7:55:38zeros and then the rest are nonzero even
  8997. 7:55:41so in that
  8998. 7:55:44case you know that your
  8999. 7:55:47determinant is equal to
  9000. 7:55:50zero so for a specific
  9001. 7:55:54example if you got for instance Matrix 1
  9002. 7:55:592 0 0 0 3 13
  9003. 7:56:04then the determinant of this Matrix is
  9004. 7:56:08equal to
  9005. 7:56:09zero and
  9006. 7:56:12otherwise if you got a matrix B that has
  9007. 7:56:17a column of zeros so column that is
  9008. 7:56:20entirely of
  9009. 7:56:22zeros so let's say here we have 1 one
  9010. 7:56:25one and we have a zero Vector here so we
  9011. 7:56:29got in here 0 0 0 and then 3 4 five then
  9012. 7:56:34given that we have here this zero Vector
  9013. 7:56:38then the determinant of Matrix
  9014. 7:56:43B is equal to zero and this actually
  9015. 7:56:47straightforward to be seen from this
  9016. 7:56:50calculations that we saw because if you
  9017. 7:56:52do the uh if you pick this specific row
  9018. 7:56:56and then you do zero times the ter DET
  9019. 7:56:58minant of the remaining Matrix 0 times
  9020. 7:57:00determinant of the other Matrix and then
  9021. 7:57:03plus so PL and then so minus and then
  9022. 7:57:06plus and then minus 0 * determinant of
  9023. 7:57:09the third
  9024. 7:57:10Matrix it is obvious that 0 * a
  9025. 7:57:13determinant is 0 0 * determinant is z 0
  9026. 7:57:15* determinant is zero which means that
  9027. 7:57:17you got a whole bunch of zeros to be
  9028. 7:57:20added to each other or subtracted from
  9029. 7:57:23each other this means that if you have a
  9030. 7:57:25row or a Col with zeros this already
  9031. 7:57:28gives you an idea that your determinant
  9032. 7:57:30is equal to zero you don't even need to
  9033. 7:57:32do
  9034. 7:57:34calculations so the final property of
  9035. 7:57:38determinants is that if a determinant of
  9036. 7:57:40a product of matrices equals the product
  9037. 7:57:43of their determinants so the
  9038. 7:57:47determinant determinant of a b is equal
  9039. 7:57:51to determinant of a multip by
  9040. 7:57:55determinant of B this is basically what
  9041. 7:57:57this property is
  9042. 7:58:00about so let's quickly go through
  9043. 7:58:02examples to ensure that we are at the
  9044. 7:58:03same page with all these properties and
  9045. 7:58:05we can prove them so let's say we have
  9046. 7:58:09an identity
  9047. 7:58:12Matrix n by n which is we are dealing
  9048. 7:58:15with I in now according to this first
  9049. 7:58:21property when we
  9050. 7:58:24calculate the determinant of this Matrix
  9051. 7:58:27so determinant of i n is equal to
  9052. 7:58:361 Let's actually look at a specific
  9053. 7:58:38example so here we got um identity um
  9054. 7:58:42Matrix in the two dimensional space in
  9055. 7:58:45the
  9056. 7:58:46R2 and we can quickly calculate the
  9057. 7:58:50determinant of this I2 and we can see
  9058. 7:58:54that it is equal to this diagonal
  9059. 7:58:56element so 1 by one - 0 * U it's
  9060. 7:58:59actually something that we did as part
  9061. 7:59:01of my previous examples so this equal to
  9062. 7:59:051 - Z and is equal to 1 one thing that I
  9063. 7:59:10wanted to show you before moving on to
  9064. 7:59:12the next example about the swapping rows
  9065. 7:59:15is that when we are swapping some of the
  9066. 7:59:18rows or some of the comms or two rows or
  9067. 7:59:20two cars of Matrix a we are referring to
  9068. 7:59:23this matrix by this notation so we add
  9069. 7:59:26this nod in here and we say that that
  9070. 7:59:28this is basically the manipulated
  9071. 7:59:31version of Matrix a so if we have for
  9072. 7:59:33instance Matrix a equals u a b
  9073. 7:59:39and and c and those are
  9074. 7:59:43vectors and then we are
  9075. 7:59:46swapping two of The Columns let's say we
  9076. 7:59:50are swapping this two we get B and then
  9077. 7:59:53a and then
  9078. 7:59:55C then this Matrix will are referring as
  9079. 7:59:58a not this is just an a matter of
  9080. 8:00:01notation and we just learned that as
  9081. 8:00:04part of the properties that the
  9082. 8:00:06determinant of this new
  9083. 8:00:10Matrix is equal to minus the determinant
  9084. 8:00:14of
  9085. 8:00:18a so if a matrix a has a row or column
  9086. 8:00:22of zeros then the determinant of it is
  9087. 8:00:24zero so let's actually quickly look at
  9088. 8:00:27this specific example example in here we
  9089. 8:00:29got a which is uh having a column of
  9090. 8:00:32zeros and another column of B and D
  9091. 8:00:35where B and D are real
  9092. 8:00:39numbers so let's prove that this
  9093. 8:00:41determinant is actually equal to zero so
  9094. 8:00:44the determinant of a 2X two Matrix we
  9095. 8:00:46have already seen is equal to the
  9096. 8:00:48diagonal elements so 0 * D minus the of
  9097. 8:00:54diagonal Elements which is 0 * B 0 * B
  9098. 8:01:01and what is number * 0 is equal to 0 0 -
  9099. 8:01:050 * B is also Z it's equal to Z
  9100. 8:01:08therefore the determinant of a is equal
  9101. 8:01:11to
  9102. 8:01:13Z so when it comes to the uh determinant
  9103. 8:01:16of a product of a matrices let's prove
  9104. 8:01:19that the determinant of a * B is equal
  9105. 8:01:22to the determinant of a times the
  9106. 8:01:25determinant of B so therefore the first
  9107. 8:01:28thing we need to do is to calculate this
  9108. 8:01:30a * B let's quickly go ahead and do that
  9109. 8:01:35so let me add here this um blank
  9110. 8:01:42file so a is equal
  9111. 8:01:46to 1 2 3 and 4 B is equal
  9112. 8:01:51to 5
  9113. 8:01:546
  9114. 8:01:5678 and I I want to prove that the
  9115. 8:01:59determinant of a b is equal to
  9116. 8:02:02determinant of a Time determinant of B
  9117. 8:02:07first I will be calculating this and
  9118. 8:02:09then I will be calculating
  9119. 8:02:11this so for the first one what I need to
  9120. 8:02:17do is that first I need to
  9121. 8:02:19calculate d a * B which is equal to 1 2
  9122. 8:02:253 4
  9123. 8:02:28times 5 6 7
  9124. 8:02:328 and then this is equal 2 should be 2
  9125. 8:02:38by two so first I take this 1 * 5 is 5 2
  9126. 8:02:43* 7 is 14 14 + 5 is
  9127. 8:02:4719 then for this one I need to pick this
  9128. 8:02:51row so 3 * 5 is
  9129. 8:02:5415 and then 4 * 7 is 28
  9130. 8:02:59so 15 + 28 is so there we have 33
  9131. 8:03:0543 so I got here
  9132. 8:03:1643 then I'm going on to the next column
  9133. 8:03:19which is in this
  9134. 8:03:23case 1 * 6 is 6 6 + 6 16 is
  9135. 8:03:2922 and now the second column 3 * 6 is
  9136. 8:03:3418 4 * 8 is 32 and this gives me
  9137. 8:03:4550 all right so now I have the a * B
  9138. 8:03:49then as the next step what I need to do
  9139. 8:03:52is to
  9140. 8:03:53calculate the
  9141. 8:03:55determinant of this a * B which is equal
  9142. 8:04:00to the determinant of this Matrix 19 22
  9143. 8:04:054350 that I just
  9144. 8:04:08calculated and what is this amount the
  9145. 8:04:11diagonal elements 19 * 50 - 43 * 22 19 *
  9146. 8:04:1950 is then equal to
  9147. 8:04:2195 and 43 * 22 is 94 6 which means that
  9148. 8:04:29we end up with four this means that the
  9149. 8:04:32determinant of the a * B is equal to 4
  9150. 8:04:36let's quickly check what are the parts
  9151. 8:04:39of the second amount so for that I need
  9152. 8:04:44to calculate determinant of a which is
  9153. 8:04:46equal to 1 * 4 - 2 * 3 1 * 4 is 4 3 * 2
  9154. 8:04:53is 6 so 4 - 6 is = - 2 determinant of B
  9155. 8:05:00is equal
  9156. 8:05:01to 5 * 8 which is equal to 4T and then 7
  9157. 8:05:06* 6 is equal to 42 and this is equal
  9158. 8:05:11to - 2 and determinant of a *
  9159. 8:05:17determinant of B is equal to - 2 * -2
  9160. 8:05:21which is equal to 4 so we can see that
  9161. 8:05:25now we just provve that the determinant
  9162. 8:05:27of a * B is equal to 4 so we have seen
  9163. 8:05:32that determinant of a is equal to 4 and
  9164. 8:05:37we see that that's exactly the same as
  9165. 8:05:40determinant a * determinant of B which
  9166. 8:05:42is equal to 4 so we have just proven
  9167. 8:05:45that the this equation indeed
  9168. 8:05:51holds so the determinants they are not
  9169. 8:05:54just um some calculations or some
  9170. 8:05:58amounts but they are actually uh
  9171. 8:06:00important concept and their
  9172. 8:06:02interpretation um is highly relevant
  9173. 8:06:05from geometric perspective so the
  9174. 8:06:08terminant have a geometric
  9175. 8:06:10interpretation and the for example the
  9176. 8:06:13terent of a 2X two uh Matrix or 3x3
  9177. 8:06:16Matrix they represent the area in case
  9178. 8:06:20of 2x two or the volume in case of 3x3
  9179. 8:06:24Matrix uh of the parallelogram
  9180. 8:06:28that they are
  9181. 8:06:29forming so uh this is often referred as
  9182. 8:06:33a parallel uh piped um I hope I'm
  9183. 8:06:37pronouncing this correctly and it's
  9184. 8:06:39formed by the con vectors of the Matrix
  9185. 8:06:43so if we have for instance this uh
  9186. 8:06:46Matrix a and then we have a b and then C
  9187. 8:06:48and D we have this A and C which is the
  9188. 8:06:52first vector and then B and D which is
  9189. 8:06:54the second vector and the uh the shoe
  9190. 8:06:58vectors they actually form a
  9191. 8:07:01parallelogram um when it comes to the uh
  9192. 8:07:06two dimensional
  9193. 8:07:07space and the area that this uh
  9194. 8:07:11parallelogram um is
  9195. 8:07:13forming that is equal to the determinant
  9196. 8:07:17of this
  9197. 8:07:18Matrix so the determinant ofer this
  9198. 8:07:21scalar value that summarizes this linear
  9199. 8:07:25transformation that we describe by this
  9200. 8:07:28Matrix because we saw that we had this a
  9201. 8:07:31x is equal to
  9202. 8:07:32B linear system that we were describing
  9203. 8:07:35using this coefficient Matrix and this
  9204. 8:07:37was our unknowns this was our variable
  9205. 8:07:42and then this B was the um amount that
  9206. 8:07:46we were uh putting this as equal to if B
  9207. 8:07:48was equal to zero then we were solving
  9208. 8:07:50the homogeneous system otherwise we had
  9209. 8:07:52this non-homogeneous system and in the
  9210. 8:07:54geometric terms the determinant of this
  9211. 8:07:57Matrix
  9212. 8:07:57a so the determinant of a um in case of
  9213. 8:08:022x two space so in
  9214. 8:08:06R2 um when we got two vectors
  9215. 8:08:09basically in our Matrix a this is equal
  9216. 8:08:13to the area that is spent by these
  9217. 8:08:16vectors in the two dimensional space in
  9218. 8:08:18a bit I will also show you specific
  9219. 8:08:20example such that um we will be on the
  9220. 8:08:23same page when it comes to this concept
  9221. 8:08:25of parallelogram the deter determinant
  9222. 8:08:28and those vectors that form the column
  9223. 8:08:31um uh space of the uh Matrix a uh when
  9224. 8:08:36it comes to the three dimensional space
  9225. 8:08:37when we have R3 so we got 3x3 Matrix of
  9226. 8:08:43a then the determinant of this Matrix a
  9227. 8:08:48is the volume that is um formed by these
  9228. 8:08:52uh threedimensional vectors because
  9229. 8:08:55unlike the 2D
  9230. 8:09:00in R3 we got the three vectors that form
  9231. 8:09:03the a let's say this one this one and
  9232. 8:09:07then this one and then here we can
  9233. 8:09:09create this
  9234. 8:09:11area covered by this Tre vectors and the
  9235. 8:09:14area that is formed by the tree vectors
  9236. 8:09:17from a it is equal to the determinant of
  9237. 8:09:21that Matrix a so in terms of the 3D it's
  9238. 8:09:25bit harder to uh visualize it but in uh
  9239. 8:09:29case of the two-dimensional space I
  9240. 8:09:31think this will help uh to improve our
  9241. 8:09:34understanding of the determinants and
  9242. 8:09:35make this interpretation uh from
  9243. 8:09:38geometry uh from geometrical perspective
  9244. 8:09:41so given the two vectors A and B in the
  9245. 8:09:44two dimensional space the determinant of
  9246. 8:09:46this Matrix uh is then equal to the um
  9247. 8:09:50diagonal elements we already know minus
  9248. 8:09:53the of diagonal elements right so we are
  9249. 8:09:56also saying
  9250. 8:09:59we have seen this notation already very
  9251. 8:10:01often you will see this volume this is
  9252. 8:10:04the absolute we already know this from
  9253. 8:10:06high school this is the absolute volume
  9254. 8:10:09because the determinant can also be a
  9255. 8:10:11negative number we have seen minus 20 or
  9256. 8:10:13minus 2 and we know that the area cannot
  9257. 8:10:17be a negative number therefore we are
  9258. 8:10:19adding this absolute term here so
  9259. 8:10:24knowing for example that we have this m
  9260. 8:10:27matx a which consists of the elements 3
  9261. 8:10:312 and then 1 14 we know that the
  9262. 8:10:34determinant of this a is equal to 3 * 4
  9263. 8:10:4012 - 1 * 2 it is 10 and the absolute
  9264. 8:10:44value of it so absolute value of 10 is
  9265. 8:10:47equal to 10 given that is positive and
  9266. 8:10:49this is exactly what we have here and
  9267. 8:10:52this is referred as the area of the
  9268. 8:10:56parallelogram that the two vectors are
  9269. 8:10:58forming and how does that look like in
  9270. 8:11:02uh the uh coordinate space so this is
  9271. 8:11:04the parallelogram that we were referring
  9272. 8:11:07by and
  9273. 8:11:09this area that is formed by this
  9274. 8:11:13parallelogram is equal to the
  9275. 8:11:16determinant of the
  9276. 8:11:19a The Matrix
  9277. 8:11:25a so so one thing that we need to keep
  9278. 8:11:28in mind is the definition of
  9279. 8:11:30parallelogram which means that those two
  9280. 8:11:31are parallel and they are the same so
  9281. 8:11:34this and this lines those two are the
  9282. 8:11:37same and then of course the same holes
  9283. 8:11:39for those two they are parallel and they
  9284. 8:11:41have the same um length therefore this
  9285. 8:11:46figure in here this is what we are
  9286. 8:11:49referring as
  9287. 8:11:51parallelogram and those two
  9288. 8:11:54vectors that we can see in here
  9289. 8:11:58this one and this one they form this
  9290. 8:12:01parallelogram and they are the two
  9291. 8:12:04vectors that are part of the Matrix
  9292. 8:12:08a hence if we got two vectors that the
  9293. 8:12:12uh that come from The Matrix a so Matrix
  9294. 8:12:15a and we got here this two vectors in a
  9295. 8:12:192X
  9296. 8:12:21two Matrix then the determinant of this
  9297. 8:12:26Matrix is then describing the area that
  9298. 8:12:30these
  9299. 8:12:30two vectors are using or are spanning
  9300. 8:12:35when creating this
  9301. 8:12:39parallelogram so the determinants they
  9302. 8:12:41play an important Ro in understanding
  9303. 8:12:44the geometric properties of the spaces
  9304. 8:12:47that uh spent uh by these vectors they
  9305. 8:12:51provide valuable insights when it comes
  9306. 8:12:53to the scaling effect effect of linear
  9307. 8:12:55transformation the or orientation and
  9308. 8:12:58the um the locations of them in the
  9309. 8:13:02cordan system as well as the Practical
  9310. 8:13:04applications in calculating areas in
  9311. 8:13:06calculating volumes welcome to another
  9312. 8:13:09unit in our fundamentals to linear
  9313. 8:13:11algebra course where we are going to
  9314. 8:13:13talk about Advanced linear algebra
  9315. 8:13:15Concepts so uh in the first module we
  9316. 8:13:18are going to talk about Vector spaces
  9317. 8:13:20and the projections we are going to
  9318. 8:13:23define the bases in a couple of examples
  9319. 8:13:26of them we have already touched upon
  9320. 8:13:28this concept briefly when we are
  9321. 8:13:30calculating the basis of a no space and
  9322. 8:13:33the basis of a comp space we are going
  9323. 8:13:35to do a similar example in this case and
  9324. 8:13:38then we are going to uh look into this
  9325. 8:13:40concept of the uh standard bases for uh
  9326. 8:13:44different spaces including the R2 we're
  9327. 8:13:47going to introduce the concept of
  9328. 8:13:49projections what is the definition of
  9329. 8:13:51projections what is a Formula how we can
  9330. 8:13:54calculate it we are going to look into
  9331. 8:13:55detailed examples of that
  9332. 8:13:58then we are going to talk about the
  9333. 8:13:59concept of uton normal basis in this
  9334. 8:14:01module we are going to introduce this
  9335. 8:14:03concept and we are going to understand
  9336. 8:14:04the orog gonality normalization we are
  9337. 8:14:07going to then discuss a very important
  9338. 8:14:10topic in linear algebra which is a
  9339. 8:14:12gramme process we're going to Define it
  9340. 8:14:15we are going to see the overview the
  9341. 8:14:17step-by-step process of applying grme uh
  9342. 8:14:21algorithm then we are going to see an
  9343. 8:14:23example of it and the calculations step
  9344. 8:14:26by step
  9345. 8:14:27and then we are going to talk about
  9346. 8:14:29applications of auton normal bases the
  9347. 8:14:32application of gram Smiths process and
  9348. 8:14:34the importance of this auton normal
  9349. 8:14:37basis this is the module one of this
  9350. 8:14:41part so let's first Define the basis a
  9351. 8:14:45basis of a vector space is a set of of
  9352. 8:14:48linearly independent vectors that spend
  9353. 8:14:50the entire Vector space every Vector in
  9354. 8:14:54the space can be expressed as a unique
  9355. 8:14:56linear combination of the basis
  9356. 8:15:00vectors so there are a couple of parts
  9357. 8:15:02in this definition they are really
  9358. 8:15:05important and first thing that we need
  9359. 8:15:08to uh mention here is this Vector space
  9360. 8:15:13that says it is a set of linearly
  9361. 8:15:16independent vectors that spend the
  9362. 8:15:18entire Vector space this is very
  9363. 8:15:20important because um here we are with
  9364. 8:15:25the basis is simply this Vector space
  9365. 8:15:30that is a set of linearly independent
  9366. 8:15:33vectors which means that one of these
  9367. 8:15:36vectors cannot be Rewritten as a linear
  9368. 8:15:39combination of the other one so we have
  9369. 8:15:42a linearly independent vectors and they
  9370. 8:15:45span the entire Vector
  9371. 8:15:48space so for instance if we are in
  9372. 8:15:52R2 then the basis of a vector space is
  9373. 8:15:56then a set of linearly independent
  9374. 8:15:58vectors that span this entire
  9375. 8:16:01R2 so we do we then need to
  9376. 8:16:05have for vectors forming a basis so
  9377. 8:16:09let's say we have a basis of vector
  9378. 8:16:15space for us to say that this is the
  9379. 8:16:17basis of this Vector space let's say in
  9380. 8:16:22R2 we need to First
  9381. 8:16:25say we need to First prove that these
  9382. 8:16:30vectors this
  9383. 8:16:34vectors are linearly
  9384. 8:16:39independent and
  9385. 8:16:42two they
  9386. 8:16:45span the entire R2 which means that span
  9387. 8:16:49of this
  9388. 8:16:51vectors is equal to
  9389. 8:16:54R2 we can actually be even more spefic
  9390. 8:16:59specific in a
  9391. 8:17:01example of let's say having a vectors A
  9392. 8:17:06and
  9393. 8:17:07B we can say that this set that we have
  9394. 8:17:11here consisting of vectors A and B in
  9395. 8:17:17R2 form the
  9396. 8:17:20bases of a vector space
  9397. 8:17:28if the first criteria
  9398. 8:17:33is that
  9399. 8:17:35a and b are
  9400. 8:17:41linearly
  9401. 8:17:44independent and the second criteria is
  9402. 8:17:48that those two vectors together they
  9403. 8:17:52spend the entire Vector space of R2
  9404. 8:17:56which means that
  9405. 8:18:00span of a and b Vector space is equal to
  9406. 8:18:07R2 on more specific
  9407. 8:18:11example and then the second part of this
  9408. 8:18:13definition says that every Vector in the
  9409. 8:18:18space can be expressed as a unique
  9410. 8:18:20linear combination of the basis factors
  9411. 8:18:23which means in our specific example when
  9412. 8:18:26we had this A and B forming the bases of
  9413. 8:18:28a vector space this means that if we
  9414. 8:18:31prove that this is indeed the
  9415. 8:18:34basis of this Vector
  9416. 8:18:40space then any
  9417. 8:18:42combination every
  9418. 8:18:45Vector let's say a vector
  9419. 8:18:49C that consists of this C1 and C2
  9420. 8:18:55elements that this Vector this random
  9421. 8:18:58Vector from
  9422. 8:19:01R2
  9423. 8:19:03C can be represented as a linear
  9424. 8:19:07combination of these vectors A and B so
  9425. 8:19:12let's say we have a coefficient
  9426. 8:19:15K1 * a plus K2
  9427. 8:19:20*
  9428. 8:19:22B then here we are representing this
  9429. 8:19:26random Vector c as a linear combination
  9430. 8:19:30of these vectors A and B which form the
  9431. 8:19:33bases of a vector space of this Vector
  9432. 8:19:38space so we have previously spoken about
  9433. 8:19:41the no space and Comm space so let's now
  9434. 8:19:46go ahead and do one more example when we
  9435. 8:19:49are calculating the new space and the
  9436. 8:19:51Comm space and then we are again
  9437. 8:19:54calculating this concept of basis of
  9438. 8:19:56Vector space and a b basis of the com
  9439. 8:19:59space and then we will be uh finding the
  9440. 8:20:02basis of a vector space uh with um R2
  9441. 8:20:06example so given that we have already
  9442. 8:20:10looked into this concept the basis of
  9443. 8:20:12Comm space and based of no space I will
  9444. 8:20:14try to uh go through this example bit
  9445. 8:20:16more quickly to save time on more
  9446. 8:20:18complex
  9447. 8:20:22Concepts so let's say we have an example
  9448. 8:20:26Le of a matrix and that Matrix is a is
  9449. 8:20:31equal to 1 2
  9450. 8:20:3536 this is our 2x two Matrix
  9451. 8:20:39a and the first thing that I want to do
  9452. 8:20:43is to understand look into my Matrix and
  9453. 8:20:46understand whether I'm dealing with
  9454. 8:20:48unique vectors or not and by unique I
  9455. 8:20:51mean whether I'm dealing with two
  9456. 8:20:53vectors that are linearly dependent or
  9457. 8:20:55linearly independent this kind of
  9458. 8:20:58inspection always helps us to save time
  9459. 8:21:01when we are doing our calculation for
  9460. 8:21:03the no space and for the Comm space and
  9461. 8:21:05for the basis of no space and base of
  9462. 8:21:07Comm space now here we can see that this
  9463. 8:21:10is our A1 the first Vector the first com
  9464. 8:21:14Vector forming the Matrix a and this
  9465. 8:21:18Vector is the
  9466. 8:21:20A2 another thing that uh we can notice
  9467. 8:21:23here is that we can easily take the
  9468. 8:21:27First Column A1 multiply it by two and
  9469. 8:21:31get the A2 because 1 * 2 is 2 3 * 2 is 6
  9470. 8:21:37that is that 2
  9471. 8:21:42*
  9472. 8:21:44A1 is equal to
  9473. 8:21:50A2 which means that we can say that A1
  9474. 8:21:57and
  9475. 8:21:57H2
  9476. 8:21:59are
  9477. 8:22:02linearly
  9478. 8:22:06dependent okay so seeing this and
  9479. 8:22:09knowing this this can help us to quickly
  9480. 8:22:11go through our calculations of the bases
  9481. 8:22:14of the co space and the bases of a no
  9482. 8:22:16space so let's go ahead and first
  9483. 8:22:19calculate what is the
  9484. 8:22:22basis of no space
  9485. 8:22:28of
  9486. 8:22:30a so we have already learned that the um
  9487. 8:22:34basis of a no space can be calculated
  9488. 8:22:38when looking into the first no space so
  9489. 8:22:41we C we need to calculate the no space
  9490. 8:22:44and then we need to calculate the basis
  9491. 8:22:46of that no
  9492. 8:22:47space
  9493. 8:22:49so this means that we need to get the
  9494. 8:22:53na and we have learned that in order to
  9495. 8:22:56get
  9496. 8:22:58DNA we for that need to solve the a x is
  9497. 8:23:02equal to zero
  9498. 8:23:04problem and this
  9499. 8:23:10x will give
  9500. 8:23:13us the no space of a we have also
  9501. 8:23:17learned that the no space of a is equal
  9502. 8:23:20to the no space of r r EF of a which
  9503. 8:23:25means that using gausian reduction or
  9504. 8:23:28gausian elimination we can quickly find
  9505. 8:23:31the solution to this problem of a x is
  9506. 8:23:35equal to Z and find this x this is
  9507. 8:23:39simply solving a similar problem only in
  9508. 8:23:41this case the B so this is equal to zero
  9509. 8:23:46because we are dealing with the
  9510. 8:23:49homogeneous
  9511. 8:23:53case I want do the calculation for this
  9512. 8:23:56we have done a ton of examples when we
  9513. 8:23:58were doing this step by-step calculation
  9514. 8:24:01getting the uh argumented Matrix of a
  9515. 8:24:04and then uh doing all these different
  9516. 8:24:06draw operations normalizations and then
  9517. 8:24:09eliminations in order to uh get this uh
  9518. 8:24:13complex Matrix a to the point of uh
  9519. 8:24:16basic representation from which either
  9520. 8:24:18we can visibly see the solution to the
  9521. 8:24:21problem or we can at least simplify it
  9522. 8:24:23and describe it as a linear combination
  9523. 8:24:25of vectors
  9524. 8:24:27in this case if you go ahead and solve
  9525. 8:24:29this problem you will find that the
  9526. 8:24:33x that
  9527. 8:24:35solves the a x is equal to Z
  9528. 8:24:39problem is unique and this x is equal to
  9529. 8:24:44minus
  9530. 8:24:460.894 as the first element and then
  9531. 8:24:500.447 as a second element this can be a
  9532. 8:24:53good practice also to refresh um the
  9533. 8:24:55memory when it comes to the gaion
  9534. 8:24:57elimination and reduction the example
  9535. 8:24:59itself is quite simple the a is just a
  9536. 8:25:022x2 matrix um and um by performing
  9537. 8:25:06couple of operations uh in terms of
  9538. 8:25:08normalization and elimination you can
  9539. 8:25:10find this
  9540. 8:25:12X for your a is equal to
  9541. 8:25:18zero given that now we know what is the
  9542. 8:25:22solution to a is equal to Z problem now
  9543. 8:25:25we know what no space is because in this
  9544. 8:25:28case
  9545. 8:25:29the all this help us to understand that
  9546. 8:25:34the no space of a is then equal to the
  9547. 8:25:38set the vector set where as part of this
  9548. 8:25:42we got just single column which is -
  9549. 8:25:470.894 and
  9550. 8:25:510.447 this is the no space
  9551. 8:25:56this is the first part I will say it
  9552. 8:26:011.1 and then 1.2 will
  9553. 8:26:06be to get the
  9554. 8:26:11basis
  9555. 8:26:13basis of this
  9556. 8:26:16Na and we have just seen what is the
  9557. 8:26:19definition of the bases so the basis of
  9558. 8:26:22vector space is a set of linearly
  9559. 8:26:24independent vectors that spend the
  9560. 8:26:25entire Vector
  9561. 8:26:29space therefore given that we got just
  9562. 8:26:32this single Vector as a solution to our
  9563. 8:26:36problem we can see then very quickly
  9564. 8:26:40that the new space of a is based on this
  9565. 8:26:43and then the basis of the no space is
  9566. 8:26:46simply this entire
  9567. 8:26:48set so knowing what the solution is to
  9568. 8:26:51our homogeneous problem a is equal to
  9569. 8:26:55zero so let me also write down in here
  9570. 8:26:58then we know that the no space the N A
  9571. 8:27:03is then equal
  9572. 8:27:072D
  9573. 8:27:09Vector minus
  9574. 8:27:120.894 and
  9575. 8:27:140.447 this is my Vector X that solve
  9576. 8:27:16this ax isal to zero
  9577. 8:27:20problem and this is simply the no space
  9578. 8:27:23of a and given that we
  9579. 8:27:27have calculated and we have got this
  9580. 8:27:30unique solution to our problem we can
  9581. 8:27:34say that any Vector in R2 can be
  9582. 8:27:37represented as a linear combination of
  9583. 8:27:40this
  9584. 8:27:42Vector so
  9585. 8:27:451.2 any
  9586. 8:27:49Vector in
  9587. 8:27:51R2 can be represented
  9588. 8:27:58as linear
  9589. 8:28:00combination
  9590. 8:28:07combination
  9591. 8:28:09of this
  9592. 8:28:13Vector
  9593. 8:28:20X therefore we are saying that the
  9594. 8:28:24bases of of no
  9595. 8:28:29space of
  9596. 8:28:33a is this entire set consisting of the
  9597. 8:28:37single
  9598. 8:28:45Vector so this is about the basis of a
  9599. 8:28:49no space
  9600. 8:28:56let's Now quickly look into the concept
  9601. 8:28:58of the basis of a calm
  9602. 8:29:01space so the first thing we need to then
  9603. 8:29:04uh get is the column
  9604. 8:29:07space
  9605. 8:29:09so to get the
  9606. 8:29:13basis of Comm
  9607. 8:29:19space we need to get the ca first which
  9608. 8:29:22is the Comm space of a and what is the
  9609. 8:29:25Comm c space of a the Comm space of a is
  9610. 8:29:29the uh setle and the space of the
  9611. 8:29:32vectors that we can see in
  9612. 8:29:35here in this A1 and A2 is it's quite
  9613. 8:29:40straightforward so this two vectors they
  9614. 8:29:43form the Comm space of this Matrix
  9615. 8:29:47a so then the ca is
  9616. 8:29:52simply the set of one three
  9617. 8:29:56and then two six vectors this is
  9618. 8:30:00A1 this is
  9619. 8:30:03A2 now we have just seen in the
  9620. 8:30:06beginning before even starting our
  9621. 8:30:08calculations that A1 and A2 are linearly
  9622. 8:30:11dependent because A2 can be right
  9623. 8:30:14written as 2 * A1 so one of these
  9624. 8:30:17vectors can be written as a linear
  9625. 8:30:19combination of the other one this means
  9626. 8:30:21that we got just a single linearly
  9627. 8:30:24independent vectors and why is this
  9628. 8:30:26important because we have seen in the
  9629. 8:30:29definition of the basis that for us to
  9630. 8:30:32have a basis we need to have a linearly
  9631. 8:30:36independent vectors so the basis of
  9632. 8:30:40vector space in this case the Comm space
  9633. 8:30:42is a set of linearly independent vectors
  9634. 8:30:44that need to spend the entire Vector
  9635. 8:30:46space in this case
  9636. 8:30:49R2 so
  9637. 8:30:51therefore we need to look into the ca
  9638. 8:30:54that we got in here and select one of
  9639. 8:30:58these two
  9640. 8:31:00vectors that can be considered as
  9641. 8:31:02linearly independent let's say we pick
  9642. 8:31:05one
  9643. 8:31:07three now we know that we can then write
  9644. 8:31:12any Vector in R2 as a linear combination
  9645. 8:31:16of this Vector 1 3 so we can scale this
  9646. 8:31:20Vector one Tre and get a new Vector in
  9647. 8:31:24R2 therefore or we are saying that the
  9648. 8:31:28basis of Comm space
  9649. 8:31:31basis of Comm
  9650. 8:31:35space
  9651. 8:31:37space of a is then the set of one
  9652. 8:31:44Tre because one Tre so
  9653. 8:31:48A1 is then
  9654. 8:31:50linearly
  9655. 8:31:52independent and the span of
  9656. 8:31:56A1 is
  9657. 8:31:59R2 now when it comes to the uh basis of
  9658. 8:32:03the entire R2 one thing that we can
  9659. 8:32:06notice is that
  9660. 8:32:08this A1 so one
  9661. 8:32:12three it's not forming it's not spanning
  9662. 8:32:14the entire
  9663. 8:32:15R2 because because we cannot uh write
  9664. 8:32:20any random Vector in r two as a linear
  9665. 8:32:23combination of this two therefore we are
  9666. 8:32:25saying that this is the basis of Comm
  9667. 8:32:27space but we are not saying that this is
  9668. 8:32:29the basis of R2 and the final element in
  9669. 8:32:32this definition that I want you to uh
  9670. 8:32:34focus on is that every Vector in the
  9671. 8:32:37space can be expressed as a unique
  9672. 8:32:38linear combination of the basis
  9673. 8:32:41vectors so in here we have looked into
  9674. 8:32:45this idea of bases of a new space and
  9675. 8:32:47the base of Comm space and we saw that
  9676. 8:32:51we are talking about specifically the
  9677. 8:32:53new space and comp space but when it
  9678. 8:32:55comes to the entire space for instance
  9679. 8:32:58the basis for R2 then the basis of Comm
  9680. 8:33:04space for instance is no longer um
  9681. 8:33:07helping us because the basis of Comm
  9682. 8:33:10space it consists of this Vector one
  9683. 8:33:12tree and this one tree alone is not
  9684. 8:33:15satisfying the second criteria that says
  9685. 8:33:18that this Vector needs to spend the
  9686. 8:33:20entire Vector space because this one Tre
  9687. 8:33:25vector it's a single vector and this
  9688. 8:33:29Vector it is not forming the entire R2
  9689. 8:33:34it's not um the basis for R2 it's not
  9690. 8:33:38spinning the entire uh R2 so
  9691. 8:33:43given that the one tree is not
  9692. 8:33:50spinning the entire
  9693. 8:33:54R2 because of that we know that the one
  9694. 8:34:00tree is not the set of one Tre is not
  9695. 8:34:05the
  9696. 8:34:08basis of
  9697. 8:34:10R2 so this distinguishing of the basis
  9698. 8:34:15of R2 basis of Comm space basis of no
  9699. 8:34:18space is really important because basis
  9700. 8:34:21for R2 it means that we need to find set
  9701. 8:34:24of linearly independent vectors that
  9702. 8:34:27they together form the entire R2 they
  9703. 8:34:30span the R2 which means any random
  9704. 8:34:33Vector that we can see in R2 we can
  9705. 8:34:35represent as a linear combination of the
  9706. 8:34:38vectors in this space so in here let me
  9707. 8:34:43also prove that this one tree alone is
  9708. 8:34:46actually not forming the R2 it's not
  9709. 8:34:49spinning the R2 which then uh concludes
  9710. 8:34:52that they are not the it is not the
  9711. 8:34:54basis of R2 CU and after this I will
  9712. 8:34:58then provide you an example where we
  9713. 8:35:01have a set of vectors that span R2 and
  9714. 8:35:05are linearly independent which means
  9715. 8:35:06that they are the bases of the entire R2
  9716. 8:35:10so first I want to show you why this
  9717. 8:35:12single Vector one Tre is not the basis
  9718. 8:35:17of
  9719. 8:35:18R2 so being the base of R2 we have the
  9720. 8:35:22criteria that the vectors need to be
  9721. 8:35:25linearly
  9722. 8:35:31dependent so let me actually clear up
  9723. 8:35:34some space
  9724. 8:35:38here so I want to see and find the basis
  9725. 8:35:41of
  9726. 8:35:45R2 first I want to
  9727. 8:35:47prove that this
  9728. 8:35:50set which is the base of Comm
  9729. 8:35:54space I want to
  9730. 8:35:56prove that this is not the
  9731. 8:36:01basis of
  9732. 8:36:04R2 then I will also as part of the
  9733. 8:36:08second part of this proof look in look
  9734. 8:36:10into the case when we do have vectors
  9735. 8:36:13and the set of vectors it forms the base
  9736. 8:36:16of
  9737. 8:36:17R2 so the first thing the first criteria
  9738. 8:36:21of the basis of R2
  9739. 8:36:23says that quote 1.1 the first criteria
  9740. 8:36:28says that this Vector in this Vector
  9741. 8:36:31space it need to be they need to be
  9742. 8:36:34linearly independent well that criteria
  9743. 8:36:37is valid given that one3 is
  9744. 8:36:43linearly
  9745. 8:36:47independent this means that criteria one
  9746. 8:36:50is satisfied
  9747. 8:36:59so whenever you got just one vector this
  9748. 8:37:01criteria is automatically
  9749. 8:37:03satisfied so then you have the
  9750. 8:37:061.2 which says that we need to have this
  9751. 8:37:10spin of these vectors equal to
  9752. 8:37:14R2
  9753. 8:37:15so is the
  9754. 8:37:17span of
  9755. 8:37:21one3 the R2
  9756. 8:37:29well no and how we can prove that
  9757. 8:37:32because the idea is that any Vector
  9758. 8:37:35including an example where I have for
  9759. 8:37:38instance uh let's say four and five this
  9760. 8:37:42Vector that I need to be able to find a
  9761. 8:37:47scalar that will help me to create a
  9762. 8:37:50linear combination let's say
  9763. 8:37:53C linear combination using this Vector
  9764. 8:37:5713 which will then set this amount this
  9765. 8:38:01to be equal to this which means that I
  9766. 8:38:03need to be able to write my random
  9767. 8:38:07Vector 45 as a linear combination of
  9768. 8:38:09this Vector that forms my uh Vector
  9769. 8:38:14space so let's see whether that is even
  9770. 8:38:17possible well here I got four and
  9771. 8:38:21five if I do this multiplication in the
  9772. 8:38:24right hand side I
  9773. 8:38:26get C and here I got 3
  9774. 8:38:31C because C * 1 is C and 3 * C is
  9775. 8:38:37C and this means that I have an
  9776. 8:38:41equation 4 is equal
  9777. 8:38:44to
  9778. 8:38:46C and 5 is equal
  9779. 8:38:51to 3 * C
  9780. 8:38:57from this I get that the C is equal to 4
  9781. 8:39:01and C is equal to 5 / to
  9782. 8:39:053 but that is impossible because 4 is
  9783. 8:39:09not equal to 5 / to 3 which means that
  9784. 8:39:12I'm proving in here and I got to prove
  9785. 8:39:15that the uh any random chosen Vector 45
  9786. 8:39:20cannot be written as a linear
  9787. 8:39:23combination of this Vector that 4 forms
  9788. 8:39:25this uh space
  9789. 8:39:28therefore as
  9790. 8:39:32random
  9791. 8:39:35Vector from
  9792. 8:39:39R2
  9793. 8:39:41can't be
  9794. 8:39:45written as
  9795. 8:39:48linear
  9796. 8:39:50combination
  9797. 8:39:52of one three
  9798. 8:40:02criteria two is not
  9799. 8:40:11satisfied because for that we had to say
  9800. 8:40:15that this pen of One Tree is equal to R2
  9801. 8:40:19which we saw that it's not the case
  9802. 8:40:21because then we would have been able to
  9803. 8:40:22represent this four five as a linear
  9804. 8:40:24combination of the one Tre Vector okay
  9805. 8:40:27so now we have proven that the one Tre
  9806. 8:40:30is not forming the bases of R2 let's now
  9807. 8:40:33look into what then does form the basis
  9808. 8:40:36of R2 an example of
  9809. 8:40:38it so we are familiar with the unit
  9810. 8:40:42vectors E1 and E2 into
  9811. 8:40:46R2 which form the identity Matrix
  9812. 8:40:51I and this is 1 0 and this is 0 1
  9813. 8:40:55also 1 0 0 1 in the form of a
  9814. 8:41:04matrix so in this example we have a set
  9815. 8:41:10consisting of E1 and
  9816. 8:41:14E2 where this is this E1 this is the
  9817. 8:41:20E2 and the set corresponding to this
  9818. 8:41:23Vector space is then
  9819. 8:41:261 Z and then
  9820. 8:41:3001 and now I will be proving that this
  9821. 8:41:34space this Vector space does
  9822. 8:41:38indeed equal to the bases of
  9823. 8:41:42R2 so this
  9824. 8:41:45is the
  9825. 8:41:47basis of
  9826. 8:41:50R2 so the first
  9827. 8:41:52criteria of the bases is that these two
  9828. 8:41:56vectors should be linearly
  9829. 8:42:00independent now we can quickly uh
  9830. 8:42:02remember from our previous theory that
  9831. 8:42:06the two unit vectors one z01 are
  9832. 8:42:12actually linearly independent that's
  9833. 8:42:13something that we have proven and you
  9834. 8:42:15can easily see it also from here there
  9835. 8:42:18is no way that you can find um scalar
  9836. 8:42:21C that you can multiply this Vector we
  9837. 8:42:25and get a vector 0 one because for that
  9838. 8:42:29for this one to become a zero you need
  9839. 8:42:31to multiply this with zero but then 0 *
  9840. 8:42:340 is not equal to 1 which means that
  9841. 8:42:37there is no way that you can find a
  9842. 8:42:39scaler C to multiply this E1 to get the
  9843. 8:42:44E2 so let me write this down
  9844. 8:42:55E1 and E2 are
  9845. 8:43:00linearly
  9846. 8:43:06independent
  9847. 8:43:09because
  9848. 8:43:11there is
  9849. 8:43:14no scaler
  9850. 8:43:17C which is a real
  9851. 8:43:20number such that
  9852. 8:43:25such
  9853. 8:43:26that c
  9854. 8:43:29*
  9855. 8:43:31E1 is equal to
  9856. 8:43:34Ich
  9857. 8:43:35so this
  9858. 8:43:40means you
  9859. 8:43:43can't
  9860. 8:43:46write hu as linear
  9861. 8:43:51combination of A1
  9862. 8:43:57or vice
  9863. 8:44:01versa this means that E1 and E2 are
  9864. 8:44:06linearly
  9865. 8:44:08independent and this
  9866. 8:44:11satisfies our first
  9867. 8:44:13criteria so
  9868. 8:44:15criteria one is satisfied
  9869. 8:44:27what we have also learned is that any
  9870. 8:44:30Vector in R2 can be actually written as
  9871. 8:44:33a linear combination of a unit vectors
  9872. 8:44:37that form that um
  9873. 8:44:39R2 in this case 1 0 and
  9874. 8:44:4201 so let's assume that this random
  9875. 8:44:47Vector is C1 C2 so this is C vector
  9876. 8:44:55and what we want to prove is that we can
  9877. 8:44:58always write this C in terms of linear
  9878. 8:45:00combination of these two vectors and how
  9879. 8:45:03can we do that
  9880. 8:45:06well let's say here we got a
  9881. 8:45:13K1 K1 which is a real
  9882. 8:45:17number and we multiply this by one
  9883. 8:45:21Z and then we add
  9884. 8:45:29K2
  9885. 8:45:31K2 and then here
  9886. 8:45:3401 so this is our E1 this is our E2 can
  9887. 8:45:38we do this well what is this this is
  9888. 8:45:41equal to K1 0
  9889. 8:45:48plus 0
  9890. 8:45:53K2 and and what does this give
  9891. 8:45:57us
  9892. 8:45:59well this means this
  9893. 8:46:03amount let me write it
  9894. 8:46:06over K1 * 1 which is the E1 plus K2 * 01
  9895. 8:46:14which are which is our second Vector E2
  9896. 8:46:17this is equal to K1
  9897. 8:46:200+ 0 K2 and this is equal to K1
  9898. 8:46:27K2 so I got on one hand this Vector C1
  9899. 8:46:34C2 which I want to write as a linear
  9900. 8:46:39combination of K1 E1 plus K2
  9901. 8:46:46E2 if I take
  9902. 8:46:50D
  9903. 8:46:51K1 equal to C K1 and
  9904. 8:46:57K2 K2 equal
  9905. 8:47:03to
  9906. 8:47:05C2 well then in that case I can prove so
  9907. 8:47:10this is basically equal to C1 and C2
  9908. 8:47:14which means if I take this K1 and K2
  9909. 8:47:16equal to C1 and C2 respectively and
  9910. 8:47:19those numbers are given then I can
  9911. 8:47:22represent this vector
  9912. 8:47:26c as a linear
  9913. 8:47:29combination of
  9914. 8:47:30E1 and
  9915. 8:47:33E2 which is what I had to prove in order
  9916. 8:47:36to say that
  9917. 8:47:39the
  9918. 8:47:41Spen
  9919. 8:47:44of one Z which is the
  9920. 8:47:47E1 and 01 which is
  9921. 8:47:51E2 is equal to R2
  9922. 8:47:55because any random Vector that will be
  9923. 8:47:58provided to me with an element C1 and C2
  9924. 8:48:01and those are just real numbers can be
  9925. 8:48:03written as a linear combination of these
  9926. 8:48:06two vectors this means that the spend of
  9927. 8:48:09these two vectors is equal to
  9928. 8:48:11R2 and this is basically the second
  9929. 8:48:15criteria so
  9930. 8:48:18criteria
  9931. 8:48:20to
  9932. 8:48:21satisfied and if the criteria one and
  9933. 8:48:24criteria 2 are both satisfied it means
  9934. 8:48:29that this Vector
  9935. 8:48:33space of 1 Z and
  9936. 8:48:3901 this is the
  9937. 8:48:42basis of the entire
  9938. 8:48:45R2 so let's now talk about the concept
  9939. 8:48:48of projections by definition a
  9940. 8:48:51projection of a vector a onto another
  9941. 8:48:53Vector B is the orthogonal projection of
  9942. 8:48:57a along B it's denoted by approach and
  9943. 8:49:01then B underneath here we see the index
  9944. 8:49:03and then a so projection of a onto B so
  9945. 8:49:07here is the A and here is the B and
  9946. 8:49:10represents the component of a in the
  9947. 8:49:12direction of
  9948. 8:49:14B so component of a in the direction of
  9949. 8:49:21B all right so in order to properly
  9950. 8:49:24understand this concept the intuition of
  9951. 8:49:26it let's actually make use of the R2
  9952. 8:49:30space so let's first start by picturing
  9953. 8:49:34in our flat world the R2 coordinate so
  9954. 8:49:37the Cartesian coordinate system so let's
  9955. 8:49:40say here we got our y AIS here we got
  9956. 8:49:44our
  9957. 8:49:45x-axis so this is the X this is the
  9958. 8:49:49Y and uh here we of course we need to
  9959. 8:49:54keep in mind this is just an example
  9960. 8:49:56when it comes to projections we can
  9961. 8:49:58always go beyond R2 but for keep it
  9962. 8:50:00simple and truly understand this
  9963. 8:50:02Concepts and this intuition behind the
  9964. 8:50:05projection I want to simplify this and
  9965. 8:50:07do the example in
  9966. 8:50:09R2 so here uh imagine that we got this
  9967. 8:50:15line
  9968. 8:50:17and this is
  9969. 8:50:20our a line that goes through the
  9970. 8:50:23center that let's call this
  9971. 8:50:29line
  9972. 8:50:31B so B is
  9973. 8:50:35line in
  9974. 8:50:37R2 let's say this is that
  9975. 8:50:43line and now that imagine that we have
  9976. 8:50:47this
  9977. 8:50:48Vector which is part of this
  9978. 8:50:52line let's say this is this line
  9979. 8:50:58and this line is the representing by uh
  9980. 8:51:02on this line we got this Vector B and
  9981. 8:51:06this Vector is basically part of that
  9982. 8:51:09line as you can
  9983. 8:51:14see this is the vector B on this line B
  9984. 8:51:20so we know from this concept of the line
  9985. 8:51:24spanning the R2 and then vectors we know
  9986. 8:51:27that in this case independent what is
  9987. 8:51:30the magnitude of this Vector what is the
  9988. 8:51:32direction of this Vector we can
  9989. 8:51:34represent this line
  9990. 8:51:37B by this linear
  9991. 8:51:40combination based on this Vector so
  9992. 8:51:42linear combination of this Vector which
  9993. 8:51:44is in this
  9994. 8:51:46case
  9995. 8:51:49D
  9996. 8:51:52set set then here we got some
  9997. 8:51:58C where C is a real
  9998. 8:52:05number multiplied by this
  9999. 8:52:08Vector
  10000. 8:52:13B knowing that this C is just a real
  10001. 8:52:21number so let's make it actually green
  10002. 8:52:28so we can basically say that this entire
  10003. 8:52:31line B can be represented as this set of
  10004. 8:52:35this linear combinations of these
  10005. 8:52:37vectors so for instance if this
  10006. 8:52:41is one and we do the C is equal to two
  10007. 8:52:46then we can get this
  10008. 8:52:48part of so we can get this Vector
  10009. 8:52:51otherwise this is equal to three we can
  10010. 8:52:53get this vector or C is equal to for
  10011. 8:52:55this vector and then and so on which
  10012. 8:52:58means that we can always come up with a
  10013. 8:53:00linear combination forming a part of
  10014. 8:53:03this line therefore we are seeing that
  10015. 8:53:05this line can be represented as all
  10016. 8:53:07these linear
  10017. 8:53:08combinations uh of this Vector B which
  10018. 8:53:11is part of this
  10019. 8:53:12line and here the C is just a scaler so
  10020. 8:53:17a number which is a real number so this
  10021. 8:53:20C * Vector B represents this uh entire
  10022. 8:53:24line
  10023. 8:53:26so we will knit this in a bit but for
  10024. 8:53:28now imagine this line and part of this
  10025. 8:53:30line which is this Vector
  10026. 8:53:33B so imagine then that we got yet
  10027. 8:53:37another
  10028. 8:53:39Vector which is let's say in
  10029. 8:53:44here again going from the center but
  10030. 8:53:47this time in this different
  10031. 8:53:50direction
  10032. 8:53:52so in here
  10033. 8:53:55this
  10034. 8:54:00is
  10035. 8:54:02Vector
  10036. 8:54:04a we call this Vector an
  10037. 8:54:08A so you can see that this Vector a is
  10038. 8:54:11actually much longer than the vector B
  10039. 8:54:14and we see that Vector a is not lying on
  10040. 8:54:17the same line as B so B is lying on the
  10041. 8:54:19line b and a is not lying on the line B
  10042. 8:54:25now let's say we want to
  10043. 8:54:29project this Vector a onto this Vector B
  10044. 8:54:34which means that we want
  10045. 8:54:36to project this a in this
  10046. 8:54:41direction so we want
  10047. 8:54:44to bring this Vector a onto this
  10048. 8:54:50line let me actually use a different
  10049. 8:54:55color and the word of the projection
  10050. 8:54:58actually does make sense in here as you
  10051. 8:55:00might notice because we're trying
  10052. 8:55:03to cast the shadow of a onto this line
  10053. 8:55:07of B and how can we do that we can only
  10054. 8:55:12do that if we connect
  10055. 8:55:16this Vector
  10056. 8:55:18a like this with this orthogonal line
  10057. 8:55:23let's Say by using a different color
  10058. 8:55:28of
  10059. 8:55:30this so with this perpendicular
  10060. 8:55:34line we then will be connecting the
  10061. 8:55:37vector a to the line B because we want
  10062. 8:55:39to project our Vector a onto this
  10063. 8:55:48direction so this perpendicular line
  10064. 8:55:51that you see in
  10065. 8:55:52here that
  10066. 8:55:54goes from Vector a to the line B where
  10067. 8:55:59on line B we have the vector B so here
  10068. 8:56:03is the line a line B and this
  10069. 8:56:07perpendicular line it goes from
  10070. 8:56:11a to line B and on line V we have the
  10071. 8:56:15vector
  10072. 8:56:17B that is represented like this then the
  10073. 8:56:21projection of a onto Line B
  10074. 8:56:24is this Shadow Vector that you see in
  10075. 8:56:28here and the word projection or the name
  10076. 8:56:32projection actually does make sense
  10077. 8:56:35because we are projecting this Vector a
  10078. 8:56:38onto this line and it creates this
  10079. 8:56:40Shadow so we are casting this Shadow on
  10080. 8:56:43here and this Vector is what we are
  10081. 8:56:47referring as
  10082. 8:56:49projection of vector a onto l line B
  10083. 8:56:55notice that we don't say projection of B
  10084. 8:56:58on Vector B but instead we are saying
  10085. 8:57:00projection of a on the line B then
  10086. 8:57:03another thing we can notice is that we
  10087. 8:57:05are getting this
  10088. 8:57:07projection of a on B so this
  10089. 8:57:11vector by taking the vector
  10090. 8:57:17a so Vector a and subtracting from that
  10091. 8:57:26projection of a on
  10092. 8:57:31B that is the
  10093. 8:57:33formula for this
  10094. 8:57:36Vector that we refer as a
  10095. 8:57:40perpendicular that
  10096. 8:57:42goes from a to line B so when drawing
  10097. 8:57:47this perpendicular line from a to line B
  10098. 8:57:50we are referring this as a minus
  10099. 8:57:52projection of a b because you can see
  10100. 8:57:55that this Vector is simply this Vector
  10101. 8:57:57minus this Vector that is the um
  10102. 8:58:00mathematical expression for this
  10103. 8:58:02perpendicular
  10104. 8:58:05line so how we can then find out what is
  10105. 8:58:10this C that we got in here because we
  10106. 8:58:14understand that to get this exact
  10107. 8:58:17formula for
  10108. 8:58:19the
  10109. 8:58:21projection of a
  10110. 8:58:24on the line B we need to understand what
  10111. 8:58:28is the scaler specifically what value
  10112. 8:58:31are we using to multiply this Vector B
  10113. 8:58:33to get to this
  10114. 8:58:36point so what is that
  10115. 8:58:42c what is C what is
  10116. 8:58:47C such
  10117. 8:58:50that c times
  10118. 8:58:54a is then equal
  10119. 8:58:58to
  10120. 8:59:01projection of
  10121. 8:59:04a on the line B because we can have
  10122. 8:59:08different sorts of a linear combination
  10123. 8:59:11of vector
  10124. 8:59:12B on this line uh B and in fact B this
  10125. 8:59:17line B is the set of all linear
  10126. 8:59:20combinations of this Vector B and I want
  10127. 8:59:23to know
  10128. 8:59:25specifically what is the vector that we
  10129. 8:59:29see in here what is the shadow Vector
  10130. 8:59:32because this is the projection of a on
  10131. 8:59:34the line
  10132. 8:59:35B what we see in
  10133. 8:59:37here now how can we do
  10134. 8:59:41that well let's first formally Define on
  10135. 8:59:45this specific case what is the
  10136. 8:59:47projection of a on this line
  10137. 8:59:51B so projection
  10138. 8:59:54of
  10139. 8:59:55a on line
  10140. 8:59:58B is some
  10141. 9:00:02Vector that is
  10142. 9:00:05also
  10143. 9:00:07on line
  10144. 9:00:09B
  10145. 9:00:17where
  10146. 9:00:18a
  10147. 9:00:22minus projection
  10148. 9:00:25of
  10149. 9:00:26a on
  10150. 9:00:30B
  10151. 9:00:32is per
  10152. 9:00:38pendicular or
  10153. 9:00:43ortogonal to this is basically the
  10154. 9:00:46definition of the projection of a on
  10155. 9:00:49line B under this specific example
  10156. 9:00:54so in this case the way we can find this
  10157. 9:01:00projection is by looking into this C so
  10158. 9:01:04this is what we are interested this
  10159. 9:01:07specific
  10160. 9:01:09specific C
  10161. 9:01:13* B
  10162. 9:01:17vector and knowing C and knowing B we
  10163. 9:01:20already know what is B what B is knowing
  10164. 9:01:23C
  10165. 9:01:24we can then describe this specific
  10166. 9:01:29projection so one thing that we can know
  10167. 9:01:32is the condition under which we say two
  10168. 9:01:35vectors are autal that's something that
  10169. 9:01:37we already have learned as part of the
  10170. 9:01:39previous lessons so let's go ahead and
  10171. 9:01:42find that amount so now what we need to
  10172. 9:01:44do is to calculate this value of C
  10173. 9:01:46because value of C calculation will then
  10174. 9:01:48lead us to the exact uh Vector that we
  10175. 9:01:52are interested in which is this
  10176. 9:01:54projection so our end goal is to find
  10177. 9:01:57out what is this projection of a on B
  10178. 9:02:02this is what we want and for that we
  10179. 9:02:04need to calculate this C because we
  10180. 9:02:05already know the vector B so let me
  10181. 9:02:09quickly remove this
  10182. 9:02:16part cuz here we will then do our
  10183. 9:02:21calculation so one thing that we need to
  10184. 9:02:24make use of is this part when it says
  10185. 9:02:26orthogonal because we know that if two
  10186. 9:02:29vectors are orthogonal then they dot
  10187. 9:02:32product is equal to zero so we know that
  10188. 9:02:36this Vector is orthogonal to this target
  10189. 9:02:39Vector which means that we can say that
  10190. 9:02:43the
  10191. 9:02:45vector
  10192. 9:02:46a and
  10193. 9:02:48then minus
  10194. 9:02:55projection of
  10195. 9:02:57a on
  10196. 9:03:02B
  10197. 9:03:06multiplied with Vector
  10198. 9:03:10B that this is equal to
  10199. 9:03:14zero this is something that we know by
  10200. 9:03:17definition of orthogonality two vectors
  10201. 9:03:19are orthogonal it means that their
  10202. 9:03:20dotproduct is then equal to zero
  10203. 9:03:24now let's make use of that part
  10204. 9:03:27so this means that we need to describe
  10205. 9:03:32this projection of A and B we need to
  10206. 9:03:35make use of the fact that we know that
  10207. 9:03:37this projection of a onto B is actually
  10208. 9:03:43some linear combination of vector
  10209. 9:03:47B so let me actually go ahead and remove
  10210. 9:03:51this part we already know the definition
  10211. 9:03:55so let us go ahead and calculate that c
  10212. 9:03:58that we need in order to find out what
  10213. 9:04:00is this entire projection so few things
  10214. 9:04:03that we need to clear out is those
  10215. 9:04:05formulas because then we can make use of
  10216. 9:04:07them to find the C so we know that by
  10217. 9:04:09definition the projection of a on the
  10218. 9:04:11line B it is this
  10219. 9:04:15Vector that we get where we draw this
  10220. 9:04:18perpendicular line from Vector a onto
  10221. 9:04:21Line B and we said that this line is
  10222. 9:04:23equal to this amount this is simply the
  10223. 9:04:26vector a minus this Vector the shadow
  10224. 9:04:29Vector which we said it's defined by
  10225. 9:04:31projection of A and B this thing so we
  10226. 9:04:34can make use of that because we also see
  10227. 9:04:36in here that this we are saying isogonal
  10228. 9:04:40to this
  10229. 9:04:43Vector so given that this uh Vector a
  10230. 9:04:48minus projection a b is orthogonal to
  10231. 9:04:51line B that is also orthogonal
  10232. 9:04:54on this specific Vector which is the
  10233. 9:04:56projection itself so from this we can
  10234. 9:05:01make use of the fact that two vectors
  10235. 9:05:03when they are autal their dotproduct is
  10236. 9:05:06equal to zero in order to find this uh
  10237. 9:05:09value of C so firstly we just set that
  10238. 9:05:14the a minus projection of a on the line
  10239. 9:05:21B that this
  10240. 9:05:25multiplied by this Vector B is equal to
  10241. 9:05:29zero because those two lines they should
  10242. 9:05:31be
  10243. 9:05:36perpendicular but at the same time we
  10244. 9:05:39know that this is simply the linear
  10245. 9:05:42combination of this Vector because this
  10246. 9:05:47line is perpendicular to this one and
  10247. 9:05:50this line is some linear combin a of
  10248. 9:05:55this Vector B because if I have here a
  10249. 9:05:59vector and then I have the longer
  10250. 9:06:03version of that Vector on the same line
  10251. 9:06:05which is then a linear combination of
  10252. 9:06:08this original Vector let's say this is
  10253. 9:06:09my Vector B then this second Vector that
  10254. 9:06:14I have in here is then equal to some C *
  10255. 9:06:19Vector
  10256. 9:06:20B this is also exactly what we said in
  10257. 9:06:23here here we said any Vector on line B
  10258. 9:06:26can be represented as a linear
  10259. 9:06:28combination of vector B and this is
  10260. 9:06:31exactly what we are seeing in here so
  10261. 9:06:34this
  10262. 9:06:35projection is simply that c
  10263. 9:06:41times Vector
  10264. 9:06:44B this is something that we have already
  10265. 9:06:47said so we are just making use of that
  10266. 9:06:49to fill in that volum so this then
  10267. 9:06:52results
  10268. 9:06:54in a
  10269. 9:06:56minus this C
  10270. 9:06:59*
  10271. 9:07:01B multiplied by this Vector B is equal
  10272. 9:07:04to zero
  10273. 9:07:07formula so here we are simply making use
  10274. 9:07:10of the fact that the
  10275. 9:07:14projection of a onto B is the shadow
  10276. 9:07:17Vector which is then equal to some
  10277. 9:07:20linear combination of this original
  10278. 9:07:23Vector B which is on this
  10279. 9:07:27line
  10280. 9:07:32B then I can easily find the scaler C
  10281. 9:07:36from here because we know how we can
  10282. 9:07:38easily calculate this dot product so let
  10283. 9:07:42us actually go ahead and do that let's
  10284. 9:07:44first multiply
  10285. 9:07:47this a
  10286. 9:07:50by
  10287. 9:07:51B and then my minus so I'm simply
  10288. 9:07:55opening the parenthesis C * then I got B
  10289. 9:08:00by B and this equal to
  10290. 9:08:04zero so C
  10291. 9:08:07* B time B is then equal
  10292. 9:08:12to a and b which means that
  10293. 9:08:18c is equal to a * B / to B *
  10294. 9:08:35B now when we have the C we can easily
  10295. 9:08:39derive the formula for the projection of
  10296. 9:08:43a on the line
  10297. 9:08:48B so this is the first part this is the
  10298. 9:08:53second
  10299. 9:08:54part so then the
  10300. 9:08:57projection of a on
  10301. 9:09:04B so
  10302. 9:09:06projection of a on B is equal
  10303. 9:09:10to this
  10304. 9:09:13c
  10305. 9:09:17c times the B and we just found out that
  10306. 9:09:23this is equal to the C was equal
  10307. 9:09:26to a * B / to B *
  10308. 9:09:33B and now we need to take this C and
  10309. 9:09:37then
  10310. 9:09:39multiply by Vector
  10311. 9:09:41B this is then the projection of a on
  10312. 9:09:49B this Vector so projection
  10313. 9:09:53of
  10314. 9:09:55a on line
  10315. 9:10:02B so you will notice that this is the
  10316. 9:10:05same that we just got so whether you
  10317. 9:10:09compute the projection of a on the
  10318. 9:10:11entire line b or projection of a on the
  10319. 9:10:13specific Vector b as we are using the
  10320. 9:10:16vector b as a source for drawing our
  10321. 9:10:20line this is the same as the project
  10322. 9:10:23rection of vector
  10323. 9:10:27a on Vector
  10324. 9:10:32B and this is the same formula as we SE
  10325. 9:10:35in here so this is the projection
  10326. 9:10:37formula that we have just uh found out
  10327. 9:10:40so projection of a onto B is given by
  10328. 9:10:43this
  10329. 9:10:44formula a * B so the dot product of the
  10330. 9:10:48vector A and B divided to the dot
  10331. 9:10:50product of the bay withd itself and
  10332. 9:10:52multiply with the vector
  10333. 9:10:54B and this is the in here this is
  10334. 9:10:57something that we have calculated time
  10335. 9:10:59and time again in our examples so if we
  10336. 9:11:02go back to our
  10337. 9:11:04example then here we can see that this
  10338. 9:11:09is our Vector B this is our Vector a and
  10339. 9:11:15we are saying if we take the vector a
  10340. 9:11:18and we project it onto this Vector B
  10341. 9:11:21then we can calculate this Pro
  10342. 9:11:23projection which is in here the formula
  10343. 9:11:26for this entire
  10344. 9:11:29Vector which we are calling projection
  10345. 9:11:31of a on b or projection of
  10346. 9:11:35a on
  10347. 9:11:38B this can be find out so the the length
  10348. 9:11:41of that Vector we can find by using this
  10349. 9:11:44formula so the dot product of vector A
  10350. 9:11:47and B divided to the dotproduct of B
  10351. 9:11:49with itself and then multiplied with
  10352. 9:11:51Vector B so again a DOT product
  10353. 9:11:54produ and this is of course something
  10354. 9:11:57that we get as a vector so this is a
  10355. 9:12:00vector something that is equal to this
  10356. 9:12:03entire Vector in
  10357. 9:12:06here this
  10358. 9:12:08Vector so uh I know that this uh might
  10359. 9:12:12look bit messy because it contains many
  10360. 9:12:14moving Parts but I wanted to provide
  10361. 9:12:17this detailed explanation and the step
  10362. 9:12:19by-step process even if it is bit
  10363. 9:12:21confusing and bit messy um in the
  10364. 9:12:25beginning because this help us to
  10365. 9:12:27understand what this uh formula is about
  10366. 9:12:30and what is the intuition behind it
  10367. 9:12:32because what we are doing is that we are
  10368. 9:12:34making use of the fact that the line can
  10369. 9:12:38be represented as a linear combination
  10370. 9:12:41of all the
  10371. 9:12:44um vectors that we use in here so this
  10372. 9:12:47is Vector B and this entire line B is a
  10373. 9:12:51linear combination of this vector B and
  10374. 9:12:54we can make use of that in order to find
  10375. 9:12:56that scalar that we are multiplying to
  10376. 9:12:58create this single linear combination
  10377. 9:13:01that will end up giving us this Vector
  10378. 9:13:04that we see in here which is the
  10379. 9:13:06projection the projection that we are
  10380. 9:13:09interested which is this line This is
  10381. 9:13:11the projection that we are defining by
  10382. 9:13:14this projection a on to
  10383. 9:13:16B and we can get that by making use of
  10384. 9:13:20the fact that this this perpendicular
  10385. 9:13:23line that we are creating in here which
  10386. 9:13:25is simply the vector a minus this
  10387. 9:13:29projection this is this Vector this
  10388. 9:13:31projection Vector that this is
  10389. 9:13:34perpendicular to this line
  10390. 9:13:38B and if the vector B is part of this
  10391. 9:13:42line B this means also that this line a
  10392. 9:13:45minus projection a is also perpendicular
  10393. 9:13:47to that vector vector B making use of
  10394. 9:13:50that formula we can then uh make use use
  10395. 9:13:53of the product of the two we know that
  10396. 9:13:55the dot product of two perpendicular
  10397. 9:13:57vectors is equal to zero making use of
  10398. 9:13:59that we can then obtain this specific
  10399. 9:14:01scaler C that we
  10400. 9:14:03need in order to get the final formula
  10401. 9:14:08for our projection we are interested in
  10402. 9:14:11this C because knowing C we can then
  10403. 9:14:14multiply with this Vector B to get our
  10404. 9:14:16final projection and we have found that
  10405. 9:14:19that projection a on B is is defined as
  10406. 9:14:24the dotproduct of the A and B divided to
  10407. 9:14:27the dotproduct of the B with the B and
  10408. 9:14:28multiply with the vector B and this is
  10409. 9:14:31again a
  10410. 9:14:34vector now let's look into a couple of
  10411. 9:14:36numeric examples to clarify this topic
  10412. 9:14:39and practice with it so given vectors A
  10413. 9:14:42and vectors B find the projection of a
  10414. 9:14:44on to B so without looking into answer I
  10415. 9:14:49will quickly go onto that example itself
  10416. 9:14:52so Vector a
  10417. 9:14:53is this Vector 3 4 can also represent
  10418. 9:14:59this by our more common notation which
  10419. 9:15:02is three and four and then Vector
  10420. 9:15:07B
  10421. 9:15:10is one and zero so let's quickly draw
  10422. 9:15:15our coordinate
  10423. 9:15:17system this our xaxis this our y axis
  10424. 9:15:21and then what is the a
  10425. 9:15:25the a is three and
  10426. 9:15:30four three and
  10427. 9:15:39four so this is our
  10428. 9:15:43a and what is the B the B is one and
  10429. 9:15:51zero which which means that our line
  10430. 9:15:56B is
  10431. 9:16:00then C times the vector B given that the
  10432. 9:16:05C is a real number and one thing that
  10433. 9:16:08you can notice is that the line B is
  10434. 9:16:12actually our x-axis it is this line this
  10435. 9:16:15is our line
  10436. 9:16:20B this is our line l
  10437. 9:16:24b
  10438. 9:16:26so the projection is then this line this
  10439. 9:16:30is our projection because we can know
  10440. 9:16:32that by drawing a perpendicular
  10441. 9:16:35line in here from a to the line B we can
  10442. 9:16:41get then the connection between
  10443. 9:16:44our Vector a and Vector B and create our
  10444. 9:16:48projection so this is then the A minus
  10445. 9:16:54projection of a on line
  10446. 9:16:59B and this part is
  10447. 9:17:04then this is then this
  10448. 9:17:08projection
  10449. 9:17:10a on
  10450. 9:17:13B and how we can get this projection
  10451. 9:17:17well we just learned that the projection
  10452. 9:17:24of
  10453. 9:17:28a on
  10454. 9:17:31B is equal
  10455. 9:17:34to dotproduct
  10456. 9:17:36of
  10457. 9:17:38a with B divide it to dotproduct of B
  10458. 9:17:43with B
  10459. 9:17:44itself and multiply it by
  10460. 9:17:48B this is the formula that we can use
  10461. 9:17:50and even if you don't remember the
  10462. 9:17:52formula by heart you can make use of
  10463. 9:17:54this visualization to figure out what
  10464. 9:17:55that formula is because we know that if
  10465. 9:17:58this line is perpendicular to this one
  10466. 9:18:00then a minus projection of a on B
  10467. 9:18:03multiplied by this projection a on B
  10468. 9:18:06should be equal to zero and this
  10469. 9:18:09projection of a on B is equal to some
  10470. 9:18:12scalar C multiplied by Vector B that's
  10471. 9:18:16something that we see in
  10472. 9:18:20here the first thing we need to do to
  10473. 9:18:23compute the dot product between a and
  10474. 9:18:26b a * B is equal
  10475. 9:18:33to
  10476. 9:18:3634 multiplied by 1 0 this is the dot
  10477. 9:18:43product which is then equal to 3 * 1 + 0
  10478. 9:18:47* 4 and this is equal to
  10479. 9:18:503 the next thing we need to to do is to
  10480. 9:18:53compute the dotproduct between B itself
  10481. 9:18:56so B * B and what's that that is 1 0
  10482. 9:19:02with 1 Z multiplied this is equal to 1 1
  10483. 9:19:07* 1 + 0 plus 0 * 0 is equal to
  10484. 9:19:111 then the third thing that we can do
  10485. 9:19:15then is to obtain the final value which
  10486. 9:19:20is
  10487. 9:19:25projection of
  10488. 9:19:28a on
  10489. 9:19:32B is then equal
  10490. 9:19:36to three / 2 1 multiplied by the vector
  10491. 9:19:43B which is 1 0 which is equal to 3
  10492. 9:19:500 and this actually makes sense visually
  10493. 9:19:53too as you can see in here this is the
  10494. 9:19:57tree for the xaxis and here we have the
  10495. 9:20:00center Z so this projection is then the
  10496. 9:20:03vector 3 0 so even without calculation
  10497. 9:20:06we could see just from plotting the uh
  10498. 9:20:09on the coordinate system the vectors A
  10499. 9:20:11and B that the projection of a on B will
  10500. 9:20:13be this Vector 3 but we have followed
  10501. 9:20:15the formula in order to do calculation
  10502. 9:20:17step by
  10503. 9:20:18step which is something that you can see
  10504. 9:20:21in this answer too
  10505. 9:20:23so the projection of this Vector a onto
  10506. 9:20:25B is then this Vector of a length tree
  10507. 9:20:28in the direction of B so you can see
  10508. 9:20:31that it is of the length of
  10509. 9:20:36three so this is the tree on the
  10510. 9:20:39direction of B so on the line
  10511. 9:20:43B let's now move ahead and look into a
  10512. 9:20:46different example but this time we will
  10513. 9:20:47do the calculation in a quicker way so
  10514. 9:20:50we got two vectors 4 three and B is
  10515. 9:20:52equal to
  10516. 9:20:5320 and we need to find this projection
  10517. 9:20:56of a on to B so the first thing we need
  10518. 9:21:00to do is to calculate the a * B which is
  10519. 9:21:05equal to 43 multili 2 0 and that's equal
  10520. 9:21:12to 4 * 2 + 3 * 0 and it's equal to 8 the
  10521. 9:21:16second thing we need to calculate is the
  10522. 9:21:18B do product with B which is equal to 2
  10523. 9:21:220
  10524. 9:21:232 0 this is then equal to four and the
  10525. 9:21:27final part is to take and uh from this
  10526. 9:21:31one and two this values and then bring
  10527. 9:21:33them all together so then
  10528. 9:21:36the
  10529. 9:21:38projection
  10530. 9:21:40of a on B is equal
  10531. 9:21:51to H
  10532. 9:21:53ided to
  10533. 9:21:544 multiplied by the vector
  10534. 9:21:58to0 and this is equal 2 8 / 2 4 is 2 2 *
  10535. 9:22:042 is 2 2 * 0 is 0 so we are getting this
  10536. 9:22:10two Vector so projection of a on B is
  10537. 9:22:14then this Vector 20 which is actually on
  10538. 9:22:16this xaxis similar to what we had before
  10539. 9:22:19only with the length of t uh towards the
  10540. 9:22:21direction of
  10541. 9:22:23which is then equal to 4
  10542. 9:22:26and0 and this is again similar to what
  10543. 9:22:28we had before uh where we got the
  10544. 9:22:31projection of a on B on that end up on
  10545. 9:22:34the x axis but now with the length of
  10546. 9:22:36four so now our
  10547. 9:22:42projection has the following Vector so
  10548. 9:22:45the uh following magnitude and
  10549. 9:22:48Direction so this is the step by-step
  10550. 9:22:50process that I just followed if if you
  10551. 9:22:52want to do it bit slowly and this is the
  10552. 9:22:55final
  10553. 9:22:56result so uh the interpretation of this
  10554. 9:23:00projection is that this projection a
  10555. 9:23:02onto B is simply this 4 zero this means
  10556. 9:23:06that the A's component in the direction
  10557. 9:23:09of B it spends uh four units along this
  10558. 9:23:12x-axis that we saw in
  10559. 9:23:18here because this is the value X this is
  10560. 9:23:21the value of y
  10561. 9:23:25so this projection shows us that A's
  10562. 9:23:28influence in the direction of B is
  10563. 9:23:30completely horizontal with this
  10564. 9:23:32magnitude of four because we saw that we
  10565. 9:23:35end up with the projection on the x-axis
  10566. 9:23:39again so this was four this was our
  10567. 9:23:42projection vector and if you plot this
  10568. 9:23:45entire Vector a and Vector B on this
  10569. 9:23:49x-axis and y axis then you can clearly
  10570. 9:23:51see that the uh horizontal line that we
  10571. 9:23:55end up with the uh
  10572. 9:23:58projection of a n b is very similar to
  10573. 9:24:03what we had
  10574. 9:24:05before in
  10575. 9:24:08here let's now talk about a concept of
  10576. 9:24:10auton normal bases so let's now Define
  10577. 9:24:14what the auton normal bases are so by
  10578. 9:24:16definition auton normal basis for a
  10579. 9:24:19vector space is a basis where all vector
  10580. 9:24:22vors are orthogonal or perpendicular to
  10581. 9:24:25each other and each Vector is of unit
  10582. 9:24:28length so as you can notice here here we
  10583. 9:24:32have a special type of basis it's called
  10584. 9:24:35auton normal basis because in the
  10585. 9:24:38beginning of this section of this module
  10586. 9:24:40we defined formally this concept of
  10587. 9:24:42bases we talked about the concept of
  10588. 9:24:45colal uh space and then the uh basis of
  10589. 9:24:49a comp space the no space the basis of a
  10590. 9:24:52n space and then we talked about the
  10591. 9:24:55concept of the bases of the entire space
  10592. 9:24:59for instance the R2 and now we are
  10593. 9:25:02defining a special type of bases which
  10594. 9:25:05we are referring as auton normal bases
  10595. 9:25:08and this auton normal basis as you can
  10596. 9:25:10see from this definition it contains two
  10597. 9:25:12criteria for it to be auton normal so an
  10598. 9:25:16auton basis for a vectory space is a
  10599. 9:25:18basis where a all vector are orthogonal
  10600. 9:25:23or perpendicular to each other and B
  10601. 9:25:27each Vector is of unit length we already
  10602. 9:25:30have learned that when we have vectors
  10603. 9:25:34let's say Vector A and B
  10604. 9:25:36perpendicular it means that A and B
  10605. 9:25:40their dot product is equal to zero
  10606. 9:25:42that's the first criteria that we need
  10607. 9:25:44for calling our basis an auton normal
  10608. 9:25:48basis then the second criteria is that
  10609. 9:25:53each of these vectors they need to have
  10610. 9:25:56a
  10611. 9:25:57length of
  10612. 9:26:03one if we have this condition satisfied
  10613. 9:26:06then we are saying that our vectors they
  10614. 9:26:09help us to form this auton normal basis
  10615. 9:26:13if we got three vectors forming this
  10616. 9:26:15Vector space it means that we need to
  10617. 9:26:18have the a * B = to
  10618. 9:26:220 a * C = 0 and then B * C = 0 this is
  10619. 9:26:30if we are in in case we are using three
  10620. 9:26:34different vectors that Define our Vector
  10621. 9:26:39space in this
  10622. 9:26:41case let me make this part smaller so
  10623. 9:26:46let's put the length of B in here in
  10624. 9:26:51this case
  10625. 9:26:53the second
  10626. 9:26:54criteria becomes that the length of a is
  10627. 9:26:59equal to the length of B and then is
  10628. 9:27:02equal to the length of c and is equal to
  10629. 9:27:06one so depending on the number of
  10630. 9:27:09vectors that you use to form your vector
  10631. 9:27:11space the proof that you are dealing
  10632. 9:27:14with auton normal bases will be
  10633. 9:27:15different here we got just two vectors
  10634. 9:27:18here we got three vectors but in both
  10635. 9:27:20case we first need to prove that we are
  10636. 9:27:22dealing with uh vectors Each of which
  10637. 9:27:25are set of orthogonal perpendicular
  10638. 9:27:28vectors and all of them pairwise they
  10639. 9:27:32need to be perpendicular and at the same
  10640. 9:27:34time the second criteria says that they
  10641. 9:27:36all need to have a unit length so their
  10642. 9:27:40length should be equal to
  10643. 9:27:42one we need this auton normal bases in
  10644. 9:27:45order to simplify our calculations
  10645. 9:27:47including the calculations of
  10646. 9:27:49projections and Transformations that we
  10647. 9:27:51just so before when we were discussing
  10648. 9:27:54this concept of projecting a vector onto
  10649. 9:27:57a line or projecting a vector onto not a
  10650. 9:27:59vector because we were in this basic
  10651. 9:28:01case when we had just two vectors in
  10652. 9:28:05R2 and calculating projection in R2 is
  10653. 9:28:09very easy because we can make use of
  10654. 9:28:10this formula um a and then B uh the dot
  10655. 9:28:15product of them and then divided two
  10656. 9:28:17product of the B and then times the B
  10657. 9:28:19this was quite straightforward right but
  10658. 9:28:22when it
  10659. 9:28:23came so this is the projection of a on B
  10660. 9:28:30but when it comes to projection in
  10661. 9:28:32higher dimensional space let's say you
  10662. 9:28:34have R5 or you have R 100 or R th000
  10663. 9:28:37then it becomes much more difficult to
  10664. 9:28:40do those projections and to calculate
  10665. 9:28:42the projections and for those cases we
  10666. 9:28:45can make use of this concept of auton
  10667. 9:28:47normal basis to simplify our
  10668. 9:28:49calculations and we will see that in a
  10669. 9:28:51bit
  10670. 9:28:53so let's first understand this
  10671. 9:28:55orthogonality and the normalization part
  10672. 9:28:57so orthogonality refers then to the part
  10673. 9:28:59of uh when we are saying that the
  10674. 9:29:01vectors should be orthogonal to each
  10675. 9:29:03other and the normalization refers to
  10676. 9:29:06the fact uh to the fact that the length
  10677. 9:29:09should be one this is basically the set
  10678. 9:29:11of two criteria that I just discussed
  10679. 9:29:14this is uh the summary slide that will
  10680. 9:29:17give you an indication what is meant by
  10681. 9:29:19that so if we have two vectors V and W
  10682. 9:29:23then we say that the first criteria is
  10683. 9:29:25that those two vectors are orthogonal
  10684. 9:29:27which means their dot product is equal
  10685. 9:29:29to zero and we are saying that their
  10686. 9:29:31length is equal to one which we are
  10687. 9:29:33referring as a normalized vector so if
  10688. 9:29:36the
  10689. 9:29:37vector has a length of one then we are
  10690. 9:29:41calling a vector
  10691. 9:29:42v
  10692. 9:29:49normalized so if both of this criteria
  10693. 9:29:52of normalization and
  10694. 9:29:53orthogonality is satisfied that we are
  10695. 9:29:56saying that we are dealing with an uton
  10696. 9:29:58normal basis so now where we have
  10697. 9:30:00learned this idea of projections also
  10698. 9:30:02this idea of autog colonization and the
  10699. 9:30:06uh concept of auton normal basis we are
  10700. 9:30:08ready to discuss the concept of the
  10701. 9:30:10grade process so the grade process is
  10702. 9:30:14this method for orthogonalizing a set of
  10703. 9:30:16vectors in an inner product space and
  10704. 9:30:19turning them into an auton normal
  10705. 9:30:24set so let's say we have a set of
  10706. 9:30:27vectors we want to uh bring and
  10707. 9:30:30transform all these vectors onto this
  10708. 9:30:33auton normal set of vectors which means
  10709. 9:30:36that we want them to be aized so we want
  10710. 9:30:40them to be perpendicular and we want
  10711. 9:30:43them to be normalized because we know
  10712. 9:30:45that the two criteria were specified
  10713. 9:30:47right so the first criteria was that we
  10714. 9:30:49need to have vectors
  10715. 9:30:55ortogonal hence we are doing
  10716. 9:31:02orthogonalization and the second
  10717. 9:31:04criteria was that they need to be
  10718. 9:31:07normalized because we want the
  10719. 9:31:12vectors to
  10720. 9:31:15have
  10721. 9:31:17length one so we are doing normalization
  10722. 9:31:24this process of turning this set of
  10723. 9:31:29vectors onto this uton normal
  10724. 9:31:32set by using this method of
  10725. 9:31:35orthogonalization which is something
  10726. 9:31:37that we are referring as a grme
  10727. 9:31:39process this is something that we can
  10728. 9:31:42use in order to simplify later this
  10729. 9:31:45different sorts of Transformations which
  10730. 9:31:47we need in order to perform bit more
  10731. 9:31:49advanced uh Transformations like Matrix
  10732. 9:31:52uh factorization different decomposition
  10733. 9:31:55techniques so given this set of linearly
  10734. 9:31:58independent vectors this process which
  10735. 9:32:01we are referring as grme process
  10736. 9:32:03produces this auton normal set that is
  10737. 9:32:06spinning the same
  10738. 9:32:08Subspace so we have the same
  10739. 9:32:11Subspace it's just that we are turning
  10740. 9:32:13the set of vectors into an auton normal
  10741. 9:32:16set of vectors that is spanning the same
  10742. 9:32:20Subspace so the gr Street process step
  10743. 9:32:23by step looks like something like this
  10744. 9:32:26so given the vectors A1 A2 up to a n the
  10745. 9:32:30first thing we need to do is to start
  10746. 9:32:33with the vector V1 which is equal to our
  10747. 9:32:36first Vector A1 and first we need to
  10748. 9:32:39normalize this vector and how we can
  10749. 9:32:42normalize this Vector well we need to
  10750. 9:32:45take this vector and we need to divide
  10751. 9:32:47it to its length so the grme process
  10752. 9:32:50step by step will look like like
  10753. 9:32:52something like this so in the first step
  10754. 9:32:54what we need to do when starting with
  10755. 9:32:56these vectors of A1 A2 up to a n so in
  10756. 9:32:59RN we need to First Take the first
  10757. 9:33:02vector and we need to normalize it and
  10758. 9:33:04how we can normalize the vector and
  10759. 9:33:06ensure that its length is equal to this
  10760. 9:33:09length of P1 well we need to take that
  10761. 9:33:13vector and we need to divide it to this
  10762. 9:33:15length because
  10763. 9:33:18when we take the
  10764. 9:33:20vector the 1 and we divide it to its
  10765. 9:33:24length of V1 then we will ensure that
  10766. 9:33:27the length of that Vector is equal to
  10767. 9:33:32one we can actually prove that very
  10768. 9:33:34easily but I won't do it in here uh feel
  10769. 9:33:37free to go through the process assuming
  10770. 9:33:40that
  10771. 9:33:41the
  10772. 9:33:43length of the vector what what you want
  10773. 9:33:46to achieve at the end is that the length
  10774. 9:33:48of a vector v is equal to one
  10775. 9:33:51this is something that we want to
  10776. 9:33:53achieve and this normalization process
  10777. 9:33:56can be
  10778. 9:33:57done if we find a way to ensure that we
  10779. 9:34:02uh get this E1 because E1 means that we
  10780. 9:34:06end up with this Vector y 000000 0 this
  10781. 9:34:10will be for first Vector so
  10782. 9:34:13V1 this is E1 so the one is really
  10783. 9:34:17important here so we want to normalize
  10784. 9:34:20this Vector View 1 by uh ensuring that
  10785. 9:34:25we get the E1 so we go from V1 to E1 and
  10786. 9:34:30the way we do that is that we take the
  10787. 9:34:32V1 and we divide it to the length of
  10788. 9:34:35V1 and in this way we get the E1 so the
  10789. 9:34:40normalized version of P1 is
  10790. 9:34:45E1 so then for each subsequent Vector a
  10791. 9:34:49k which means A2 A3 A4 up to a n we need
  10792. 9:34:54to subtract its projection on all the
  10793. 9:34:57previously computed orthogonal
  10794. 9:35:04vectors in this way by using this tab
  10795. 9:35:07two we are ensuring that all these
  10796. 9:35:11different each pair wise set of A1 A2
  10797. 9:35:15and then A2 A3 Etc they are all
  10798. 9:35:17orthogonal to each
  10799. 9:35:19other and we know that this projection
  10800. 9:35:24is something that we got when we had
  10801. 9:35:26this two perpendicular lines so we had
  10802. 9:35:29this Vector we're projecting onto this
  10803. 9:35:31Vector we got that by finding this
  10804. 9:35:36perpendicular line and making use of
  10805. 9:35:38that using this property we are then
  10806. 9:35:41making use of that in order to see how
  10807. 9:35:43we can ensure that the subsequent Vector
  10808. 9:35:46that we have is always perpendicular to
  10809. 9:35:49this
  10810. 9:35:50one so let me actually write down what
  10811. 9:35:54is in this
  10812. 9:35:55formula so here VK is equal to a minus
  10813. 9:36:01the sum of all the projections so then
  10814. 9:36:04we need to normalize the VK to get the
  10815. 9:36:07EK and then we need to repeat this step
  10816. 9:36:10two and three for all vectors which
  10817. 9:36:13means that first here we apply this
  10818. 9:36:16normalization on the vector A1 so V1 is
  10819. 9:36:21to A1 and then we get the normalization
  10820. 9:36:25by getting this E1 so E1 is normalized
  10821. 9:36:29version and then we need to apply a bit
  10822. 9:36:33different tactique for our V2 V3 up to
  10823. 9:36:38VN and then let me actually write down
  10824. 9:36:41this for this General
  10825. 9:36:44case so what this processed this the GR
  10826. 9:36:52let me ensure that I'm not making a typo
  10827. 9:36:58Schmid
  10828. 9:37:01process step by step means step number
  10829. 9:37:08one for
  10830. 9:37:12vectors A1
  10831. 9:37:15A2 A3 dot dot dot a n so we are in the
  10832. 9:37:19RN
  10833. 9:37:25then step number one basically says take
  10834. 9:37:30the
  10835. 9:37:32V1 and set it equal to this first
  10836. 9:37:35element
  10837. 9:37:38V1 this is
  10838. 9:37:46A1 then what we need to do is to
  10839. 9:37:51normalize it to get the
  10840. 9:37:55E1 so normalize
  10841. 9:37:59normalized
  10842. 9:38:01V1 to get E1 which is equal to 1 0 0 0
  10843. 9:38:09and then dot dot dot zero and the size
  10844. 9:38:11of this n by one and how we can do
  10845. 9:38:16that by taking this Vector V1 and
  10846. 9:38:21divided it to the length of V1 which
  10847. 9:38:25basically means in this specific case A1
  10848. 9:38:29divided to the length of A1 this will
  10849. 9:38:33then give us our
  10850. 9:38:35A1 this Vector this is basically what
  10851. 9:38:39the step one entails then in the step
  10852. 9:38:42number
  10853. 9:38:44two we have for each
  10854. 9:38:48subsequent a where K is just an index
  10855. 9:38:52referring to whether we are dealing with
  10856. 9:38:55K is equal to 2 so uh A2 A3 and then dot
  10857. 9:39:00dot dot a
  10858. 9:39:02n this is what basically the K is used
  10859. 9:39:05for to refer to which Vector we are
  10860. 9:39:07dealing
  10861. 9:39:09with we need to subtract its projection
  10862. 9:39:13on all previously computed orthogonal
  10863. 9:39:18vectors by using this formula so let's
  10864. 9:39:22actually do a couple of those case to
  10865. 9:39:24see what is going on for instance for K
  10866. 9:39:27is equal to
  10867. 9:39:322 so K is equal to 2 and here is the
  10868. 9:39:37formula by the way
  10869. 9:39:40so
  10870. 9:39:42VK VK is equal to
  10871. 9:39:47AK
  10872. 9:39:50minus some
  10873. 9:39:51K is equal to K starts with
  10874. 9:39:54one and
  10875. 9:39:56then let me use a different
  10876. 9:40:00index so I is = to 1 till K minus
  10877. 9:40:08one and then
  10878. 9:40:11projection
  10879. 9:40:13of a
  10880. 9:40:15k a k
  10881. 9:40:24on E1 or
  10882. 9:40:29eii so the EI that we have just computed
  10883. 9:40:32because every time you are then
  10884. 9:40:34normalizing and normalizing every time
  10885. 9:40:37your vectors and then you are uh finding
  10886. 9:40:40out what is the projection of your
  10887. 9:40:42vector a onto that
  10888. 9:40:49EI and then you are substract in that
  10889. 9:40:51from your vector so what this means in
  10890. 9:40:54Practical terms when for instance your K
  10891. 9:40:56is equal to 2 it means that V 2 is equal
  10892. 9:41:04to a 2 minus sum of I is = 1 and then K
  10893. 9:41:12is = 2 K - 1 this means this is
  10894. 9:41:16one
  10895. 9:41:18projection of a a and then
  10896. 9:41:242 on
  10897. 9:41:27A1 given that this is one this is simply
  10898. 9:41:30equal to
  10899. 9:41:32A2
  10900. 9:41:33minus
  10901. 9:41:36projection of
  10902. 9:41:38A1 that's normalized version of E1 and
  10903. 9:41:43then A2 so projection of A2 on E1
  10904. 9:41:53and then in the step number three we
  10905. 9:41:56need to do we need to go from VK to get
  10906. 9:41:58EK so basically we are ensuring with the
  10907. 9:42:01step number two the orthogonally uh
  10908. 9:42:03orthogonality condition and with step
  10909. 9:42:06number
  10910. 9:42:07three I
  10911. 9:42:10me add some space in here so in the step
  10912. 9:42:14number three step number three we then
  10913. 9:42:16saying let's
  10914. 9:42:19normalize normalized
  10915. 9:42:22this VK that we have just
  10916. 9:42:26computed in
  10917. 9:42:29here because we remember that the second
  10918. 9:42:32criteria after tonality is normalization
  10919. 9:42:34that the unit or the length of the
  10920. 9:42:37vector should be equal to
  10921. 9:42:39one so then VK in this case for K is
  10922. 9:42:44equal to 2 for K is equal to 2 means
  10923. 9:42:47that we need to go from V2 to E2
  10924. 9:42:52and the way we can do that is by taking
  10925. 9:42:55the
  10926. 9:42:57V2 by V2 and then divide it to the
  10927. 9:43:02length of
  10928. 9:43:04V2 this will then give us the E2 this is
  10929. 9:43:08the normalization
  10930. 9:43:10part and the step number four basically
  10931. 9:43:14means
  10932. 9:43:16repeat
  10933. 9:43:18repat step two
  10934. 9:43:22entry for all
  10935. 9:43:25case which means that if we go back so
  10936. 9:43:29we are done with V2 so we have obtained
  10937. 9:43:32V2 and then we have obtained normaliz
  10938. 9:43:34normalized version of V2 by getting this
  10939. 9:43:38E2 we are ready to come back and do the
  10940. 9:43:41same for
  10941. 9:43:44K is equal to three and for K is equal
  10942. 9:43:47to three in Step number two we got
  10943. 9:43:51V3 is equal to
  10944. 9:43:55A3 minus making use of this
  10945. 9:43:59formula sum overall I is = to 1 K - 1 is
  10946. 9:44:04= to 2 and then
  10947. 9:44:07projection of this time a Tre see three
  10948. 9:44:12k is equal to three and then on E2
  10949. 9:44:21actually it says EI let me remove this
  10950. 9:44:25this otherwise we would have made a
  10951. 9:44:30mistake this should be I because an I
  10952. 9:44:34will change per K this is the entire
  10953. 9:44:37idea we need to re um subtract all the
  10954. 9:44:40um
  10955. 9:44:41projections what this basically means is
  10956. 9:44:44that we need to take A3 and this time
  10957. 9:44:47given that here we have two instead of
  10958. 9:44:49one in here we need you have an extra
  10959. 9:44:52step which means A3
  10960. 9:44:56minus and then what this formula
  10961. 9:44:58basically says this is the sum of the
  10962. 9:45:01projections of A3 on e i where I goes
  10963. 9:45:04from one till two so
  10964. 9:45:07projection of a Tre on
  10965. 9:45:14a one when K so when I this is the I is
  10966. 9:45:19equal to one case plus
  10967. 9:45:23projection of a Tre on a 2 this is the I
  10968. 9:45:30equal to 2 case this is
  10969. 9:45:32basically what this
  10970. 9:45:35summation says this is this element and
  10971. 9:45:38we have seen this as part of the high
  10972. 9:45:40school but also the pre-algebra
  10973. 9:45:43course okay so now when we are clear on
  10974. 9:45:49how we can calculate the V3 in the step
  10975. 9:45:52number two for K is equal to 3 we are
  10976. 9:45:55ready to go onto the step number three
  10977. 9:45:57and what was step number
  10978. 9:46:00three the step number three
  10979. 9:46:05for K is equal to 3 was saying let's
  10980. 9:46:09take the V3 and normalize it to go from
  10981. 9:46:13V3 to E3 and how we can do that by
  10982. 9:46:17taking the V3 and dividing it to the
  10983. 9:46:21length of V
  10984. 9:46:23tree to get on to E
  10985. 9:46:28tree and this cycle goes on and on until
  10986. 9:46:32we cover all the case so all the vectors
  10987. 9:46:37so the idea is that we first for our
  10988. 9:46:41initial step we set the V1 equal to
  10989. 9:46:44A1 we normalize it then starting from
  10990. 9:46:49the K is equal to two we don't go first
  10991. 9:46:53on and on WE autog it by formula in here
  10992. 9:46:58by using this we can ensure that each of
  10993. 9:47:02these vectors is then orthogonal to all
  10994. 9:47:06the other vectors so for K is equal to 2
  10995. 9:47:08we ensure that this uh Vector that we
  10996. 9:47:12get is orthogonal to all the other ones
  10997. 9:47:16and the case equal to treat that the
  10998. 9:47:18third Vector isogonal to all the other
  10999. 9:47:20ones and we are doing that in Step
  11000. 9:47:21number
  11001. 9:47:23two so for each case for each K we
  11002. 9:47:26basically are ensuring that in this case
  11003. 9:47:30we have an a vector that is orthogonal
  11004. 9:47:33to all the other vectors in this
  11005. 9:47:35set and for each Vector we are also
  11006. 9:47:38normalizing it to satisfy the second
  11007. 9:47:40criteria because we had these two
  11008. 9:47:42criterias to create this auton normal
  11009. 9:47:45set so we are doing this in subsequent
  11010. 9:47:49uh way so first for K isal to 1 so
  11011. 9:47:53basically for A1 and then we are doing
  11012. 9:47:55this for K is equal to 2 so A2 and then
  11013. 9:48:01until K is equal to n so a n what we are
  11014. 9:48:05doing every time is that we are
  11015. 9:48:06obtaining this V1 and then we go from V1
  11016. 9:48:10to E1 to normalize it and then here we
  11017. 9:48:13are getting the V2 here to go to E2 by
  11018. 9:48:18normalizing it so this basically
  11019. 9:48:21the step two and step three and then we
  11020. 9:48:24do this every time up until to the point
  11021. 9:48:28of obtaining VN and then from VN we go
  11022. 9:48:32to en n to normalize
  11023. 9:48:35it so this is the idea of this entire
  11024. 9:48:40process step by step to start with V1 as
  11025. 9:48:43part of the step number one and then as
  11026. 9:48:45part of Step number two for each
  11027. 9:48:47subsequent Vector a k so K is equal to
  11028. 9:48:50two obtain the VK and then normalize it
  11029. 9:48:54for K is equal to 3 obtain the V3 and
  11030. 9:48:56then normalize it to get E3 up to the
  11031. 9:48:58point of the last Vector which is a n
  11032. 9:49:01the vector a n we compute the
  11033. 9:49:05VN and then we normalize it to get
  11034. 9:49:09the and this is what this part is which
  11035. 9:49:13is the St number two that says repeat
  11036. 9:49:15steps 2 and three for all vectors it
  11037. 9:49:17means that every time when you increase
  11038. 9:49:19your K when you go to the next Vector we
  11039. 9:49:22first compute the V so VK and then you
  11040. 9:49:25normalize it you get the EK and then you
  11041. 9:49:27go back to the step number two at three
  11042. 9:49:29because you then again need to calculate
  11043. 9:49:31the VK and then EK and then for the next
  11044. 9:49:34case so this is something that you will
  11045. 9:49:37see also a lot when you are writing the
  11046. 9:49:40code for
  11047. 9:49:42your uh algorithms because in many cases
  11048. 9:49:45you need to do this reputation of the
  11049. 9:49:48steps so uh you for one Vector you do
  11050. 9:49:51something or for one iteration you do
  11051. 9:49:53process and then you uh go back and do
  11052. 9:49:56for the next one and for the next one
  11053. 9:49:58this process is what we are referring by
  11054. 9:50:00repeat step number two and three for all
  11055. 9:50:06vectors so let's now look into an
  11056. 9:50:08example let's apply this grumme process
  11057. 9:50:11to vectors A1 and A2 where A1 is 1 1 0
  11058. 9:50:16and A2 is 101
  11059. 9:50:22so let's go ahead and do that so A1 is
  11060. 9:50:25equal
  11061. 9:50:28to 1 1
  11062. 9:50:320
  11063. 9:50:34A2 is equal
  11064. 9:50:37to 1 0
  11065. 9:50:401 we want to apply this gret process to
  11066. 9:50:43create this Aon normal basis for the
  11067. 9:50:46Subspace that is Pinn by A1 and A2 so
  11068. 9:50:49now we have this
  11069. 9:50:51set 1 1
  11070. 9:50:540 and one
  11071. 9:50:561 and what we want is to create an auton
  11072. 9:51:00noral
  11073. 9:51:02basis so
  11074. 9:51:05creating
  11075. 9:51:06creating or to normal normal
  11076. 9:51:13basis
  11077. 9:51:16which
  11078. 9:51:18CR meet
  11079. 9:51:27process so here we got only two vectors
  11080. 9:51:31so obviously it's this and it's a very
  11081. 9:51:33simplified version of it what was the
  11082. 9:51:36first step in our case uh in our
  11083. 9:51:38algorithm it was to set the V1 equal to
  11084. 9:51:44A1 what we need to do step number one we
  11085. 9:51:49need to set the V1 equal to
  11086. 9:51:54A1 and we need to
  11087. 9:51:56normalize
  11088. 9:51:59normalize the
  11089. 9:52:02V1 to get E1 that's what our goal is so
  11090. 9:52:07let's go ahead and do
  11091. 9:52:09that V1 is equal to A1 and is equal
  11092. 9:52:15to 1 1 0er that's our A1 so 1 1
  11093. 9:52:22Z and in order to normalize
  11094. 9:52:28V1 and get the
  11095. 9:52:30E1 we know that this is equal to V1 / to
  11096. 9:52:34the length of
  11097. 9:52:37V1 which is then equal to take the V1 so
  11098. 9:52:42that is 1 1 0 and then divide it to the
  11099. 9:52:47length of V1
  11100. 9:52:51and you can very quickly see
  11101. 9:52:55that
  11102. 9:52:57given
  11103. 9:53:00V1 is equal to V1 * V1 that's something
  11104. 9:53:04that we learned in the very beginning of
  11105. 9:53:06our fundamentals to linear algebra
  11106. 9:53:07course that the length of V1 is simply
  11107. 9:53:10the dotproduct between uh V1 and V1 and
  11108. 9:53:13it's equal
  11109. 9:53:14to 1 1 0 * 1 1 0
  11110. 9:53:21which is equal to 1 + 1 so two so this
  11111. 9:53:27is then equal to 1 1 0 / 2 which is
  11112. 9:53:32equal to 1 / 2 1 / to 2 and then
  11113. 9:53:360 this is our E1 so we are done with our
  11114. 9:53:40step number one because now we have
  11115. 9:53:42V1 and we got
  11116. 9:53:46E1 so what was the step number two in
  11117. 9:53:49the step number
  11118. 9:53:51two we need to set the k equal to
  11119. 9:53:562 this is the next K so for
  11120. 9:54:03A2 what we need to do is we want to
  11121. 9:54:07get
  11122. 9:54:09V2
  11123. 9:54:11and
  11124. 9:54:14normalize V2 by getting E2 and how can
  11125. 9:54:19we get that
  11126. 9:54:21well first let's find what is the V2
  11127. 9:54:25well V2 was and using that formula that
  11128. 9:54:27we saw before which was this formula so
  11129. 9:54:31it's equal to a k minus and the sum I is
  11130. 9:54:35equal to 1 K minus one and then
  11131. 9:54:37projection of a onto EI
  11132. 9:54:40I so let's take this formula
  11133. 9:54:43over this is equal to a 2 because K is
  11134. 9:54:49equal to 2 a a k minus Su and then I is
  11135. 9:54:53equal to one till K -1 and then K -1
  11136. 9:54:58which is equal to basically 1 given that
  11137. 9:55:02K is equal to
  11138. 9:55:032 and then projection of A2 onto e
  11139. 9:55:13i and this is equal to
  11140. 9:55:16A2 minus given that we got k - Y is
  11141. 9:55:20equal to 1 so the limit for our
  11142. 9:55:22summation is equal to
  11143. 9:55:241 so this one this means that like
  11144. 9:55:29before we got just one part as part of
  11145. 9:55:31our summation so minus and then
  11146. 9:55:37projection of let me actually keep the
  11147. 9:55:40same color I want it to be consistent so
  11148. 9:55:44projection of
  11149. 9:55:47A2 on d e
  11150. 9:55:521 so you see here the i i is equal to 1
  11151. 9:55:57and the limit of the I is K minus one
  11152. 9:56:00which is equal to 1 so we got here just
  11153. 9:56:06E1 so we got the V2 formula we can then
  11154. 9:56:10now calculate it because we know
  11155. 9:56:14A2 and the A2 is this so one one
  11156. 9:56:211 0 1 but now we got a problem we don't
  11157. 9:56:26know what this is so let's
  11158. 9:56:29quickly go and calculate this
  11159. 9:56:34part so
  11160. 9:56:36projection of
  11161. 9:56:39A2 on
  11162. 9:56:42a
  11163. 9:56:431 and we learned from the projection
  11164. 9:56:47formula that this is equal to H 2 * E1 /
  11165. 9:56:532 E1 * E1 so the dot product multip by
  11166. 9:56:58E1 and what is this this is equal
  11167. 9:57:01to 1 1 multiplied by and what is the E1
  11168. 9:57:07E1 we just calculate in here so it is 1
  11169. 9:57:11/ to 2 1 / to 2 and then zero here / two
  11170. 9:57:16and then 1 / 2 1 / 2 and then 0 0
  11171. 9:57:21multiplied by 1 / 2 1 / to 2 and then Z
  11172. 9:57:25here multiplied by the same Vector so
  11173. 9:57:33E1 so this two cancel out this two also
  11174. 9:57:37cancel out and as you can see we are
  11175. 9:57:40getting that
  11176. 9:57:42the projection of A2 on E1 is equal to
  11177. 9:57:46this vector
  11178. 9:57:52we can also manually check that actually
  11179. 9:57:55so let's let's do that so let's see we
  11180. 9:57:57are not canceling out these
  11181. 9:58:01vectors and instead we are manually
  11182. 9:58:04calculating
  11183. 9:58:10this so here we got 101 ultip by 0.5 and
  11184. 9:58:170.50 this is equal to 1 *
  11185. 9:58:201 / 2 is 1 / 2 0 * 1 / 2 is 0 1 * 0 is 1
  11186. 9:58:27so + 1 /
  11187. 9:58:312 this amount is
  11188. 9:58:351/4 +
  11189. 9:58:371/4 this multiplied by the vector 1 / 2
  11190. 9:58:421 / 2 and then 0 in here this is equal
  11191. 9:58:46to 1 / 2 1 + 1 / 2 is = to 3 / to 2 and
  11192. 9:58:54then 1 1/4 + 1/4 is equal to 1 / 2 2
  11193. 9:59:01multiplied by 1 2 and then 1 2 and then
  11194. 9:59:07zero what is this amount well those two
  11195. 9:59:10cancel out so we end up with three * and
  11196. 9:59:15then 1 / 2 2 and then
  11197. 9:59:201 / 2 and then
  11198. 9:59:22zero this is then the projection 3 / 2 3
  11199. 9:59:26/ to two and then
  11200. 9:59:32zero so let me remove all these
  11201. 9:59:35calculations
  11202. 9:59:53and then we can take over the projection
  11203. 9:59:56value which
  11204. 9:59:57is 3 / to 2 3 / to 2 and then zero to
  11205. 10:00:04get our Vector
  11206. 10:00:07V2 which is equal to 1 - 3 / to 2 0 - 3
  11207. 10:00:15/ to 2 and then 1 - 0 and this is equal
  11208. 10:00:20to here it is 1 here it is - 3 / 2 and
  11209. 10:00:24here is minus and then 1 / 2
  11210. 10:00:292 because 3 / 2 is minus uh it is 1.5
  11211. 10:00:34and then 1 - 1.5 is simply minus
  11212. 10:00:370.5 so this is then the vector
  11213. 10:00:40V2 then what we need to do is to
  11214. 10:00:43normalize this Vector to get D
  11215. 10:00:46E2 which is then equal to V2 ided to V2
  11216. 10:00:53length which is simply equal to
  11217. 10:00:57V2 / to V2 * V2 so the dot product and
  11218. 10:01:03this is equal to let's take the V2 which
  11219. 10:01:06is -1 / 2 and then - 3 / 2 and then 1
  11220. 10:01:11and then divided 2 and this amount let's
  11221. 10:01:14quickly calculate that it is equal to so
  11222. 10:01:19the length of V2 is equal
  11223. 10:01:23to - 1 / 2^
  11224. 10:01:272 + - 3 / 2^ 2 + 1 this is equal to 1/4
  11225. 10:01:34+ 9/ to 4 + 1 which is 4 / to 4 and then
  11226. 10:01:41this is equal to 1 + 9 is 10 10 + 4 is
  11227. 10:01:4514 so 14 / 2 4 this is the length of it
  11228. 10:01:57so 14 / 2
  11229. 10:02:044 so then this is equal to this Vector
  11230. 10:02:08to this threedimensional
  11231. 10:02:11Vector min-1 * 14 - 1 / 2 * 14 / 4 is
  11232. 10:02:18equal to this is 7 so
  11233. 10:02:23minus 7 / 2
  11234. 10:02:294 and then - 3 /
  11235. 10:02:342 think I just made a mistake here
  11236. 10:02:38actually so Min - 1 / to 2 so the first
  11237. 10:02:43element and then ided 24 / 4 is actually
  11238. 10:02:47actually equal to this multipli by four
  11239. 10:02:50ided to 14 so you take this element then
  11240. 10:02:55divide it to this one and we know that a
  11241. 10:02:58/ to B * C / 2 D is equal to a *
  11242. 10:03:05D and then B * C so we are basically
  11243. 10:03:10flipping this
  11244. 10:03:12side this is
  11245. 10:03:14from
  11246. 10:03:15pre-algebra and then here
  11247. 10:03:19this is equal
  11248. 10:03:25to 2 and then is equal to -1 /
  11249. 10:03:3827 then let's do the second one
  11250. 10:03:41twoo so we got minus 3 / to 2 / to 14 /
  11251. 10:03:47to 4 is actually equal to - 3 / to 2 * 4
  11252. 10:03:51/ to
  11253. 10:03:5314 and then if we remove this this is
  11254. 10:03:58then 2 this is 7 this cancel out this
  11255. 10:04:02equal to - 3 / to 7 - 3 / to 7 and then
  11256. 10:04:08finally we got 1 /
  11257. 10:04:122
  11258. 10:04:1514 / 2 4 which is equal to 4 / 2 14 this
  11259. 10:04:19equal to 2 / to 7 so 2 / to 7 and this
  11260. 10:04:23is our A2 and given that we got just two
  11261. 10:04:27vectors so we have already reached the
  11262. 10:04:29end of our solution so now when we have
  11263. 10:04:34already the V1 and the V2 the E1 and the
  11264. 10:04:37E2 We have basically completed the
  11265. 10:04:40process of this grummet uh procedure
  11266. 10:04:43because we have already uh only two
  11267. 10:04:47vectors that means that we need to have
  11268. 10:04:49V1 and V2 and then uh E1 and E2 and this
  11269. 10:04:53is all that you need in case you got two
  11270. 10:04:55vectors if you have three vectors of
  11271. 10:04:57course the process will include um the
  11272. 10:05:00same process of Step number two and
  11273. 10:05:02three so the V2 and the normalization of
  11274. 10:05:05it two times for your K is equal to 2
  11275. 10:05:08and K is equal to 3 and then if you have
  11276. 10:05:12more vectors than every time you will
  11277. 10:05:14have more of the steps but at the end
  11278. 10:05:17what we want to have is the set of
  11279. 10:05:19vectors that are orthogonal and at the
  11280. 10:05:21same time they are normalized in this
  11281. 10:05:23case we say that this vectors form this
  11282. 10:05:26oron normal bases now why is this
  11283. 10:05:29important the applications of
  11284. 10:05:31orthonormal bases well firstly it
  11285. 10:05:34simplifies a complex Vector
  11286. 10:05:37operations and uh this is the basis of
  11287. 10:05:40many uh more difficult mathematical
  11288. 10:05:43Concepts uh like foror series or quantum
  11289. 10:05:46mechanics it's used also um when when it
  11290. 10:05:50comes to this auton normal basis uh also
  11291. 10:05:53signal processing and it's a critical uh
  11292. 10:05:56process in numerical methods especially
  11293. 10:05:59in machine learning algorithms and in
  11294. 10:06:01data compression so we will see this
  11295. 10:06:03process to be used also as part of uh
  11296. 10:06:05decomposition techniques which is really
  11297. 10:06:08important when it comes to different
  11298. 10:06:10algorithms uh whether it's optimization
  11299. 10:06:12algorithms but also um algorithms that
  11300. 10:06:16are used for recommender systems for
  11301. 10:06:18example and those uh Concepts they all
  11302. 10:06:22come together and we will see later on
  11303. 10:06:24when we will be discussing the concepts
  11304. 10:06:26of the compositions and metrics
  11305. 10:06:29factorization so this Aon normal basis
  11306. 10:06:31and this grum process they are really
  11307. 10:06:33foundationally in linear algebra they
  11308. 10:06:36provide tools for simplifying and also
  11309. 10:06:39solving these higher dimensional
  11310. 10:06:40problems efficiently their application
  11311. 10:06:43include different fields of science
  11312. 10:06:45engineering demonstrating their
  11313. 10:06:47versatility and utility
  11314. 10:06:52let's now talk about the special
  11315. 10:06:54matrices and their properties so we are
  11316. 10:06:56going to talk about special matrices
  11317. 10:06:59like symmetric matrices and their
  11318. 10:07:01example diagonal matrices and their
  11319. 10:07:03corresponding example but also the
  11320. 10:07:05ortogonal matrices with the
  11321. 10:07:06corresponding
  11322. 10:07:08example so when it comes to the special
  11323. 10:07:11matrices special matrices have unique
  11324. 10:07:14properties such as being symmetric or
  11325. 10:07:16all nonzero elements on the diagonal
  11326. 10:07:19like diagonal matrices or
  11327. 10:07:21orthogonality uh in matrices which means
  11328. 10:07:24that we have orthogonal
  11329. 10:07:26matrices so when it comes to the
  11330. 10:07:28symmetric Matrix it means that uh the a
  11331. 10:07:33The Matrix a is equal to its transpose
  11332. 10:07:36the a so a is equal to a in this case we
  11333. 10:07:40can confirm and say that the Matrix a is
  11334. 10:07:43symmetric so in this case we have Matrix
  11335. 10:07:46a and we know that the way we need to to
  11336. 10:07:50transpose this Matrix is to taking this
  11337. 10:07:53rows and making them The Columns of our
  11338. 10:07:56transpose Matrix so a is then equal
  11339. 10:08:01to 2 - 1 and then zero then the second
  11340. 10:08:05row which is min -1 and then 2 and then
  11341. 10:08:09Min -1 and then the third row which is 0
  11342. 10:08:13- one and two so the third row then
  11343. 10:08:15becomes my third column so as you can
  11344. 10:08:17see those two are the same so I'm using
  11345. 10:08:20then the definition of the transpose of
  11346. 10:08:23the um Matrix and then here then we end
  11347. 10:08:28up with two matrices they are actually
  11348. 10:08:31the same so we can see that the A and
  11349. 10:08:34the a in both the First Column they got
  11350. 10:08:372 minus one and then zero the second
  11351. 10:08:40column minus one 2 and minus one the
  11352. 10:08:42third column 0 - 1 and two so their
  11353. 10:08:45columns and their rows they are the same
  11354. 10:08:48which means that we are dealing with a
  11355. 10:08:50symmetric Matrix so whenever we want to
  11356. 10:08:52check whether the Matrix is symmetric we
  11357. 10:08:54just need to take the transpose of it
  11358. 10:08:56and see where the the Matrix is equal to
  11359. 10:08:59its transpose in that case we are
  11360. 10:09:00dealing with symmetric
  11361. 10:09:02Matrix do also note therefore for uh
  11362. 10:09:05Matrix to be symmetric it needs to be a
  11363. 10:09:08square Matrix so it needs to be 2x two
  11364. 10:09:11into two dimensional space or 3 by3 in
  11365. 10:09:14the three dimensional space or n by N in
  11366. 10:09:16N dimensional space which means that the
  11367. 10:09:19number of rows should be equal to number
  11368. 10:09:23of
  11369. 10:09:27columns because otherwise when you flip
  11370. 10:09:30your number of rows with number of
  11371. 10:09:32columns on in case there is no um uh
  11372. 10:09:37Square version of that Matrix so m is
  11373. 10:09:40not equal to n in that case a will have
  11374. 10:09:45a dimension of M by n and then then a t
  11375. 10:09:51so a
  11376. 10:09:56t will have a dimension of n
  11377. 10:10:00by m which means that there is no way
  11378. 10:10:03that a can be equal to a this is not
  11379. 10:10:07then possible therefore we need to have
  11380. 10:10:10a square Matrix for them to be
  11381. 10:10:15symmetric let's now talk about diagonal
  11382. 10:10:17matrix so a diagonal Matrix has a
  11383. 10:10:20nonzero element only on its diagonal
  11384. 10:10:24which means that in this case we have
  11385. 10:10:27this nonzero elements on the diagonal so
  11386. 10:10:30let's call it
  11387. 10:10:31d11 d22 and then d33 this equal to three
  11388. 10:10:36this equal to 5 this equal to 7 and all
  11389. 10:10:39the other elements as you can see in
  11390. 10:10:41here they are
  11391. 10:10:44zeros so the concept of diagonal
  11392. 10:10:47matrices is very uh simple therefore we
  11393. 10:10:50will then go through the next example
  11394. 10:10:52which is about orthogonal Matrix now
  11395. 10:10:55this is a concept that we haven't yet
  11396. 10:10:57seen and we spoken about so let's Cod
  11397. 10:11:00read through this bit slowly so an
  11398. 10:11:02orthogonal Matrix is a square Matrix
  11399. 10:11:05whose columns and rows are orthogonal
  11400. 10:11:09unit vectors so oron normal vectors and
  11401. 10:11:13its transpose equals its
  11402. 10:11:17inverse so there are two two part of
  11403. 10:11:19this elements so firstly it
  11404. 10:11:22says that for the Matrix to be octogonal
  11405. 10:11:24Matrix it should be a square Matrix so
  11406. 10:11:29Square
  11407. 10:11:33Matrix and then its
  11408. 10:11:36columns and rows are orthogonal unit
  11409. 10:11:41vectors so
  11410. 10:11:44columns and
  11411. 10:11:46rows
  11412. 10:11:48are
  11413. 10:11:52orthogonal unit
  11414. 10:11:55vectors which means they need to be
  11415. 10:11:57normalized so
  11416. 10:12:01normalized so um we have seen when
  11417. 10:12:05forming this orthonormal basis that we
  11418. 10:12:07had this process of uh this condition of
  11419. 10:12:11orthogonality the vectors had to be AAL
  11420. 10:12:14and they had to have a length of one
  11421. 10:12:16which means that they they had to be
  11422. 10:12:18normal I we can see exactly the same in
  11423. 10:12:21here so hence the name oron normal
  11424. 10:12:25vectors so they are utal and they are
  11425. 10:12:28unit vectors which means they are
  11426. 10:12:31normalized so then the final condition
  11427. 10:12:35is added in here which actually is not
  11428. 10:12:38so much a condition but rather than a
  11429. 10:12:40property something that we can prove
  11430. 10:12:42that once we have all this we can also
  11431. 10:12:46say that if we are dealing with toal
  11432. 10:12:49Matrix then
  11433. 10:12:51Q T * Q so the dotproduct of the
  11434. 10:12:58transpose with that Matrix Q is equal to
  11435. 10:13:04the Q * QT is equal to I why because the
  11436. 10:13:11QT is equal to the Q minus one because
  11437. 10:13:16the transpose of that Matrix Q is
  11438. 10:13:19actually equal to its
  11439. 10:13:21inverse and given that we learned that
  11440. 10:13:23the Q minus one so the inverse time Q is
  11441. 10:13:27= to Q inverse * Q is equal to
  11442. 10:13:31I and given that here we are learning
  11443. 10:13:34that Q T is = to Q minus one we are then
  11444. 10:13:40making use of this to claim
  11445. 10:13:44this so instead of minus On's that we
  11446. 10:13:48are used to when we are dealing with
  11447. 10:13:51inverses here we have t the
  11448. 10:14:02transpose so in this case this
  11449. 10:14:04orthogonal Matrix that we have just
  11450. 10:14:07learned about this is the square Matrix
  11451. 10:14:09whose columns and rows are orthogonal
  11452. 10:14:11and they are also normalized meaning
  11453. 10:14:14that we are dealing with
  11454. 10:14:16QT QT sh Q minus one it will look like
  11455. 10:14:21this so this q1 you can see that here we
  11456. 10:14:24got the first row here we got the second
  11457. 10:14:27row and if we
  11458. 10:14:29calculate
  11459. 10:14:31the dot product between this row and
  11460. 10:14:34this row we can quickly see that we are
  11461. 10:14:36getting a value of zero so we can prove
  11462. 10:14:39that they are actually autogo those two
  11463. 10:14:42rows let's go ahead and actually prove
  11464. 10:14:44that so let's call this R1 let's call
  11465. 10:14:47this R2 this is Row one and row two and
  11466. 10:14:50I will leave the uh column version so q1
  11467. 10:14:54* Q2 that's do product on you to prove
  11468. 10:14:57that the columns are perpendicular I
  11469. 10:15:00will work with the rows so R1 * R2 for
  11470. 10:15:06me to prove that they are orthogonal I
  11471. 10:15:08need to prove that this equal to
  11472. 10:15:10zero can we do that well let's try so 1
  11473. 10:15:15/ 2 < of 2 1 / 2 of 2 ultied by 1 / 2 <
  11474. 10:15:24of
  11475. 10:15:252 needs some bigger space in
  11476. 10:15:29here so 1 / 2 of 2 and then
  11477. 10:15:34minus 1 / 2 of 2 that's how I can
  11478. 10:15:38calculate the dot product between R1 and
  11479. 10:15:43R2 R2 and
  11480. 10:15:46R1 you can see that the elements in here
  11481. 10:15:49are the same and here the elements are
  11482. 10:15:51also the
  11483. 10:15:54same so then this is equal
  11484. 10:15:58to 1 / 2 < of 2 * 1 / 2 of 2 - 1 / to of
  11485. 10:16:072
  11486. 10:16:11* 1 / 2 of 2 I'm simply taking this
  11487. 10:16:15minus and given that the dotproduct is
  11488. 10:16:18basically Plus
  11489. 10:16:19and then this amount I'm just taking
  11490. 10:16:21this and bringing up in here to a avoid
  11491. 10:16:24one more step uh given the space is
  11492. 10:16:27quite limited now what do we see in
  11493. 10:16:31here this value is the same as this
  11494. 10:16:34value which means that this is equal to
  11495. 10:16:38zero and we know that the two vectors to
  11496. 10:16:42be or token they need to have a DOT
  11497. 10:16:45product equal to zero so here we have
  11498. 10:16:47proven that dotproduct
  11499. 10:16:52of R1 and R2 is equal to
  11500. 10:16:59zero so this proves that R1 and R2 so
  11501. 10:17:04the two
  11502. 10:17:08rows of this Matrix so R1 and
  11503. 10:17:12R2 are orogo
  11504. 10:17:19we can also prove that the second
  11505. 10:17:21criteria of auton normal vectors is also
  11506. 10:17:24satisfied in here we can prove that when
  11507. 10:17:27we look at the
  11508. 10:17:30length of this vector and of this one
  11509. 10:17:35then they are of the unit one so let's
  11510. 10:17:38actually go ahead and do for one of them
  11511. 10:17:41so let's prove that
  11512. 10:17:45for 1 / 2 of 2 and then 1 / 2 Ro of 2
  11513. 10:17:52this is a
  11514. 10:17:56vector that the length of
  11515. 10:17:59it this is let's say
  11516. 10:18:01our first row so this is
  11517. 10:18:05R1 then the R1 length is equal
  11518. 10:18:10to 1 / 2 of 2 2 + 1 / 2 of 2 2 this is
  11519. 10:18:21equal to 1 / 2 + 1 / 2 and what is 1 / 2
  11520. 10:18:28+ 1 / 2 it's equal to 1 so we have
  11521. 10:18:32proven that the length of R1 is equal to
  11522. 10:18:371 you can quickly and easily also
  11523. 10:18:40compute that for the second row and you
  11524. 10:18:42will then also prove that the R2 the
  11525. 10:18:45length of it is also one which is then
  11526. 10:18:47the second criter area which said that
  11527. 10:18:51for the vectors to form this auton
  11528. 10:18:53normal bases so to be auton normal
  11529. 10:18:55vectors they uh also had to have a
  11530. 10:18:58length of one so they had to be a unit
  11531. 10:19:01vectors in this case then we can make
  11532. 10:19:04use of the property that the
  11533. 10:19:07Q
  11534. 10:19:102 transpose is equal to Q
  11535. 10:19:15inverse and this then result in Q2
  11536. 10:19:20transpose * Q2 Q2 which is equal to Q2 *
  11537. 10:19:24Q2 transpose which is equal to the
  11538. 10:19:26identity Matrix and specifically I2
  11539. 10:19:30because we are in the
  11540. 10:19:34R2 so both this Q2 and the previous
  11541. 10:19:37example those are orthogonal
  11542. 10:19:40matrices and in here we have proven that
  11543. 10:19:44the rows are indeed oroginal and we have
  11544. 10:19:47also seen that the length of them are
  11545. 10:19:49unit vectors meaning that we have
  11546. 10:19:52automatically got
  11547. 10:19:54this I will leave this one to you to do
  11548. 10:19:58those proofs so to uh ensure that the
  11549. 10:20:01row one and row two are orthogonal so
  11550. 10:20:04they are perpendicular which means that
  11551. 10:20:06the product of their uh the dot product
  11552. 10:20:09of these two vectors is equal to zero
  11553. 10:20:11and also that they are normalized which
  11554. 10:20:13means the length of them is equal to one
  11555. 10:20:16and this means that then this holds you
  11556. 10:20:20can actually even go ahead and uh
  11557. 10:20:24practice the material that we are uh
  11558. 10:20:26learned as part of the previous units by
  11559. 10:20:28calculating the inverse of this Matrix
  11560. 10:20:32and checking that the inverse of this
  11561. 10:20:34Matrix is indeed equal to the transpose
  11562. 10:20:36of the Matrix so that QT is equal to Q
  11563. 10:20:40minus 1 because we learned how we can
  11564. 10:20:42compute the inverse of a matrix because
  11565. 10:20:45the inverse of a matrix was equal to 1 /
  11566. 10:20:48the determinant of this Matrix
  11567. 10:20:52times and then the manipulated version
  11568. 10:20:54of it which was in this case 0 0 and
  11569. 10:20:58then we need to have here 1 so -1 *
  11570. 10:21:021 and then 1 * - one so we have to
  11571. 10:21:06multiply this and this by minus so one
  11572. 10:21:09and then here minus
  11573. 10:21:11one so in this way you can also prove
  11574. 10:21:15that this inverse is actually equal to
  11575. 10:21:18the Q to
  11576. 10:21:20transpose because then you can prove
  11577. 10:21:24that indeed and you can see for yourself
  11578. 10:21:26that this formula is in equal to the Q2
  11579. 10:21:30transpose because then you can prove
  11580. 10:21:34that indeed and you can see for yourself
  11581. 10:21:37that this formula is indeed true in this
  11582. 10:21:40module we are going to talk about Matrix
  11583. 10:21:42factorization we are going to discuss
  11584. 10:21:44the significance of Matrix factorization
  11585. 10:21:47we are going to Define Matrix
  11586. 10:21:49factorization we are going also to
  11587. 10:21:51discuss the common applications of
  11588. 10:21:52Matrix factorization across different
  11589. 10:21:54fields and then we are going to see
  11590. 10:21:56detailed examples of metrix
  11591. 10:21:59factorization so let's talk about why
  11592. 10:22:02Matrix factorization matters so metrix
  11593. 10:22:05factorization techniques they are
  11594. 10:22:07essential for various reasons they are
  11595. 10:22:09used for simplifying metrix operations
  11596. 10:22:11like solving linear systems or when we
  11597. 10:22:14have this um many uh matrices but we
  11598. 10:22:18want to to um simplify these operations
  11599. 10:22:21that we apply to these matrices and we
  11600. 10:22:22want to solve the problem then we can
  11601. 10:22:25make this uh complex Matrix operations
  11602. 10:22:28more manageable and make these uh
  11603. 10:22:31calculations more manageable by using
  11604. 10:22:33Matrix factorization techniques we can
  11605. 10:22:36also use Matrix factorization directly
  11606. 10:22:38to solve system all linear equations
  11607. 10:22:41efficiently we can also use Matrix
  11608. 10:22:43factorization to perform igon value de
  11609. 10:22:45composition singular value de de
  11610. 10:22:47composition or called SVD and other
  11611. 10:22:51operations which are crucial in machine
  11612. 10:22:53learning and data analysis so ion values
  11613. 10:22:57and igon vectors you might have heard
  11614. 10:22:59already they are part of also PCA which
  11615. 10:23:02is the principal component analysis and
  11616. 10:23:04this comes from uh fundamentals of
  11617. 10:23:06statistics and the uh PCA is used as a
  11618. 10:23:10dimensionality technique and in fact
  11619. 10:23:12it's one of the most popular damage s
  11620. 10:23:14techniques that you will find in the
  11621. 10:23:16industry used in the data science using
  11622. 10:23:19data analytics machine learning even in
  11623. 10:23:22the Deep learning so Matrix
  11624. 10:23:25factorization can also be used to reduce
  11625. 10:23:28the computational complexity by making
  11626. 10:23:30use of this factorization we can then
  11627. 10:23:33simplify the process and also make it
  11628. 10:23:35more efficient for computation and it's
  11629. 10:23:38especially important when we are dealing
  11630. 10:23:40with this High dimensional data when we
  11631. 10:23:42have many features or we have a very
  11632. 10:23:45large model and complex model then this
  11633. 10:23:48uh meing factorization technique can
  11634. 10:23:51make a huge difference in our data
  11635. 10:23:53processing process so this techniques
  11636. 10:23:56underpin many algorithms in numeric
  11637. 10:23:59analysis in optimizations and Beyond so
  11638. 10:24:03whenever it comes to machine learning or
  11639. 10:24:06data science or many other fields you
  11640. 10:24:08will see this uh process and this term
  11641. 10:24:11metrix authorization appearing a lot
  11642. 10:24:14even um in the example of a streaming
  11643. 10:24:16company Netflix which I'm sure that you
  11644. 10:24:18are aware of netrix is using uh metrix
  11645. 10:24:22uh factorization to build a recommender
  11646. 10:24:24system and uh metrix authorization usage
  11647. 10:24:28in building recommender algorithm for
  11648. 10:24:30personalized recommendations is actually
  11649. 10:24:32one of the most popular applications of
  11650. 10:24:34metric factorization therefore I wanted
  11651. 10:24:37to specifically discuss this topic as
  11652. 10:24:39part of our Advanced linear algebra
  11653. 10:24:41course and some of the concepts might
  11654. 10:24:44seem bit more complex than the ones that
  11655. 10:24:46we have discussed as part of the
  11656. 10:24:47previous units but once we go through
  11657. 10:24:50them step by step and I will give you
  11658. 10:24:53all the details in all these examples
  11659. 10:24:55this entire process of this different
  11660. 10:24:58metrix factorization techniques should
  11661. 10:25:00become much more clear and
  11662. 10:25:02straightforward so we will be discussing
  11663. 10:25:04not just one but multiple fundamental
  11664. 10:25:07metrix factorization techniques beside
  11665. 10:25:10of talking the high level where they are
  11666. 10:25:12used and how you can choose for what
  11667. 10:25:15type of applications so we are going to
  11668. 10:25:17demes this entire concept of metrix
  11669. 10:25:20factorization and we are going to uh
  11670. 10:25:23start from high level then we are going
  11671. 10:25:25to go into the deepest details let's now
  11672. 10:25:28formally Define the metrix factorization
  11673. 10:25:31so metrix factorization refers to
  11674. 10:25:34decomposing a matrix into product of two
  11675. 10:25:37or more matrices revealing its structure
  11676. 10:25:41and simplifying further
  11677. 10:25:43analysis so what is this idea behind
  11678. 10:25:46metric factorization the idea is that if
  11679. 10:25:48we have a matrix
  11680. 10:25:50a and we want to simplify our process of
  11681. 10:25:54calculation or multiplication anything
  11682. 10:25:57that's related to this a but this a in
  11683. 10:26:00itself it contains this weird numbers or
  11684. 10:26:03it is just too complex you know it
  11685. 10:26:04contains this ton of different numbers
  11686. 10:26:07you don't recognize whether the columns
  11687. 10:26:09are linearly independent it's not very
  11688. 10:26:11readable from the first View and you
  11689. 10:26:13just want to make your life easier when
  11690. 10:26:15performing this calculations well for
  11691. 10:26:17that you you can make use of this Matrix
  11692. 10:26:19factorization to write this a in terms
  11693. 10:26:23of some other matrices let's say um and
  11694. 10:26:26I'm calling here randomly Q or t so it's
  11695. 10:26:30equal to for instance the dotproduct of
  11696. 10:26:31these two matrices Q * T where Q is much
  11697. 10:26:35simpler and the t is also much simpler
  11698. 10:26:38so those may contain vectors that are um
  11699. 10:26:42for instance this can be a diagonal
  11700. 10:26:44matrix or it can be a matrix uh with
  11701. 10:26:47specific properties when using those you
  11702. 10:26:50will feel much more comfortable so it
  11703. 10:26:52will be easier for you to use them in
  11704. 10:26:54order to multiply uh with other matri
  11705. 10:26:57matrices it can be easier for you to
  11706. 10:27:00solve this problem but of course if you
  11707. 10:27:02are in the two-dimensional space let's
  11708. 10:27:04say you are in R2 or in R3 then most
  11709. 10:27:07likely it will be quite straightforward
  11710. 10:27:09for you to use the a itself but if you
  11711. 10:27:12are in the r 100 or R 1,000 then of
  11712. 10:27:17course this uh entire computations they
  11713. 10:27:20become super complex it will be
  11714. 10:27:23difficult to understand and compute this
  11715. 10:27:26linear combinations find out whether you
  11716. 10:27:28are dealing with a linearly independent
  11717. 10:27:30columns find out um the um new space the
  11718. 10:27:35calm space the basis of the new space
  11719. 10:27:38and calm space and all these they might
  11720. 10:27:41seem uh much more difficult when you are
  11721. 10:27:43in high dimensional space for in those
  11722. 10:27:45cases we can then make use of metric
  11723. 10:27:47factorization
  11724. 10:27:48to make the entire process much more
  11725. 10:27:52simplified and also more efficient this
  11726. 10:27:55entire calculation process so common
  11727. 10:27:58types of Matrix factorization include
  11728. 10:28:00lower upper uh Matrix factorization or
  11729. 10:28:03in short
  11730. 10:28:04L QR factorization an Infamous type of
  11731. 10:28:08factorization which is called orthogonal
  11732. 10:28:11triangular
  11733. 10:28:13factorization and then we have SVD
  11734. 10:28:16singular value de compos ition yet
  11735. 10:28:19another in famous metrix
  11736. 10:28:21factorization and then finally the igon
  11737. 10:28:24de composition also another Super
  11738. 10:28:26popular metrix factorization
  11739. 10:28:28technique so uh the QR SVD and igod
  11740. 10:28:33composition are in fact highly popular
  11741. 10:28:37the composition and Metric factorization
  11742. 10:28:40techniques that you will see appearing
  11743. 10:28:43in the 90% of all the statistics related
  11744. 10:28:46and machine learning related ated books
  11745. 10:28:49so this just comes to prove how
  11746. 10:28:51important these concepts are when it
  11747. 10:28:54comes to properly learning and mastering
  11748. 10:28:57these more applied uh science related
  11749. 10:29:00fields like machine learn so if you want
  11750. 10:29:03to go beyond the level of knowing
  11751. 10:29:05algorithms but rather than to also be
  11752. 10:29:08able to edit the algorithms tweak them
  11753. 10:29:11adjust them be able to understand
  11754. 10:29:14machine learning algorithms deep
  11755. 10:29:15learning algorithms data science and at
  11756. 10:29:18its core and in order to become a
  11757. 10:29:20professional well-rounded professional
  11758. 10:29:23then this I composition the singular
  11759. 10:29:25valid composition and the QR metrix
  11760. 10:29:28authorization techniques are techniques
  11761. 10:29:30that you want to know and you want to
  11762. 10:29:33understand at least higher level such
  11763. 10:29:35that you can easier grasp more advanced
  11764. 10:29:39concepts that come from the applied
  11765. 10:29:41sciences like machine learning and
  11766. 10:29:44AI so let's first discuss at high level
  11767. 10:29:47what this C q r DEC composition is so
  11768. 10:29:50what the QR DEC composition does is that
  11769. 10:29:52it decomposes a matrix into an
  11770. 10:29:55orthogonal Matrix which we are referring
  11771. 10:29:58by q and then an upper triangular Matrix
  11772. 10:30:03R so in here you can see that we have
  11773. 10:30:07this two different matrices so we are
  11774. 10:30:10basically saying a is equal to this
  11775. 10:30:12product of this Matrix q and r R where
  11776. 10:30:19the first one this Matrix
  11777. 10:30:22Q this one should be orthogonal Matrix
  11778. 10:30:26so this part is really important and we
  11779. 10:30:29have learned as part of the previous
  11780. 10:30:31module the definition of orthogonal
  11781. 10:30:34Matrix we learned that the rows or
  11782. 10:30:37columns they had to be orthogonal to
  11783. 10:30:39each other and we also learned that they
  11784. 10:30:42need to have a length of one they need
  11785. 10:30:44to um be normalized
  11786. 10:30:48and we learned that this means that the
  11787. 10:30:51transpose of those matrices is equal to
  11788. 10:30:53the inverse of the matrices so this was
  11789. 10:30:56just the last part of the previous
  11790. 10:30:58module and this is exactly what this
  11791. 10:31:01Matrix Q is about so we are saying that
  11792. 10:31:04we will decompose I into this two
  11793. 10:31:06matrices as a product of these two
  11794. 10:31:08matrices Q andr one of which this Matrix
  11795. 10:31:11Q should uh be uh an autal Matrix which
  11796. 10:31:14means the rows and the columns they
  11797. 10:31:16should be or toal to each other so their
  11798. 10:31:20uh dot product each of them should be
  11799. 10:31:22equal to zero and they need to be
  11800. 10:31:25normalized so the length of them should
  11801. 10:31:27be one for each of those rows and
  11802. 10:31:29vectors and then the second part of this
  11803. 10:31:33U the composition is this Matrix R which
  11804. 10:31:36says that the Matrix R should be an
  11805. 10:31:39upper triangular Matrix and what is the
  11806. 10:31:42definition of upper
  11807. 10:31:43triangular well in this case you can
  11808. 10:31:47think of this r as this
  11809. 10:31:49Matrix where we have here all
  11810. 10:31:54zeros and then here on the diagonal you
  11811. 10:31:57have numbers nonzero numbers and then
  11812. 10:32:00here let's say 1 2 3 4 5 and then here
  11813. 10:32:04in the upper part you will also have
  11814. 10:32:06numbers so unlike in the lower part of
  11815. 10:32:08this Matrix R where you will have zeros
  11816. 10:32:12in
  11817. 10:32:13here you will have also noner numbers
  11818. 10:32:16numbers let's say seven
  11819. 10:32:18uh 10 uh
  11820. 10:32:208 and I'm just writing these numbers
  11821. 10:32:22randomly so of course in a real case
  11822. 10:32:25when we have this Matrix a and we go
  11823. 10:32:27through this process of QR de
  11824. 10:32:28composition of course we will have an
  11825. 10:32:30appropriate q and appropriate R where
  11826. 10:32:33these numbers will be different and they
  11827. 10:32:35will be specific numbers that we will be
  11828. 10:32:39calculating but the idea is that we need
  11829. 10:32:41to get this upper triangular Matrix R
  11830. 10:32:45for this calculation to make sense
  11831. 10:32:48so we will then be using this qard
  11832. 10:32:50composition for solving linear um linear
  11833. 10:32:54Le squares problems for instance which
  11834. 10:32:56is part of the linear regression too
  11835. 10:33:00because linear regression from machine
  11836. 10:33:03learning and from statistics uh it is
  11837. 10:33:06based on the least Square technique the
  11838. 10:33:10estimation technique that we are using
  11839. 10:33:12for linear regression in machine
  11840. 10:33:14learning um to solve this linear
  11841. 10:33:17regression problem is called Ordinary
  11842. 10:33:19leas squares so the algorithm is based
  11843. 10:33:21on this idea of Le squares which is
  11844. 10:33:23trying to minimize a squared uh
  11845. 10:33:26residuales of the morel and that can be
  11846. 10:33:29done by using this idea of QR
  11847. 10:33:34decomposition so it helps us to provide
  11848. 10:33:37numerically stable solutions for this
  11849. 10:33:39type of problems too and C de
  11850. 10:33:41composition is used extensively in
  11851. 10:33:44Signal processing and statistical
  11852. 10:33:46analysis
  11853. 10:33:49let's now briefly talk about the L
  11854. 10:33:51decomposition so L decomposition
  11855. 10:33:53decomposes a matrix into lower
  11856. 10:33:56triangular Matrix so this is the
  11857. 10:33:58opposite of what we had before we can
  11858. 10:34:00have an upper
  11859. 10:34:03triangular
  11860. 10:34:05triangular
  11861. 10:34:07Matrix like we had in the QR the
  11862. 10:34:11composition we can also have a lower
  11863. 10:34:13triangular Matrix so you might have
  11864. 10:34:15already guessed how it will look like I
  11865. 10:34:17want go into that very soon in the QR
  11866. 10:34:20composition example you will see the
  11867. 10:34:22idea of the upper triangular I will also
  11868. 10:34:25show the idea of a lower
  11869. 10:34:27triang so the composition in case of Lu
  11870. 10:34:32uh is done by decomposing a matrix into
  11871. 10:34:36lower triangular Matrix l and an upper
  11872. 10:34:39triangular Matrix U so basically the
  11873. 10:34:43difference between the QR de composition
  11874. 10:34:46and L de composition is that in the QR
  11875. 10:34:49DEC composition we are decomposing a
  11876. 10:34:51matrix into orthogonal Matrix and an
  11877. 10:34:53upper triangular Matrix while in case of
  11878. 10:34:56L DEC composition we are decomposing a
  11879. 10:34:59matrix into lower triangular Matrix and
  11880. 10:35:02an upper triangular Matrix so here you
  11881. 10:35:05can see that we no longer have this idea
  11882. 10:35:06of orthogonal matrix but instead of that
  11883. 10:35:09we are talking about lower triangle
  11884. 10:35:13Matrix so in that aspect uh L U the
  11885. 10:35:17composition is different from QR DEC
  11886. 10:35:19composition so what the L de composition
  11887. 10:35:22does is that it facilitates the solving
  11888. 10:35:25of linear equations and Matrix
  11889. 10:35:27inversions it is common in engineering
  11890. 10:35:30and in physical sciences for systems of
  11891. 10:35:33this linear equation to be solved by
  11892. 10:35:35using lud de composition and in fact if
  11893. 10:35:38you are learning Quantum uh mechanics
  11894. 10:35:41that this L decomposition can definitely
  11895. 10:35:45help you to better understand many
  11896. 10:35:46Concepts but if your target fields are
  11897. 10:35:49machine learning deep learning or
  11898. 10:35:51artificial intelligence then for those
  11899. 10:35:54using QR composition will be uh much
  11900. 10:35:57more often a case than using this lud de
  11901. 10:36:03composition let's now talk about the
  11902. 10:36:05singular value decomposition so what the
  11903. 10:36:08SVD does is that it decomposes a matrix
  11904. 10:36:11into three matrices so first one is the
  11905. 10:36:16orthogonal Matrix C
  11906. 10:36:19the second one is a diagonal
  11907. 10:36:22matrix and then the third one is this V
  11908. 10:36:26which is the conjugate transpose of an
  11909. 10:36:28orthogonal
  11910. 10:36:30Matrix so for now this might s bit
  11911. 10:36:34complex and you can see that unlike the
  11912. 10:36:36QR or Lu de composition where we got
  11913. 10:36:39just uh two uh matrices as a result of
  11914. 10:36:42our decomposition in case of SD we got
  11915. 10:36:45three matrices like the name suggests
  11916. 10:36:47two by the way so three
  11917. 10:36:54parts and this might seem bit complex
  11918. 10:36:57but we are going to go through this
  11919. 10:37:00process step by step and I'm going to
  11920. 10:37:02provide you detailed example such that
  11921. 10:37:04this will all make sense but for now
  11922. 10:37:07let's focus at the high level usage of
  11923. 10:37:09SVD so singular value decomposition is
  11924. 10:37:13one of the most popular decomposition
  11925. 10:37:15techniques and it is also Direct Al used
  11926. 10:37:18as part of machine learning algorithms
  11927. 10:37:20to form uh those machine learning
  11928. 10:37:22algorithms it is also used in the data
  11929. 10:37:25compression in the noise reduction so
  11930. 10:37:27when we are trying to clean our data and
  11931. 10:37:30remove the Noise by using SVD because
  11932. 10:37:32SVD can help us to identify those
  11933. 10:37:34outliers and then remove them from the
  11934. 10:37:37data by performing noise
  11935. 10:37:40reduction and it is also used in the
  11936. 10:37:42principal component analysis the
  11937. 10:37:45PCA the uh same dimensionality reduction
  11938. 10:37:48technique that I just uh mentioned
  11939. 10:37:51related to the ion de composition
  11940. 10:37:53because SVD and the igon de composition
  11941. 10:37:55are highly related to each other so this
  11942. 10:37:58SVD is used as part of this PCA
  11943. 10:38:00algorithm and PCA is the most popular
  11944. 10:38:04the infamous dimensionality reduction
  11945. 10:38:07technique that is used both in the
  11946. 10:38:09advanced statistical studies in the
  11947. 10:38:11statistics in general also in finance
  11948. 10:38:14and is also used as part of many machine
  11949. 10:38:16learning and deep learning applications
  11950. 10:38:19so knowing PCA is a must if you want to
  11951. 10:38:22get into uh data analytics or data
  11952. 10:38:24science machine learning and AI but
  11953. 10:38:29also uh it helped you it will help you
  11954. 10:38:31also to uh understand uh many other
  11955. 10:38:35Concepts when it comes to this Fields so
  11956. 10:38:38the SVD provides insight into the
  11957. 10:38:40structure but also the rank of the
  11958. 10:38:42Matrix so we are going to see this as
  11959. 10:38:44part of our example too
  11960. 10:38:47let's now also briefly talk about the
  11961. 10:38:49igen dec composition so igen DEC
  11962. 10:38:52composition which is highly related to
  11963. 10:38:54this concept of igen values and ion
  11964. 10:38:56vectors it decomposes a matrix into this
  11965. 10:38:59ion values and ion vectors which then
  11966. 10:39:02shows the matrix's fundamental
  11967. 10:39:05properties which are related to this
  11968. 10:39:06idea of correlation what kind of
  11969. 10:39:08information does this uh Matrix contain
  11970. 10:39:11what is the variation in what direction
  11971. 10:39:13is the variation the largest and this
  11972. 10:39:16icon that composite which is then
  11973. 10:39:18related to also this idea of SVD and in
  11974. 10:39:21general this dimensions and correlations
  11975. 10:39:24is critical for understanding linear
  11976. 10:39:26Transformations the stability analysis
  11977. 10:39:29and systems of differential
  11978. 10:39:32equations but beside this uh
  11979. 10:39:35mathematical side of uh Concepts and
  11980. 10:39:38understanding these mathematical topics
  11981. 10:39:41the ion de composition is also the basis
  11982. 10:39:43for many algorithms in numerical deor
  11983. 10:39:46algebra
  11984. 10:39:48uh but also many applied linear algebra
  11985. 10:39:50topics like in the data science in
  11986. 10:39:53machine learning and it's used heavily
  11987. 10:39:55in artificial intelligence for feature
  11988. 10:39:58extraction for dimensionality reduction
  11989. 10:40:01related again to the concept of PCA
  11990. 10:40:03because PCA is based entirely on this
  11991. 10:40:06concept of IG de composition PCA is the
  11992. 10:40:10direct result of computing the igon
  11993. 10:40:14values and igon vectors
  11994. 10:40:21so without knowing what are Dion values
  11995. 10:40:24and ion vectors you cannot perform PCA
  11996. 10:40:26because the first step of the PCA is the
  11997. 10:40:30computation of the icon values and icon
  11998. 10:40:32vectors and then using different rules
  11999. 10:40:34which we are referring uh as the elbow
  12000. 10:40:37rule or Kaiser rule we can then use this
  12001. 10:40:40icon values and icon vectors to
  12002. 10:40:43understand what are the features in our
  12003. 10:40:45data that contain the most
  12004. 10:40:48variation so the most information and
  12005. 10:40:52then we can use that in order to
  12006. 10:40:54understand what are the most important
  12007. 10:40:56features in our data and reduce the
  12008. 10:40:59dimension of our model by selecting this
  12009. 10:41:02most important features because what PCA
  12010. 10:41:05basically does is that it it uses these
  12011. 10:41:08icon values and icon vectors to
  12012. 10:41:10understand how we can uh create a linear
  12013. 10:41:13combination out of our features and
  12014. 10:41:16understand the the amount of those
  12015. 10:41:19linear combinations that contain the
  12016. 10:41:21most variation and then select those and
  12017. 10:41:24uh select the largest amount of
  12018. 10:41:27information in the data and then Skip
  12019. 10:41:30and drop those uninformative being your
  12020. 10:41:33combinations while still keeping the
  12021. 10:41:35most information and this definition of
  12022. 10:41:38the most will then be decided by this
  12023. 10:41:40differentials this is just higher level
  12024. 10:41:42Insight background information on what
  12025. 10:41:44you can expect when you are talking
  12026. 10:41:46about applying this highly technical
  12027. 10:41:50linear algebra concept of Icon de
  12028. 10:41:52composition into an applied science
  12029. 10:41:55Fields like data science or machine
  12030. 10:41:57learning or AI but we will see this
  12031. 10:41:59later and I'll also make comments
  12032. 10:42:01regarding this and though PCA won't be
  12033. 10:42:05discussed as part of this course because
  12034. 10:42:07here we are talking about linear algebra
  12035. 10:42:09but PCA is part of the fundamentals
  12036. 10:42:12statistics course and in there we are no
  12037. 10:42:15longer providing all these different
  12038. 10:42:17details on how you can uh perform this I
  12039. 10:42:20composition therefore knowing how to
  12040. 10:42:23perform I composition will then set you
  12041. 10:42:27for success to actually understand the
  12042. 10:42:30mathematics behind the statistical
  12043. 10:42:32Concepts like PCA and also later on
  12044. 10:42:37understand how you can use that PCA in a
  12045. 10:42:39machine learning Concepts and in AI
  12046. 10:42:42Concepts like outo encoders and how you
  12047. 10:42:44can relate your um out to encoders to
  12048. 10:42:48this concept of PCA how they are related
  12049. 10:42:50what are their commonalities and what
  12050. 10:42:52are their
  12051. 10:42:55differences so everything is about the
  12052. 10:42:58choice and choosing the right tool for
  12053. 10:43:01your problem when it comes to the
  12054. 10:43:03decomposition tools metrix authorization
  12055. 10:43:05tools we have seen that there are many
  12056. 10:43:07options and the question is which one
  12057. 10:43:09should we pick in what cases so choosing
  12058. 10:43:11the right tool is really important when
  12059. 10:43:13it comes to this different metrix
  12060. 10:43:15factorization techniques because they
  12061. 10:43:16are many choices and each of them they
  12062. 10:43:19can be used for different sorts of
  12063. 10:43:21problems so therefore in order to
  12064. 10:43:24understand which one you need to pick in
  12065. 10:43:27what kind of cases what kind of
  12066. 10:43:28requirements you have and what kind of
  12067. 10:43:30solve uh problem you are trying to solve
  12068. 10:43:33that in those cases you will need to
  12069. 10:43:36have this knowledge that you will learn
  12070. 10:43:38as part of this course in order to make
  12071. 10:43:40that right choice of the
  12072. 10:43:43twool so the choice among Q are the
  12073. 10:43:46composition
  12074. 10:43:47the L de composition the SVD and IG de
  12075. 10:43:50composition it really depends on your
  12076. 10:43:53specific problems requirements and the
  12077. 10:43:55data characteristics so are you dealing
  12078. 10:43:57with a complex data are you dealing with
  12079. 10:44:00a simple data with low Dimensions what
  12080. 10:44:03is the goal that you uh want to uh
  12081. 10:44:06achieve what is the problem that you are
  12082. 10:44:07trying to solve is it to uh reduce the
  12083. 10:44:11dimension of your feature space is it to
  12084. 10:44:15solve a problem with linear
  12085. 10:44:17equations is it to solve a quantum
  12086. 10:44:20mechanics problem or is it to um
  12087. 10:44:24incorporate this as part of your machine
  12088. 10:44:27learning algorithm so QR and LU DEC
  12089. 10:44:30compositions are usually preferred for
  12090. 10:44:32solving linear systems while SVD and I
  12091. 10:44:35Anda compositions they help us for
  12092. 10:44:37deeper insights when it comes to the
  12093. 10:44:39data and what kind of information it
  12094. 10:44:41contains how we can reduce the dimension
  12095. 10:44:44of the data or how we can use it as part
  12096. 10:44:47of machine learning algorithm for uh
  12097. 10:44:49noise reduction identifying outliers Etc
  12098. 10:44:53so um this type of algorithms like SVD
  12099. 10:44:57and ion de composition it helps us to
  12100. 10:44:59also uh intuitively using geometry and
  12101. 10:45:03our knowledge of geometry to um
  12102. 10:45:06visualize the data for instance the PCA
  12103. 10:45:08helps us to visualize this High
  12104. 10:45:10dimensional data using just couple of
  12105. 10:45:13principal components let's say we have
  12106. 10:45:1510 features in our
  12107. 10:45:17model so we have a dimension of 10 we
  12108. 10:45:21are in r10 but we want to visualize our
  12109. 10:45:24data by using PCA we can then reduce the
  12110. 10:45:26dimension and come up with uh three
  12111. 10:45:29principal components which are a linear
  12112. 10:45:31combination of our original 10 vectors
  12113. 10:45:34and then we can use the three principal
  12114. 10:45:36components to visualize our data in
  12115. 10:45:393D and this basically helps us to
  12116. 10:45:42geometrically visualize our data and
  12117. 10:45:45then make presentation s make much more
  12118. 10:45:48sense of our story so to do uh
  12119. 10:45:50storytelling for our data and uh much
  12120. 10:45:53more and these two uh models and tools
  12121. 10:45:58they are invaluable when it comes to uh
  12122. 10:46:01applications in machine learning in deep
  12123. 10:46:03learning in data science and artificial
  12124. 10:46:06intelligence
  12125. 10:46:08so meing factorization techniques they
  12126. 10:46:10are super important when it comes to
  12127. 10:46:12computational mathematics they are also
  12128. 10:46:15directly affecting the data science Ai
  12129. 10:46:17and many other algorithms so they are
  12130. 10:46:19not only important in terms of the
  12131. 10:46:21problem that they are trying to solve
  12132. 10:46:23but also in order to make the
  12133. 10:46:24computation process so when coding in
  12134. 10:46:27python or in other programming languages
  12135. 10:46:30to make that process much more efficient
  12136. 10:46:33they also help us to uh make these
  12137. 10:46:35computations efficient and provide
  12138. 10:46:37insights into different properties that
  12139. 10:46:40we have in our
  12140. 10:46:42data as part of this course we are not
  12141. 10:46:45only going to discuss one but actually
  12142. 10:46:48three of these four the composition
  12143. 10:46:51techniques and this metrix factorization
  12144. 10:46:53techniques in detail we are going to
  12145. 10:46:55talk about the qard de composition we
  12146. 10:46:58are going to not just discuss it but uh
  12147. 10:47:01also to learn it step by step and we are
  12148. 10:47:04going to do a detail example with all
  12149. 10:47:07the steps involved such that you will
  12150. 10:47:09feel confident doing a QR decomposition
  12151. 10:47:12all by yourself then we are also going
  12152. 10:47:15to do an SVD de comp position as well as
  12153. 10:47:18ion the composition and then we are
  12154. 10:47:21again going to discuss them in terms of
  12155. 10:47:23their mathematical formulation the
  12156. 10:47:25definition but also the application
  12157. 10:47:27step-by-step process and a detailed
  12158. 10:47:30example such that you can conduct each
  12159. 10:47:32of those metric factorization techniques
  12160. 10:47:34and these decomposition techniques by
  12161. 10:47:36yourself manually doing all these
  12162. 10:47:39calculations this understanding and this
  12163. 10:47:42examples and this Concepts will help you
  12164. 10:47:44to not just be able to formulate what
  12165. 10:47:47these techniques are about but really
  12166. 10:47:49and truly understand and then use them
  12167. 10:47:53later on whether when doing your own
  12168. 10:47:55research writing scientific papers or
  12169. 10:47:58tweaking the algorithm all by yourself
  12170. 10:48:00when inventing new
  12171. 10:48:03algorithms I won't be discussing this L
  12172. 10:48:06de composition technique because we
  12173. 10:48:08already know uh that the QR and LU they
  12174. 10:48:11are both used for similar type of
  12175. 10:48:13problems therefore to save us time I
  12176. 10:48:16have selected carefully the uh most
  12177. 10:48:20important the composition techniques and
  12178. 10:48:22Metric factorization techniques that you
  12179. 10:48:25will most likely be dealing with will be
  12180. 10:48:27dealing with in your future career in
  12181. 10:48:29applied sciences

About this transcript

This page contains the full transcript of Linear Algebra for Machine Learning by freeCodeCamp.org, generated from the public captions YouTube serves with the video. The transcript has 86,865 words across 12,181 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.