Currently, science is growing, with this development strength, the application of science and scientific patents in schools is very feasible and significant. Since the first year, Ho Chi Minh City University of Technology lecturers have helped technical students get acquainted with programming applications such as MATLAB. MATLAB is a rising and programming environment that allows calculating numbers with matrices, graphing functions or charting information, implementing algorithms, creating user interfaces, and linking to computer programs written in many other programming languages. MATLAB enables simulation of calculations with the Toolbox library, experimenting with many models in practice and techniques. With more than 40 years of establishment and development, MATLAB is an effective calculation tool to solve technical problems today with a relatively simple and universal design. Therefore, for the problems in Algebra, especially matrix problems, we can use MATLABs computing applications to solve most simply and understandably, helping us get acquainted and add more skills to use programs application for students.
HCMC University of Technology Department of Applied Mathematics MATLAB Exercises Subject: Linear Algebra Introduction Currently, science is growing, with this development strength, the application of science and scientific patents in schools is very feasible and significant Since the first year, Ho Chi Minh City University of Technology lecturers have helped technical students get acquainted with programming applications such as MATLAB MATLAB is a rising and programming environment that allows calculating numbers with matrices, graphing functions or charting information, implementing algorithms, creating user interfaces, and linking to computer programs written in many other programming languages MATLAB enables simulation of calculations with the Toolbox library, experimenting with many models in practice and techniques With more than 40 years of establishment and development, MATLAB is an effective calculation tool to solve technical problems today with a relatively simple and universal design Therefore, for the problems in Algebra, especially matrix problems, we can use MATLAB's computing applications to solve most simply and understandably, helping us get acquainted and add more skills to use programs application for students Solutions 1+i √ 1+ i 1+i √ ( 1+i √ ) ( 1−i ) 1+ √ 3−i−i √ 1+ √ √ 3−1 z= = = = +i 1+ i 1+1 2 Question 1: Find the argument, module of z= Question 2: Find the argument, module of z = (1+i√ 3) (1-i) Z = (1+i√ 3) (1-i) Z = 1+√ + (-1+√ ¿i |z|= 2√ Arg (z) = arccos ( √ π +√ )= 12 Question 3: Find the argument, module of z = z= (−1+i √ 3)(1+i) −1−i+ i √ 3− √ −1− √ √ 3−1 = = + i (1−i)(1+i) 2 3−1 11 π Angle(z) = φ=cos−1 √ = 2√2 12 1|51 −1+ i √ 1−i Abs(z) =|z|= √( −1−√ + )( √ 3−1 =√ 2 ) Question 4: Solve the equation in the set of complex numbers z 2= ´z z 2= ´z (a + bi)(a + bi) = a – bi a2 + 2abi – b2 = a – bi [ a2−b2=a 2ab=−b [ [[ b=± [ √ a=1 a=0 −1 b=0 a= [ z= −1 ± i z=1 z =0 √ Question 5: Solve the equation in the set of complex numbers z 2=z− ´z z=x + yi, ´z =x− yi z 2=z− ´z ↔ ( x + yi) =x+ yi−( x− yi) ↔ x 2+ xyi− y 2=2 yi 2 x=±1 x=0 ↔ x − y =0 ↔ , x=1 y=0 xy=2 y { { { The solution to the complex equation is z=0, z=1-i and z=1+i (22 Question 6: A= −1 −1 ; B= Find C = AT B, trace of C, −1 −1 −1 ) ( rank of C, det of C A= 2−1 ; B= 26−1 21 3−1 −1 0−1 ( 2|51 ) ( ) ) 2 10 −4 −1 1 −1 −2 0 c3 → c4 C= A B= = −1 −1 17 −7 r → r → −1 −4 ( )( ( ) 0 ( ) T 17 −7 −2 r +r → r 35 42 10 −4 19 r + r →r −95 38 → ( 0 17 −7 −2 −6 2r +r → r 10 −4 −6 r +r → r → −4 ) ( ) ( 17 −7 35 42 19 r + r → r −16 → 152 0 17 −7 35 42 0 −16 0 0 ) ) So, rank(C) = and det(C) = 0 −4 −1 −4 Question 7: A= Prove that rank(A) =rank(A.AT)=rank(AT.A) −10 −4 −1 −4 A= −10 ( −4 A= −1 −4 ( ( ( ) ) ) ) −1 −4 A= −4 ⇒rank 0 −3 −1 0 A = −4 −4 −3 t ( ) 35 28 21 A*A = −60 63 ⇒ rank 53 36 t ( −5 12 ⇒ rank At*A= −8 5 ( ) ) −1 2 1 T , B= ,C= −1 1 Find AC−(CB) −1 −2 −1 −1 ( Question 8: A= 3|51 ) ( ) ( ) AC 11 =( ) −1 =1.2+2 (−1 ) +1.0=0 () () () () () () AC 12=( ) =1.1+ 2.1+ 1.2=5 ( ) AC 13= =1.0+2.1+1 (−1 )=1 −1 AC 21=(−1 −2 ) −1 =(−1 ) 2+1 (−1 )+ (−2 ) 0=−3 AC 22=(−1 −2 ) =(−1 ) 1+ 1.1+ (−2 ) 2=−4 AC 23=(−1 −2 ) =(−1 ) 0+1.1+ (−1 ) (−2 )=3 −1 Therefore : AC = (−60 → AC= (−30 −4 10 −8 ) ) −1 ( ) CB 11= =2 (−1 )+1.0+ (−1 )=−2 −1 () () () () CB 12=( ) =2.2+1.2+0.1=6 −1 CB 21=(−1 1 ) =(−1 ) (−1 ) +1.0+1 (−1 )=0 −1 CB 22=(−1 1 ) =(−1 ) 2+1.2+1.1=1 4|51 −1 CB 31=( −1 ) =0 (−1 ) +2.0+ (−1 ) (−1 )=1 −1 () () ( ) CB 32=( −1 ) =0.2+2.2+ (−1 ) 1=3 −2 Therefore :CB= 1 → ( CB )T = −2 ( ) 10 → AC −( CB )T = 10 − −2 = −6 −8 6 −12 −9 ( )( Question 9: A = −1 ( )( ) 1 −1 Find m such that A is invertible 2 m ) 1 1 1 det(A) = −1 + −1 - 3 2 m 2 m −1 | || | | | |12 m2| + |32 m4| + 2|31 42| + |12 m2| + |12 m1| + 2|11 12| + =2 = 2(m – 4) + (3m – 8) + 2(6 – 4) + (m – 4) + (m – 2) + 2(2 – 1) + = 7m – 13 A is invertible => det(A) ≠ m≠ 13 Question 10: ( Find the inverse of 1 2 1 = = A 1 0 5|51 )( ) ( ) ( 1 1 0 )( ) 21 21 −1 ( A| E ) = 1 r →r→1 −r 1 −1 r →r→1 −2r 1 −1 −1 → A ( | ) =(−1 ) −1 ( | ) ( | ) 1 Question 11: A= Find f(A); with f(x) = x2 - 2x - −1 ( ) 1 A= Find f ( A)= A 2−2 A−3 −1 ( ) 12 1 0 11 f ( A)= −2 −3 = 11 5 −1 −1 0 −1 ( ) ( ( ) ( )( ) ( ) ) −2 1 −1 Question 12: A= , B= Find m such that AB is invertible 1 1 m −13 −13+ m −1 m AB= 2+ m ( ) Det (AB)= [-9(2+m)-208m+27(-13+6m)]-[-4(-13+6m)]-117(2+m)+108m]≠0 m≠ −17 17 (35 −1 X= −2 ) ( ) −1 det( =-1 −2 ) −1 A =( −3 ) X=A *B=( 6) -1 -1 6|51 −1 Question 13: A= Find PA ( +3 det ( A )=(−1) ) |24 13|+(−1) |−12 31|=2.2−7=−3 3+3 −1 0 −3 −2 −1 0 r =r −2 r ( A|I )= 0 r 1=r (−1) 0 2 → 3−4 r 10 0 r 3=r→ | ) ( | ( ) −3 −2 −1 0 −3 −2 −1 0 r 2=r −2/5r 2/5 /5 −2/5 r 3=r 3−15 r → → 15 15 ( | ( | ( | ( | ( ) | ( ) −3 −2 −1 0 −3 −2 −1 0 2/5 2/5 −2/5 r 3=1/3 r /5 2/5 −2/5 r 2=r 2−2 /5 r → → 0 −2 −15 0 −2/3 −5 7/3 ) ) | | ( ) ) −3 −2 −1 0 −3 −7 /3 −10 14 /3 r =r +2 r 2/3 −4 /3 1 2/3 −4 / r 1=r 1+ r → → 0 −2/3 −5 7/3 0 −2 /3 −5 /3 ( 0 −1/3 −1 2/3 −1 2/3 −4 /3 =( I| A ) 0 −2/3 −5 7/3 −1/3 −1 2/3 → A−1= 2/3 −4 /3 −2/3 −5 7/3 ) ) −1 /3 −1 2/3 −2 P A =det ( A ) × A =−3 × /3 −4 /3 = −2 −9 −2 /3 −5 7/3 15 −7 −1 ( )( ) )( ) ) 1 1 Question 14: Find m such that m is invertible −1 ( 1 1 10 14 10 A = m = 8+ m 11+7 m 8+5 m −1 2 ( )( (|1114+7 m det(A) = 7|51 ) ( 10 8+5 m | −|8+510m 10 8+ m | +|8+105 m 14 11+7 m |) = ∀m A is singular with all m Question 15: A= Find PA −1 ( ) det ( A )= =8 , P A =det ( A ) A−1 −1 | | 1 0 r →−3 r +r 2 1 0 A | E 0 −1 −3 = ( ) r →−5 r +2 r → −1 0 −9 −7 −5 | ) ( | ( | ( ) 1 0 4 −2 r →−r 1−r 2 r → 9r 2−r −1 −3 r →−16 r 2−r −16 −26 14 → → 0 16 −22 18 −2 0 16 −22 18 −2 r → r +r → ( ) −5 r → r /8 0 0 −10 13 −16 −26 14 r →r /(−16) 0 16 −22 18 −2 r → r /16 0 −11 → −5 13 −1 → A = −11 | −7 −5 4 −1 13 −1 → P A =det ( A ) A =8 8 −1 −11 8 1 Question 16: Reduce the matrix 3 ( ( ( ) Question 17: Solve the equation (35 −1 X= −2 8|51 −7 ) ( ) −7 −1 −1 ) ( (35 −10 −1 = 13 −7 −1 −11 −1 −1 to the row echelon form −2 r +r →r 1 1 21 2 45 −r +r →r 3 → −3 r 1+→r →r 0 03 ) ) ( | ) ( )( ) ) ( ) 1 3 | ( ) −1 X= −2 ) ( ) =-1 (35 −1 −2 ) −1 A =( −3 ) X=A *B=( 6) det -1 -1 −8 23 −30 Question 18: Solve the equation −5 X= −2 −26 −16 ( −8 X = −5 ( ( −1 23 −30 −2 −26 −16 )( ) ( ) ) −8 0 −5 1 −5 = = −5 0 −8 0 −3/8 −1/8 0 80 13 −10 −2 0 −41/8 13 /8 −2 | )( −1 −3 8 −13 41 ( | −5 ¿ 0 | 0 16 41 −8 41 ) −5 117 /41 −103 /41 72/ 41 ¿ −10/41 / 41 −3/ 41 0 −13/41 16 /41 −8/ 41 ( | ( | ( 0 67/ 41 −73/41 57 /41 ¿ −10/41 / 41 −3/41 0 −13/41 16 /41 −8/41 ) ) 67 /41 −73/41 57 /41 23 −30 775/ 41 X = −10/41 /41 −3/41 −2 −26 = −194 / 41 −13/41 16 /41 −8/41 −16 −203/ 41 −2 9|51 | )( )( )( ) ) ¿7 ¿6 Question 19: Find the NUMBER of solutions of this system ¿ ¿ ¿8 47 7 2 36 −4 −5 −4 => => 27 0 5 18 −1 0 5 |) ( ( => |) ( ( |) −4 0 0 |) −5 −4 5 0 The system corresponding to this matrix is: { x1 +2 x 2+3 x +4 x 4=7 x 2−4 x3 −5 x =−4 x +5 x 4=5 x4 = α, where α ∈ R, we can find x3 = – 5x4 = - 5α x2 = -4 + 4x3 + 5x4 = -4 + 4(5 - 5α) + 5α = 16 - 15α x1 = – 2x2 – 3x3 – 4x4 = – 2(16 - 15α) – 3(5 - 5α) - 4α = -40 + 41α So the system has infinitely many solutions (x1, x2, x3, x4)T = (-40 + 41α, 16 15α, - 5α, α)T, where α ∈ R is arbitrary number Question 20: Find the NUMBER of solutions of this system { x1 +2 x 2−3 x3 +5 x =1 x1 +3 x 2−13 x 3+22 x =−1 x +5 x 2+ x 3−2 x =5 x +3 x 2+ x 3−7 x 4=4 r → r 1−r ´ (|) r → r 1−r (|) A=¿ r → r 1−r → → (10 10 | −3 ´ ) =2 → r(A −1 10 −17 |)