\[ A=\begin{pmatrix} 1 & 2 & 3\\ 2 & 4 & 6\\ 3 & 6 & 9\\ 4 & 8 & 12\\ \end{pmatrix}\]
e<-matrix(c(1,2,3,2,4,6,3,6,9,4,8,12),ncol = 3, byrow = T)
e
## [,1] [,2] [,3]
## [1,] 1 2 3
## [2,] 2 4 6
## [3,] 3 6 9
## [4,] 4 8 12
\[ A=\begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\\ \end{pmatrix}\]
Para la realizacion de este ejercicio se utiliza la funcion (diag) ya que la misma hace que construya una diagonal con los numeros que dictemos
D<-diag(c(1,1,1,1))
D
## [,1] [,2] [,3] [,4]
## [1,] 1 0 0 0
## [2,] 0 1 0 0
## [3,] 0 0 1 0
## [4,] 0 0 0 1
\[ L=\begin{pmatrix} 1 & 2 & -4\\ -1 & -1 & 5\\ 2 & 7 & -3\\ \end{pmatrix}\]
I <- matrix(c(1,2,-4,-1,-1,5,2,7,-3), ncol = 3, byrow = T)
I
## [,1] [,2] [,3]
## [1,] 1 2 -4
## [2,] -1 -1 5
## [3,] 2 7 -3
#Instalacion del paquete <matlib> y su visualizacion de descarga
#install.packages("matlib")
library(matlib)
## Warning in rgl.init(initValue, onlyNULL): RGL: unable to open X11 display
## Warning: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'.
#Se determina la matriz inversa con la función "solve"
E<-solve(I)
E
## [,1] [,2] [,3]
## [1,] -16.0 -11.0 3.0
## [2,] 3.5 2.5 -0.5
## [3,] -2.5 -1.5 0.5
\[ P=\begin{pmatrix} 1 & 2 & 3 & 0 & 2\\ 2 & 4 & 6 & 0 & 3\\ 3 & 6 & 9 & 0 & 5\\ 4 & 8 & 12 & 0 & 7\\ 5 & 10 & 15 & 5 & 11\\ 6 & 12 & 18 & 5 & 13\\ 7 & 14 & 21 & 5 & 17\\ 8 & 16 & 24 & 5 & 19\\ 9 & 18 & 27 & 5 & 23\\ \end{pmatrix}\]
## Como primer paso se debe instalar el paquete readxl para que R pueda leer archivos de Excel
#install.packages("readxl")
library(readxl)
## Como segundo paso nosotros tenemos que hacer es buscar nuestro archivo de Excel
#file.choose()
## Como tercer paso copiamos la localizacion del archivo y le asignamos una variable, es asi que se importaran los archivos de Excel
#matriz_ruta<- readxl::read_xls("C:\Users\SISTEMA\Downloads")
#matriz_excel<- data.matrix(matriz_ruta)
## Como cuarto paso visualizamos nuestra matriz exportada
#as.matrix(matriz_excel)
\[ \begin{cases} x + 5y & = 7 \\ -2x - 7y &= -5 \\ \end{cases} \]
a<-matrix(c(1,-2,5,-7), ncol = 2, nrow = 2)
a
## [,1] [,2]
## [1,] 1 5
## [2,] -2 -7
b<-c(7,-5)
b
## [1] 7 -5
Usamos la funcion de
solve(a,b)
## [1] -8 3
\[A=\begin{pmatrix} 1 & 4 & 9\\ 7 & 2 & 5\\ 6 & 8 & 3\\ \end{pmatrix}\\ |A|= (1*2*3)\\ + (4*5*6)\\ + (7*8*9)\\ - (9*2*6)\\ - (4*7*3)\\ - (5*8*1)\\ = 6+ 120 + 504 - 108 - 84 -40\\ = 398\]
A<-matrix(c(1,7,6,4,2,8,9,5,3), ncol = 3, byrow = F)
A
## [,1] [,2] [,3]
## [1,] 1 4 9
## [2,] 7 2 5
## [3,] 6 8 3
#Realizamos la operacion para el resultado de la misma nos de <398> usando la funcion <det>
det(A)
## [1] 398
\[A=\begin{bmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9\\ \end{bmatrix} A^T=\begin{bmatrix} 1 & 4 & 7\\ 2 & 5 & 8\\ 3 & 6 & 9\\ \end{bmatrix}\]
B<-matrix(c(1,4,7,2,5,8,3,6,9),3,3)
B
## [,1] [,2] [,3]
## [1,] 1 2 3
## [2,] 4 5 6
## [3,] 7 8 9
#Damos creacion a una nueva matriz la cual va a ser la transpuesta
B1<-t(B)
B1
## [,1] [,2] [,3]
## [1,] 1 4 7
## [2,] 2 5 8
## [3,] 3 6 9