commit 0cbaf116a9bd627d5ebb3b9ea68b595835e1bdd7 from: Ale date: Thu Feb 5 03:22:42 2026 UTC Actualiza notebooks EV01 commit - 95da677639058458bfaf1b6edc1efebfa81f313e commit + 0cbaf116a9bd627d5ebb3b9ea68b595835e1bdd7 blob - 556974ac152d456ec9562379f33f6f8f0c3c910e blob + 08b3fabea73d7fb950603b14fe2c4a5c808d96fb --- NoteBooks/Ejercicios_en_clase.ipynb +++ NoteBooks/Ejercicios_en_clase.ipynb @@ -6,8 +6,8 @@ "metadata": { "id": "5b961fbd-fa2f-4a24-9d18-14b15b196c93", "ExecuteTime": { - "end_time": "2026-01-31T18:43:08.670040353Z", - "start_time": "2026-01-31T18:43:08.279132549Z" + "end_time": "2026-02-02T19:05:47.332334799Z", + "start_time": "2026-02-02T19:05:46.968475077Z" } }, "source": [ @@ -61,8 +61,8 @@ "height": 78 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:08.725145872Z", - "start_time": "2026-01-31T18:43:08.673194042Z" + "end_time": "2026-02-02T19:05:47.383601077Z", + "start_time": "2026-02-02T19:05:47.349617088Z" } }, "source": [ @@ -114,8 +114,8 @@ "base_uri": "https://localhost:8080/" }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:08.755522723Z", - "start_time": "2026-01-31T18:43:08.738236786Z" + "end_time": "2026-02-02T19:05:47.431267435Z", + "start_time": "2026-02-02T19:05:47.392697388Z" } }, "source": [ @@ -169,8 +169,8 @@ "height": 413 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:09.502784637Z", - "start_time": "2026-01-31T18:43:08.774103553Z" + "end_time": "2026-02-02T19:05:48.010959931Z", + "start_time": "2026-02-02T19:05:47.432930759Z" } }, "source": [ @@ -272,8 +272,8 @@ "height": 78 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:09.745640012Z", - "start_time": "2026-01-31T18:43:09.549570123Z" + "end_time": "2026-02-02T19:05:48.103277645Z", + "start_time": "2026-02-02T19:05:48.048999645Z" } }, "source": [ @@ -320,8 +320,8 @@ "height": 78 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.053141760Z", - "start_time": "2026-01-31T18:43:09.913846210Z" + "end_time": "2026-02-02T19:05:48.170280229Z", + "start_time": "2026-02-02T19:05:48.130801410Z" } }, "source": [ @@ -368,8 +368,8 @@ "height": 78 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.157696692Z", - "start_time": "2026-01-31T18:43:10.089302515Z" + "end_time": "2026-02-02T19:05:48.233518225Z", + "start_time": "2026-02-02T19:05:48.174495130Z" } }, "source": [ @@ -449,8 +449,8 @@ "height": 58 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.195401554Z", - "start_time": "2026-01-31T18:43:10.161100983Z" + "end_time": "2026-02-02T19:05:48.333237134Z", + "start_time": "2026-02-02T19:05:48.246010947Z" } }, "source": [ @@ -497,8 +497,8 @@ "height": 58 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.361825919Z", - "start_time": "2026-01-31T18:43:10.197993833Z" + "end_time": "2026-02-02T19:05:48.510086403Z", + "start_time": "2026-02-02T19:05:48.349097451Z" } }, "source": [ @@ -537,8 +537,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.458225618Z", - "start_time": "2026-01-31T18:43:10.394971538Z" + "end_time": "2026-02-02T19:05:48.574375883Z", + "start_time": "2026-02-02T19:05:48.537967926Z" } }, "cell_type": "code", @@ -603,8 +603,8 @@ "height": 58 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.551258903Z", - "start_time": "2026-01-31T18:43:10.462669308Z" + "end_time": "2026-02-02T19:05:48.622375774Z", + "start_time": "2026-02-02T19:05:48.579617683Z" } }, "source": [ @@ -640,8 +640,8 @@ "height": 78 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.596586744Z", - "start_time": "2026-01-31T18:43:10.562581863Z" + "end_time": "2026-02-02T19:05:48.681612421Z", + "start_time": "2026-02-02T19:05:48.625968980Z" } }, "source": [ @@ -688,8 +688,8 @@ "height": 58 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.641194892Z", - "start_time": "2026-01-31T18:43:10.604208176Z" + "end_time": "2026-02-02T19:05:48.740128708Z", + "start_time": "2026-02-02T19:05:48.684947923Z" } }, "source": [ @@ -723,8 +723,8 @@ "height": 58 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.679145718Z", - "start_time": "2026-01-31T18:43:10.647324937Z" + "end_time": "2026-02-02T19:05:48.833786612Z", + "start_time": "2026-02-02T19:05:48.753742207Z" } }, "source": [ @@ -771,8 +771,8 @@ "height": 58 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.723848286Z", - "start_time": "2026-01-31T18:43:10.682499513Z" + "end_time": "2026-02-02T19:05:48.886528445Z", + "start_time": "2026-02-02T19:05:48.852606707Z" } }, "source": "A[:,0] + A[:,1] + 2*A[:,2]", @@ -815,8 +815,8 @@ "base_uri": "https://localhost:8080/" }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.773915764Z", - "start_time": "2026-01-31T18:43:10.738755729Z" + "end_time": "2026-02-02T19:05:48.940453974Z", + "start_time": "2026-02-02T19:05:48.890127401Z" } }, "source": "A[:,1] == -A[:,0] - 2*A[:,2]", @@ -885,8 +885,8 @@ "height": 58 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.843697057Z", - "start_time": "2026-01-31T18:43:10.796542885Z" + "end_time": "2026-02-02T19:05:48.981238416Z", + "start_time": "2026-02-02T19:05:48.946365747Z" } }, "source": [ @@ -922,8 +922,8 @@ "height": 58 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.878178417Z", - "start_time": "2026-01-31T18:43:10.846024746Z" + "end_time": "2026-02-02T19:05:49.020836618Z", + "start_time": "2026-02-02T19:05:48.982698512Z" } }, "source": [ @@ -969,8 +969,8 @@ "height": 58 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.929300959Z", - "start_time": "2026-01-31T18:43:10.894990384Z" + "end_time": "2026-02-02T19:05:49.075229324Z", + "start_time": "2026-02-02T19:05:49.022511564Z" } }, "source": [ @@ -1004,8 +1004,8 @@ "height": 58 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:10.967053376Z", - "start_time": "2026-01-31T18:43:10.931822104Z" + "end_time": "2026-02-02T19:05:49.153207713Z", + "start_time": "2026-02-02T19:05:49.107152753Z" } }, "source": [ @@ -1048,8 +1048,8 @@ "base_uri": "https://localhost:8080/" }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:11.041116648Z", - "start_time": "2026-01-31T18:43:10.981263839Z" + "end_time": "2026-02-02T19:05:49.213501353Z", + "start_time": "2026-02-02T19:05:49.161921690Z" } }, "source": [ @@ -1085,8 +1085,8 @@ "metadata": { "id": "1516a3a0-4d64-4493-aad8-a3240ad67dd0", "ExecuteTime": { - "end_time": "2026-01-31T18:43:11.116280767Z", - "start_time": "2026-01-31T18:43:11.075949739Z" + "end_time": "2026-02-02T19:05:49.226504773Z", + "start_time": "2026-02-02T19:05:49.217638663Z" } }, "source": [ @@ -1119,8 +1119,8 @@ "base_uri": "https://localhost:8080/" }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:11.184756752Z", - "start_time": "2026-01-31T18:43:11.119226145Z" + "end_time": "2026-02-02T19:05:49.301780135Z", + "start_time": "2026-02-02T19:05:49.228238007Z" } }, "source": [ @@ -1158,8 +1158,8 @@ "base_uri": "https://localhost:8080/" }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:11.228580539Z", - "start_time": "2026-01-31T18:43:11.197151857Z" + "end_time": "2026-02-02T19:05:49.375091368Z", + "start_time": "2026-02-02T19:05:49.346480508Z" } }, "source": [ @@ -1200,8 +1200,8 @@ "height": 430 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:11.348724945Z", - "start_time": "2026-01-31T18:43:11.234649509Z" + "end_time": "2026-02-02T19:05:49.494647865Z", + "start_time": "2026-02-02T19:05:49.376601752Z" } }, "source": [ @@ -1279,8 +1279,8 @@ "height": 430 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:11.568243361Z", - "start_time": "2026-01-31T18:43:11.374055939Z" + "end_time": "2026-02-02T19:05:49.637751625Z", + "start_time": "2026-02-02T19:05:49.499010445Z" } }, "source": [ @@ -1367,8 +1367,8 @@ "height": 58 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:11.617142273Z", - "start_time": "2026-01-31T18:43:11.586161077Z" + "end_time": "2026-02-02T19:05:49.676614645Z", + "start_time": "2026-02-02T19:05:49.639219446Z" } }, "source": [ @@ -1414,8 +1414,8 @@ "height": 58 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:11.658001287Z", - "start_time": "2026-01-31T18:43:11.625961336Z" + "end_time": "2026-02-02T19:05:49.731215407Z", + "start_time": "2026-02-02T19:05:49.679698543Z" } }, "source": "B.T*A.T", @@ -1458,8 +1458,8 @@ "height": 58 }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:11.690909502Z", - "start_time": "2026-01-31T18:43:11.660057451Z" + "end_time": "2026-02-02T19:05:49.774494568Z", + "start_time": "2026-02-02T19:05:49.735473337Z" } }, "source": "A.T*B.T\n", @@ -1500,8 +1500,8 @@ "base_uri": "https://localhost:8080/" }, "ExecuteTime": { - "end_time": "2026-01-31T18:43:11.724827772Z", - "start_time": "2026-01-31T18:43:11.696040095Z" + "end_time": "2026-02-02T19:05:49.826422940Z", + "start_time": "2026-02-02T19:05:49.777855787Z" } }, "source": [ blob - 1b2c831787f382a94a9fa46c24e6fb401b7e458d blob + 4c625aec36bb2023d09e3424bc41c59f83119380 --- NoteBooks/Solucion_EV01.ipynb +++ NoteBooks/Solucion_EV01.ipynb @@ -2,160 +2,153 @@ "cells": [ { "cell_type": "markdown", - "id": "aa8b1746", + "id": "bdab06ac", "metadata": {}, "source": [ - "# Resolución de Evaluación EV01 - Álgebra Lineal\n", + "# Resolución de Evaluación: Espacios Vectoriales\n", "\n", - "Este notebook contiene la resolución detallada de los problemas presentados en el archivo EV01.pdf. Cada problema incluye una explicación teórica, el desarrollo paso a paso y, en algunos casos, una verificación mediante código Python." + "Este notebook contiene la resolución detallada de los problemas presentados en el archivo `EspaciosVectoriales★_2.pdf`. Cada problema incluye una explicación teórica, el desarrollo paso a paso y verificaciones mediante código Python utilizando `sympy`." ] }, { "cell_type": "markdown", - "id": "9db1247d", + "id": "149470e5", "metadata": {}, "source": [ - "## Problema 1: Sistema de Ecuaciones con Parámetro\n", + "## Problema 1: Análisis de un Sistema de Ecuaciones Lineales\n", "\n", + "**Enunciado:**\n", "Considere el sistema:\n", "$$\\begin{cases} x + y + z = 2 \\\\ x + 2y + kz = 3 \\\\ 2x + 3y + 3z = k + 3 \\end{cases}$$\n", + "Determine para qué valores de $k$ el sistema tiene: (a) solución única, (b) infinitas soluciones, o (c) ninguna solución. Para el caso (b), describa el conjunto solución como el span de un vector.\n", "\n", - "### Resolución\n", + "### Resolución Paso a Paso\n", "\n", - "Escribimos la matriz aumentada y aplicamos eliminación de Gauss:\n", - "$$\\begin{pmatrix} 1 & 1 & 1 & | & 2 \\\\ 1 & 2 & k & | & 3 \\\\ 2 & 3 & 3 & | & k+3 \\end{pmatrix}$$\n", + "1. **Matriz Aumentada:**\n", + " $$\\begin{pmatrix} 1 & 1 & 1 & | & 2 \\\\ 1 & 2 & k & | & 3 \\\\ 2 & 3 & 3 & | & k+3 \\end{pmatrix}$$\n", "\n", - "1. $R_2 \\to R_2 - R_1$ y $R_3 \\to R_3 - 2R_1$:\n", - "$$\\begin{pmatrix} 1 & 1 & 1 & | & 2 \\\\ 0 & 1 & k-1 & | & 1 \\\\ 0 & 1 & 1 & | & k-1 \\end{pmatrix}$$\n", + "2. **Eliminación de Gauss:**\n", + " - $R_2 \\to R_2 - R_1$: \n", + " $$\\begin{pmatrix} 1 & 1 & 1 & | & 2 \\\\ 0 & 1 & k-1 & | & 1 \\\\ 2 & 3 & 3 & | & k+3 \\end{pmatrix}$$\n", + " - $R_3 \\to R_3 - 2R_1$: \n", + " $$\\begin{pmatrix} 1 & 1 & 1 & | & 2 \\\\ 0 & 1 & k-1 & | & 1 \\\\ 0 & 1 & 1 & | & k-1 \\end{pmatrix}$$\n", + " - $R_3 \\to R_3 - R_2$: \n", + " $$\\begin{pmatrix} 1 & 1 & 1 & | & 2 \\\\ 0 & 1 & k-1 & | & 1 \\\\ 0 & 0 & 2-k & | & k-2 \\end{pmatrix}$$\n", "\n", - "2. $R_3 \\to R_3 - R_2$:\n", - "$$\\begin{pmatrix} 1 & 1 & 1 & | & 2 \\\\ 0 & 1 & k-1 & | & 1 \\\\ 0 & 0 & 2-k & | & k-2 \\end{pmatrix}$$\n", + "3. **Análisis de Casos:**\n", + " - **Caso 1: $2-k \\neq 0 \\implies k \\neq 2$.** El sistema tiene **solución única** porque hay un pivote en cada columna de la matriz de coeficientes.\n", + " - **Caso 2: $2-k = 0 \\implies k = 2$.** La última fila se convierte en $(0, 0, 0 | 0)$. El sistema es consistente y tiene **infinitas soluciones** (una variable libre).\n", + " - **Caso 3: Ninguna solución.** No existe ningún valor de $k$ que haga que el sistema sea inconsistente, ya que si el lado izquierdo es 0 ($k=2$), el lado derecho también es 0 ($2-2=0$).\n", "\n", - "**Análisis:**\n", - "- **(a) Solución única:** Ocurre si el rango de la matriz es 3, es decir, $2-k \\neq 0 \\implies k \\neq 2$.\n", - "- **(b) Infinitas soluciones:** Si $k=2$, la última fila es $(0, 0, 0 | 0)$. El sistema es consistente con una variable libre.\n", - "- **(c) Ninguna solución:** No hay valores de $k$ que produzcan una contradicción del tipo $(0, 0, 0 | c)$ con $c \\neq 0$, ya que si $2-k=0$, entonces $k-2=0$.\n", - "\n", - "**Caso (b) k=2:**\n", - "El sistema queda:\n", - "$y + z = 1 \\implies y = 1 - z$\n", - "$x + y + z = 2 \\implies x + (1-z) + z = 2 \\implies x = 1$\n", - "Solución: $(1, 1-z, z) = (1, 1, 0) + z(0, -1, 1)$.\n", - "El conjunto solución es el **span{(0, -1, 1)}** desplazado por el punto $(1, 1, 0)$." + "4. **Conjunto Solución para $k=2$:**\n", + " Sustituyendo $k=2$ en la matriz reducida:\n", + " $$\\begin{cases} x + y + z = 2 \\\\ y + z = 1 \\end{cases}$$\n", + " Sea $z = t$ (variable libre):\n", + " $y = 1 - t$\n", + " $x + (1-t) + t = 2 \\implies x = 1$\n", + " Solución: $(x, y, z) = (1, 1-t, t) = (1, 1, 0) + t(0, -1, 1)$.\n", + " El conjunto solución es el **span{(0, -1, 1)}** desplazado por el punto $(1, 1, 0)$." ] }, { "cell_type": "code", - "id": "a41cdc7a", + "id": "7e6b5152", "metadata": { "ExecuteTime": { - "end_time": "2026-02-02T17:27:37.439236230Z", - "start_time": "2026-02-02T17:27:37.390643257Z" + "end_time": "2026-02-05T01:46:23.053882413Z", + "start_time": "2026-02-05T01:46:22.576651885Z" } }, "source": [ "import sympy as sp\n", "k = sp.symbols('k')\n", + "x, y, z = sp.symbols('x y z')\n", "A = sp.Matrix([[1, 1, 1, 2], [1, 2, k, 3], [2, 3, 3, k+3]])\n", - "# Verificamos para k=2\n", + "\n", + "# Verificación para k=2\n", "A_k2 = A.subs(k, 2)\n", - "print(\"Matriz para k=2:\")\n", - "sp.pprint(A_k2)\n", - "print(\"\\nSolución para k=2:\")\n", - "sp.pprint(sp.solve_linear_system(A_k2, *sp.symbols('x y z')))\n", - "\n", - "# Verificamos determinante de la matriz de coeficientes\n", - "M = A[:, :3]\n", - "print(f\"\\nDeterminante de M: {M.det()}\")" + "sol_k2 = sp.solve_linear_system(A_k2, x, y, z)\n", + "print(f\"Solución para k=2: {sol_k2}\")" ], "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Matriz para k=2:\n", - "⎡1 1 1 2⎤\n", - "⎢ ⎥\n", - "⎢1 2 2 3⎥\n", - "⎢ ⎥\n", - "⎣2 3 3 5⎦\n", - "\n", - "Solución para k=2:\n", - "{x: 1, y: 1 - z}\n", - "\n", - "Determinante de M: 2 - k\n" + "Solución para k=2: {x: 1, y: 1 - z}\n" ] } ], - "execution_count": 4 + "execution_count": 1 }, { "cell_type": "markdown", - "id": "e9d333a9", + "id": "71f355bd", "metadata": {}, "source": [ - "## Problema 2: Condiciones de Pertenencia al Span\n", + "## Problema 2: Condiciones para pertenecer al Span\n", "\n", - "Sean $v_1 = (1, 0, -1, 2)$ y $v_2 = (2, 3, 1, 1)$. Buscamos condiciones para $b = (b_1, b_2, b_3, b_4)$ tal que $b \\in \\text{span}\\{v_1, v_2\\}$.\n", + "**Enunciado:**\n", + "Dados $\\vec{v}_1 = (1, 0, -1, 2)$ y $\\vec{v}_2 = (2, 3, 1, 1)$, encuentre las condiciones algebraicas para que $\\vec{b} = (b_1, b_2, b_3, b_4) \\in \\text{span}\\{\\vec{v}_1, \\vec{v}_2\\}$.\n", "\n", - "### Resolución\n", + "### Resolución Paso a Paso\n", "\n", - "El vector $b$ está en el span si existen escalares $c_1, c_2$ tales que $c_1 v_1 + c_2 v_2 = b$. Esto equivale a que el sistema sea consistente:\n", - "$$\\begin{pmatrix} 1 & 2 & | & b_1 \\\\ 0 & 3 & | & b_2 \\\\ -1 & 1 & | & b_3 \\\\ 2 & 1 & | & b_4 \\end{pmatrix}$$\n", + "Para que $\\vec{b}$ esté en el span, deben existir escalares $\\alpha, \\beta$ tales que $\\alpha \\vec{v}_1 + \\beta \\vec{v}_2 = \\vec{b}$. Esto genera el sistema:\n", + "$$\\begin{cases} \\alpha + 2\\beta = b_1 \\\\ 3\\beta = b_2 \\\\ -\\alpha + \\beta = b_3 \\\\ 2\\alpha + \\beta = b_4 \\end{cases}$$\n", "\n", - "Reducimos la matriz:\n", - "1. $R_3 \\to R_3 + R_1$:\n", - "$$\\begin{pmatrix} 1 & 2 & | & b_1 \\\\ 0 & 3 & | & b_2 \\\\ 0 & 3 & | & b_3 + b_1 \\\\ 2 & 1 & | & b_4 \\end{pmatrix}$$\n", + "1. De la segunda ecuación: $\\beta = \\frac{b_2}{3}$.\n", + "2. Sustituyendo en la primera: $\\alpha = b_1 - 2(\\frac{b_2}{3}) = b_1 - \\frac{2b_2}{3}$.\n", + "3. Sustituyendo $\\alpha$ y $\\beta$ en la tercera ecuación:\n", + " $-(b_1 - \\frac{2b_2}{3}) + \\frac{b_2}{3} = b_3 \\implies -b_1 + \\frac{2b_2}{3} + \\frac{b_2}{3} = b_3 \\implies -b_1 + b_2 = b_3 \\implies \\mathbf{b_1 - b_2 + b_3 = 0}$.\n", + "4. Sustituyendo en la cuarta ecuación:\n", + " $2(b_1 - \\frac{2b_2}{3}) + \\frac{b_2}{3} = b_4 \\implies 2b_1 - \\frac{4b_2}{3} + \\frac{b_2}{3} = b_4 \\implies 2b_1 - b_2 = b_4 \\implies \\mathbf{2b_1 - b_2 - b_4 = 0}$.\n", "\n", - "2. $R_4 \\to R_4 - 2R_1$:\n", - "$$\\begin{pmatrix} 1 & 2 & | & b_1 \\\\ 0 & 3 & | & b_2 \\\\ 0 & 3 & | & b_3 + b_1 \\\\ 0 & -3 & | & b_4 - 2b_1 \\end{pmatrix}$$\n", - "\n", - "3. $R_3 \\to R_3 - R_2$ y $R_4 \\to R_4 + R_2$:\n", - "$$\\begin{pmatrix} 1 & 2 & | & b_1 \\\\ 0 & 3 & | & b_2 \\\\ 0 & 0 & | & b_3 + b_1 - b_2 \\\\ 0 & 0 & | & b_4 - 2b_1 + b_2 \\end{pmatrix}$$\n", - "\n", - "Para consistencia, las últimas dos entradas deben ser cero:\n", - "1. $b_1 - b_2 + b_3 = 0$\n", - "2. $-2b_1 + b_2 + b_4 = 0$" + "**Conclusión:** Un vector $\\vec{b}$ pertenece al span si sus componentes cumplen:\n", + "$$\\begin{cases} b_1 - b_2 + b_3 = 0 \\\\ 2b_1 - b_2 - b_4 = 0 \\end{cases}$$" ] }, { "cell_type": "markdown", - "id": "47449e8a", + "id": "d86c2fae", "metadata": {}, "source": [ - "## Problema 3: Potencias de una Matriz\n", + "## Problema 3: Potencias de una Matriz e Inducción\n", "\n", - "Sea $A = \\begin{pmatrix} 1 & 1 & 0 \\\\ 0 & 1 & 1 \\\\ 0 & 0 & 1 \\end{pmatrix}$.\n", + "**Enunciado:**\n", + "Sea $A = \\begin{pmatrix} 1 & 1 & 0 \\\\ 0 & 1 & 1 \\\\ 0 & 0 & 1 \\end{pmatrix}$. Calcule $A^2, A^3, A^4$ y conjeture una fórmula para $A^n$.\n", "\n", - "### Resolución\n", + "### Resolución Paso a Paso\n", "\n", - "Podemos escribir $A = I + N$, donde $N = \\begin{pmatrix} 0 & 1 & 0 \\\\ 0 & 0 & 1 \\\\ 0 & 0 & 0 \\end{pmatrix}$.\n", - "Notamos que:\n", - "$N^2 = \\begin{pmatrix} 0 & 0 & 1 \\\\ 0 & 0 & 0 \\\\ 0 & 0 & 0 \\end{pmatrix}$, $N^3 = 0$.\n", + "1. **Cálculo de potencias:**\n", + " - $A^2 = \\begin{pmatrix} 1 & 2 & 1 \\\\ 0 & 1 & 2 \\\\ 0 & 0 & 1 \\end{pmatrix}$\n", + " - $A^3 = \\begin{pmatrix} 1 & 3 & 3 \\\\ 0 & 1 & 3 \\\\ 0 & 0 & 1 \\end{pmatrix}$\n", + " - $A^4 = \\begin{pmatrix} 1 & 4 & 6 \\\\ 0 & 1 & 4 \\\\ 0 & 0 & 1 \\end{pmatrix}$\n", "\n", - "Usando el binomio de Newton (ya que $I$ y $N$ conmutan):\n", - "$A^n = (I + N)^n = \\sum_{k=0}^{n} \\binom{n}{k} I^{n-k} N^k = \\binom{n}{0}I + \\binom{n}{1}N + \\binom{n}{2}N^2$\n", - "$A^n = I + nN + \\frac{n(n-1)}{2}N^2$\n", + "2. **Patrón observado:**\n", + " La diagonal siempre es 1. La segunda diagonal superior es $n$. El elemento $(1,3)$ sigue la secuencia $0, 1, 3, 6, \\dots$, que corresponde a los números triangulares $\\frac{n(n-1)}{2}$ o $\\binom{n}{2}$.\n", "\n", - "$$A^n = \\begin{pmatrix} 1 & n & \\frac{n(n-1)}{2} \\\\ 0 & 1 & n \\\\ 0 & 0 & 1 \\end{pmatrix}$$" + "3. **Fórmula General:**\n", + " $$A^n = \\begin{pmatrix} 1 & n & \\frac{n(n-1)}{2} \\\\ 0 & 1 & n \\\\ 0 & 0 & 1 \\end{pmatrix}$$\n", + "\n", + "4. **Justificación mediante Descomposición:**\n", + " Sea $A = I + N$, donde $N = \\begin{pmatrix} 0 & 1 & 0 \\\\ 0 & 0 & 1 \\\\ 0 & 0 & 0 \\end{pmatrix}$.\n", + " Notamos que $N^2 = \\begin{pmatrix} 0 & 0 & 1 \\\\ 0 & 0 & 0 \\\\ 0 & 0 & 0 \\end{pmatrix}$ y $N^3 = 0$.\n", + " Por el Binomio de Newton (ya que $I$ y $N$ conmutan):\n", + " $A^n = (I+N)^n = I + nN + \\frac{n(n-1)}{2}N^2 + 0 = \\begin{pmatrix} 1 & n & \\frac{n(n-1)}{2} \\\\ 0 & 1 & n \\\\ 0 & 0 & 1 \\end{pmatrix}$." ] }, { "cell_type": "code", - "id": "c00bdb48", + "id": "c264e346", "metadata": { "ExecuteTime": { - "end_time": "2026-02-02T17:27:37.546444097Z", - "start_time": "2026-02-02T17:27:37.468342936Z" + "end_time": "2026-02-05T01:46:23.131119841Z", + "start_time": "2026-02-05T01:46:23.078064246Z" } }, "source": [ "A = sp.Matrix([[1, 1, 0], [0, 1, 1], [0, 0, 1]])\n", - "print(\"A^2:\")\n", - "sp.pprint(A**2)\n", - "print(\"\\nA^3:\")\n", - "sp.pprint(A**3)\n", - "print(\"\\nA^4:\")\n", + "print(\"A^4 calculada por Python:\")\n", "sp.pprint(A**4)" ], "outputs": [ @@ -163,21 +156,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "A^2:\n", - "⎡1 2 1⎤\n", - "⎢ ⎥\n", - "⎢0 1 2⎥\n", - "⎢ ⎥\n", - "⎣0 0 1⎦\n", - "\n", - "A^3:\n", - "⎡1 3 3⎤\n", - "⎢ ⎥\n", - "⎢0 1 3⎥\n", - "⎢ ⎥\n", - "⎣0 0 1⎦\n", - "\n", - "A^4:\n", + "A^4 calculada por Python:\n", "⎡1 4 6⎤\n", "⎢ ⎥\n", "⎢0 1 4⎥\n", @@ -186,167 +165,137 @@ ] } ], - "execution_count": 5 + "execution_count": 2 }, { "cell_type": "markdown", - "id": "a4e8703c", + "id": "56fb400d", "metadata": {}, "source": [ - "## Problema 4: Matrices de Pauli y Conmutadores\n", + "## Problema 4: Conmutador de Matrices de Pauli\n", "\n", - "Demostrar $[\\sigma_x, \\sigma_y] = 2i\\sigma_z$.\n", + "**Enunciado:**\n", + "Demuestre que $[\\sigma_x, \\sigma_y] = 2i\\sigma_z$.\n", "\n", - "### Resolución\n", + "### Resolución Paso a Paso\n", "\n", - "$\\sigma_x = \\begin{pmatrix} 0 & 1 \\\\ 1 & 0 \\end{pmatrix}, \\sigma_y = \\begin{pmatrix} 0 & -i \\\\ i & 0 \\end{pmatrix}, \\sigma_z = \\begin{pmatrix} 1 & 0 \\\\ 0 & -1 \\end{pmatrix}$.\n", + "1. **Definiciones:**\n", + " $\\sigma_x = \\begin{pmatrix} 0 & 1 \\\\ 1 & 0 \\end{pmatrix}, \\sigma_y = \\begin{pmatrix} 0 & -i \\\\ i & 0 \\end{pmatrix}, \\sigma_z = \\begin{pmatrix} 1 & 0 \\\\ 0 & -1 \\end{pmatrix}$.\n", "\n", - "$\\sigma_x \\sigma_y = \\begin{pmatrix} 0 & 1 \\\\ 1 & 0 \\end{pmatrix} \\begin{pmatrix} 0 & -i \\\\ i & 0 \\end{pmatrix} = \\begin{pmatrix} i & 0 \\\\ 0 & -i \\end{pmatrix} = i\\sigma_z$\n", + "2. **Cálculo de productos:**\n", + " - $\\sigma_x \\sigma_y = \\begin{pmatrix} 0 & 1 \\\\ 1 & 0 \\end{pmatrix} \\begin{pmatrix} 0 & -i \\\\ i & 0 \\end{pmatrix} = \\begin{pmatrix} i & 0 \\\\ 0 & -i \\end{pmatrix} = i\\sigma_z$.\n", + " - $\\sigma_y \\sigma_x = \\begin{pmatrix} 0 & -i \\\\ i & 0 \\end{pmatrix} \\begin{pmatrix} 0 & 1 \\\\ 1 & 0 \\end{pmatrix} = \\begin{pmatrix} -i & 0 \\\\ 0 & i \\end{pmatrix} = -i\\sigma_z$.\n", "\n", - "$\\sigma_y \\sigma_x = \\begin{pmatrix} 0 & -i \\\\ i & 0 \\end{pmatrix} \\begin{pmatrix} 0 & 1 \\\\ 1 & 0 \\end{pmatrix} = \\begin{pmatrix} -i & 0 \\\\ 0 & i \\end{pmatrix} = -i\\sigma_z$\n", + "3. **Conmutador:**\n", + " $[\\sigma_x, \\sigma_y] = \\sigma_x \\sigma_y - \\sigma_y \\sigma_x = i\\sigma_z - (-i\\sigma_z) = 2i\\sigma_z$.\n", "\n", - "$[\\sigma_x, \\sigma_y] = \\sigma_x \\sigma_y - \\sigma_y \\sigma_x = i\\sigma_z - (-i\\sigma_z) = 2i\\sigma_z$.\n", - "\n", - "**Implicación física:** En mecánica cuántica, si dos observables no conmutan ($[A, B] \\neq 0$), no pueden ser medidos simultáneamente con precisión infinita (Principio de Incertidumbre)." + "**Implicación física:** Los observables asociados no son compatibles; no se pueden medir simultáneamente con precisión infinita." ] }, { "cell_type": "markdown", - "id": "c8ad4688", + "id": "15f48f1a", "metadata": {}, "source": [ "## Problema 5: Matriz Nilpotente\n", "\n", - "Sea $A = \\begin{pmatrix} 0 & a & b \\\\ 0 & 0 & c \\\\ 0 & 0 & 0 \\end{pmatrix}$.\n", + "**Enunciado:**\n", + "Demuestre que $A = \\begin{pmatrix} 0 & a & b \\\\ 0 & 0 & c \\\\ 0 & 0 & 0 \\end{pmatrix}$ es nilpotente y encuentre su índice.\n", "\n", - "### Resolución\n", + "### Resolución Paso a Paso\n", "\n", - "Calculamos las potencias:\n", - "$A^2 = \\begin{pmatrix} 0 & 0 & ac \\\\ 0 & 0 & 0 \\\\ 0 & 0 & 0 \\end{pmatrix}$\n", - "$A^3 = \\begin{pmatrix} 0 & 0 & 0 \\\\ 0 & 0 & 0 \\\\ 0 & 0 & 0 \\end{pmatrix} = 0$\n", + "1. **Cálculo de potencias:**\n", + " - $A^2 = \\begin{pmatrix} 0 & 0 & ac \\\\ 0 & 0 & 0 \\\\ 0 & 0 & 0 \\end{pmatrix}$\n", + " - $A^3 = \\begin{pmatrix} 0 & 0 & 0 \\\\ 0 & 0 & 0 \\\\ 0 & 0 & 0 \\end{pmatrix} = 0$\n", "\n", - "Si $a, c \\neq 0$, entonces $ac \\neq 0$, por lo que $A^2 \\neq 0$. El índice de nilpotencia es **3**." + "2. **Índice de nilpotencia:**\n", + " Si $a, c \\neq 0$, entonces $ac \\neq 0$, lo que implica $A^2 \\neq 0$. Como $A^3 = 0$, el índice exacto es **3**." ] }, { "cell_type": "markdown", - "id": "7510dcbe", + "id": "fc9c506d", "metadata": {}, "source": [ - "## Problema 6: Matriz de Adyacencia\n", + "## Problema 6: Matriz de Adyacencia y Caminos\n", "\n", - "$M = \\begin{pmatrix} 0 & 1 & 1 \\\\ 1 & 0 & 0 \\\\ 1 & 0 & 0 \\end{pmatrix}$.\n", + "**Enunciado:**\n", + "Sea $M = \\begin{pmatrix} 0 & 1 & 1 \\\\ 1 & 0 & 0 \\\\ 1 & 0 & 0 \\end{pmatrix}$. Calcule $M^2$ e interprete.\n", "\n", - "### Resolución\n", + "### Resolución Paso a Paso\n", "\n", - "$M^2 = \\begin{pmatrix} 0 & 1 & 1 \\\\ 1 & 0 & 0 \\\\ 1 & 0 & 0 \\end{pmatrix} \\begin{pmatrix} 0 & 1 & 1 \\\\ 1 & 0 & 0 \\\\ 1 & 0 & 0 \\end{pmatrix} = \\begin{pmatrix} 2 & 0 & 0 \\\\ 0 & 1 & 1 \\\\ 0 & 1 & 1 \\end{pmatrix}$.\n", + "1. **Cálculo:**\n", + " $M^2 = \\begin{pmatrix} 2 & 0 & 0 \\\\ 0 & 1 & 1 \\\\ 0 & 1 & 1 \\end{pmatrix}$.\n", "\n", - "**Interpretación:** La entrada $(M^2)_{ij}$ representa el número de caminos de longitud 2 entre el nodo $i$ y el nodo $j$. Por ejemplo, $(M^2)_{11} = 2$ indica que hay dos caminos de ida y vuelta desde el nodo 1 (1-2-1 y 1-3-1)." + "2. **Interpretación:**\n", + " La entrada $(M^2)_{ij}$ indica el número de caminos de longitud 2 entre el nodo $i$ y el nodo $j$.\n", + " - $(M^2)_{11} = 2$: Hay dos caminos para ir del nodo 1 al 1 en dos pasos (1-2-1 y 1-3-1).\n", + " - $(M^2)_{23} = 1$: Hay un camino del nodo 2 al 3 en dos pasos (2-1-3)." ] }, { "cell_type": "markdown", - "id": "fef32579", + "id": "8ad04b93", "metadata": {}, "source": [ "## Problema 7: Interpolación Polinómica\n", "\n", - "$p(x) = ax^2 + bx + c$ pasa por $(-1, 9), (1, 3), (2, 6)$.\n", + "**Enunciado:**\n", + "Encuentre $p(x) = ax^2 + bx + c$ que pasa por $(-1, 9), (1, 3), (2, 6)$.\n", "\n", - "### Resolución\n", + "### Resolución Paso a Paso\n", "\n", - "Sustituimos los puntos:\n", - "1. $a(-1)^2 + b(-1) + c = 9 \\implies a - b + c = 9$\n", - "2. $a(1)^2 + b(1) + c = 3 \\implies a + b + c = 3$\n", - "3. $a(2)^2 + b(2) + c = 6 \\implies 4a + 2b + c = 6$\n", + "1. **Sistema de Ecuaciones:**\n", + " - $a(-1)^2 + b(-1) + c = 9 \\implies a - b + c = 9$\n", + " - $a(1)^2 + b(1) + c = 3 \\implies a + b + c = 3$\n", + " - $a(2)^2 + b(2) + c = 6 \\implies 4a + 2b + c = 6$\n", "\n", - "Sistema matricial:\n", - "$$\\begin{pmatrix} 1 & -1 & 1 \\\\ 1 & 1 & 1 \\\\ 4 & 2 & 1 \\end{pmatrix} \\begin{pmatrix} a \\\\ b \\\\ c \\end{pmatrix} = \\begin{pmatrix} 9 \\\\ 3 \\\\ 6 \\end{pmatrix}$$\n", + "2. **Resolución:**\n", + " Restando (2) - (1): $2b = -6 \\implies b = -3$.\n", + " Sustituyendo $b$ en (1) y (3):\n", + " - $a + 3 + c = 9 \\implies a + c = 6$\n", + " - $4a - 6 + c = 6 \\implies 4a + c = 12$\n", + " Restando estas dos: $3a = 6 \\implies a = 2$.\n", + " Finalmente: $2 + c = 6 \\implies c = 4$.\n", "\n", - "Resolviendo:\n", - "$R_2 - R_1 \\implies 2b = -6 \\implies b = -3$\n", - "$R_1 \\implies a + 3 + c = 9 \\implies a + c = 6$\n", - "$R_3 \\implies 4a + 2(-3) + c = 6 \\implies 4a + c = 12$\n", - "$(4a + c) - (a + c) = 12 - 6 \\implies 3a = 6 \\implies a = 2$\n", - "$c = 6 - 2 = 4$\n", - "\n", - "El polinomio es **$p(x) = 2x^2 - 3x + 4$**." + "**Resultado:** $p(x) = 2x^2 - 3x + 4$." ] }, { - "cell_type": "code", - "id": "892e5c9e", - "metadata": { - "ExecuteTime": { - "end_time": "2026-02-02T17:27:37.604801408Z", - "start_time": "2026-02-02T17:27:37.560845494Z" - } - }, - "source": [ - "A_poly = sp.Matrix([[1, -1, 1], [1, 1, 1], [4, 2, 1]])\n", - "b_poly = sp.Matrix([9, 3, 6])\n", - "sol_poly = A_poly.solve(b_poly)\n", - "print(\"Solución (a, b, c):\")\n", - "sp.pprint(sol_poly)" - ], - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Solución (a, b, c):\n", - "⎡2 ⎤\n", - "⎢ ⎥\n", - "⎢-3⎥\n", - "⎢ ⎥\n", - "⎣4 ⎦\n" - ] - } - ], - "execution_count": 6 - }, - { "cell_type": "markdown", - "id": "e0c4414b", + "id": "c5208e25", "metadata": {}, "source": [ - "## Problema 8: Matriz por Bloques\n", + "## Problema 8: Matrices por Bloques\n", "\n", - "Demostrar que si $M = \\begin{pmatrix} A & 0 \\\\ 0 & B \\end{pmatrix}$, entonces $M^k = \\begin{pmatrix} A^k & 0 \\\\ 0 & B^k \\end{pmatrix}$.\n", + "**Enunciado:**\n", + "Demuestre que si $M = \\begin{pmatrix} A & 0 \\\\ 0 & B \\end{pmatrix}$, entonces $M^k = \\begin{pmatrix} A^k & 0 \\\\ 0 & B^k \\end{pmatrix}$.\n", "\n", - "### Resolución\n", + "### Resolución Paso a Paso\n", "\n", - "Por inducción:\n", - "- Base $k=1$: Es trivial.\n", - "- Hipótesis: $M^k = \\begin{pmatrix} A^k & 0 \\\\ 0 & B^k \\end{pmatrix}$.\n", - "- Paso $k+1$:\n", - "$M^{k+1} = M^k M = \\begin{pmatrix} A^k & 0 \\\\ 0 & B^k \\end{pmatrix} \\begin{pmatrix} A & 0 \\\\ 0 & B \\end{pmatrix} = \\begin{pmatrix} A^k A + 0 & 0 + 0 \\\\ 0 + 0 & 0 + B^k B \\end{pmatrix} = \\begin{pmatrix} A^{k+1} & 0 \\\\ 0 & B^{k+1} \\end{pmatrix}$.\n", - "Queda demostrado." + "La multiplicación de matrices por bloques sigue las mismas reglas que la multiplicación escalar si los bloques son compatibles.\n", + "$M^2 = \\begin{pmatrix} A & 0 \\\\ 0 & B \\end{pmatrix} \\begin{pmatrix} A & 0 \\\\ 0 & B \\end{pmatrix} = \\begin{pmatrix} A^2 + 0 & 0 + 0 \\\\ 0 + 0 & 0 + B^2 \\end{pmatrix} = \\begin{pmatrix} A^2 & 0 \\\\ 0 & B^2 \\end{pmatrix}$.\n", + "Por inducción, se cumple para cualquier $k \\in \\mathbb{N}$." ] }, { "cell_type": "markdown", - "id": "3995d78c", + "id": "86f35243", "metadata": {}, "source": [ - "## Problema 9: Propiedad de la Traza\n", + "## Problema 9: Propiedad Cíclica de la Traza\n", "\n", - "Demostrar $\\text{tr}(AB) = \\text{tr}(BA)$.\n", + "**Enunciado:**\n", + "Demuestre que $\\text{tr}(AB) = \\text{tr}(BA)$.\n", "\n", - "### Resolución\n", + "### Resolución Paso a Paso\n", "\n", - "Sea $A$ de $n \\times n$ con elementos $a_{ij}$ y $B$ con elementos $b_{ij}$.\n", - "La entrada $(i, i)$ de $AB$ es $(AB)_{ii} = \\sum_{j=1}^n a_{ij} b_{ji}$.\n", - "La traza es:\n", - "$$\\text{tr}(AB) = \\sum_{i=1}^n (AB)_{ii} = \\sum_{i=1}^n \\sum_{j=1}^n a_{ij} b_{ji}$$\n", - "\n", - "Para $BA$, la entrada $(j, j)$ es $(BA)_{jj} = \\sum_{i=1}^n b_{ji} a_{ij}$.\n", - "La traza es:\n", - "$$\\text{tr}(BA) = \\sum_{j=1}^n (BA)_{jj} = \\sum_{j=1}^n \\sum_{i=1}^n b_{ji} a_{ij}$$\n", - "\n", - "Como la suma es finita, podemos intercambiar el orden:\n", - "$$\\sum_{i=1}^n \\sum_{j=1}^n a_{ij} b_{ji} = \\sum_{j=1}^n \\sum_{i=1}^n b_{ji} a_{ij}$$\n", - "Por lo tanto, $\\text{tr}(AB) = \\text{tr}(BA)$." + "1. Sea $A = (a_{ij})$ y $B = (b_{ij})$.\n", + "2. La entrada diagonal $(i,i)$ de $AB$ es $(AB)_{ii} = \\sum_{k=1}^n a_{ik}b_{ki}$.\n", + "3. La traza es $\\text{tr}(AB) = \\sum_{i=1}^n (AB)_{ii} = \\sum_{i=1}^n \\sum_{k=1}^n a_{ik}b_{ki}$.\n", + "4. La entrada diagonal $(k,k)$ de $BA$ es $(BA)_{kk} = \\sum_{i=1}^n b_{ki}a_{ik}$.\n", + "5. La traza es $\\text{tr}(BA) = \\sum_{k=1}^n (BA)_{kk} = \\sum_{k=1}^n \\sum_{i=1}^n b_{ki}a_{ik}$.\n", + "6. Como el orden de la suma no altera el resultado en sumas finitas, las expresiones son idénticas." ] } ],