<strong>Sage</strong> <strong>Reference</strong> <strong>Manual</strong>: <strong>Matrices</strong> <strong>and</strong> <strong>Spaces</strong> <strong>of</strong> <strong>Matrices</strong>, Release 6.1.1 [ 0 0 0 0|-25 10| 0 0] [---------------+-------+-------] [ 0 0 0 0| 1 0| 0 -4] [ 0 0 0 0| 0 0| 1 -4] sage: U.inverse()*A*U == Z True sage: B = matrix(QQ, [[ 16, 69, -13, 2, -52, 143, 90, -3], ... [ 26, 54, 6, -5, -28, 73, 73, -48], ... [-16, -79, 12, -10, 64, -142, -115, 41], ... [ 27, -7, 21, -33, 39, -20, -42, 43], ... [ 8, -75, 34, -32, 86, -156, -130, 42], ... [ 2, -17, 7, -8, 20, -33, -31, 16], ... [-24, -80, 7, -3, 56, -136, -112, 42], ... [ -6, -19, 0, -1, 13, -28, -27, 15]]) sage: Z, U = B.zigzag_form(transformation=True) sage: Z [ 0 0 0 0 0 1000| 0| 0] [ 1 0 0 0 0 900| 0| 0] [ 0 1 0 0 0 -30| 0| 0] [ 0 0 1 0 0 -153| 0| 0] [ 0 0 0 1 0 3| 0| 0] [ 0 0 0 0 1 9| 0| 0] [-----------------------------+----+----] [ 0 0 0 0 0 0| -2| 0] [-----------------------------+----+----] [ 0 0 0 0 0 0| 1| -2] sage: U.inverse()*B*U == Z True sage: A.jordan_form() == B.jordan_form() True Two more examples, illustrating the two extremes <strong>of</strong> the zig-zag nature <strong>of</strong> this form. The first has a one in each <strong>of</strong> the <strong>of</strong>f-diagonal blocks, the second has all zeros in each <strong>of</strong>f-diagonal block. Notice again that the two matrices are similar, since their Jordan canonical forms are equal. sage: C = matrix(QQ, [[2, 31, -10, -9, -125, 13, 62, -12], ... [0, 48, -16, -16, -188, 20, 92, -16], ... [0, 9, -1, 2, -33, 5, 18, 0], ... [0, 15, -5, 0, -59, 7, 30, -4], ... [0, -21, 7, 2, 84, -10, -42, 5], ... [0, -42, 14, 8, 167, -17, -84, 13], ... [0, -50, 17, 10, 199, -23, -98, 14], ... [0, 15, -5, -2, -59, 7, 30, -2]]) sage: Z, U = C.zigzag_form(transformation=True) sage: Z [2|1|0|0|0|0|0|0] [-+-+-+-+-+-+-+-] [0|2|0|0|0|0|0|0] [-+-+-+-+-+-+-+-] [0|1|2|1|0|0|0|0] [-+-+-+-+-+-+-+-] [0|0|0|2|0|0|0|0] [-+-+-+-+-+-+-+-] [0|0|0|1|2|1|0|0] [-+-+-+-+-+-+-+-] [0|0|0|0|0|2|0|0] 266 Chapter 7. Base class for matrices, part 2
<strong>Sage</strong> <strong>Reference</strong> <strong>Manual</strong>: <strong>Matrices</strong> <strong>and</strong> <strong>Spaces</strong> <strong>of</strong> <strong>Matrices</strong>, Release 6.1.1 [-+-+-+-+-+-+-+-] [0|0|0|0|0|1|2|1] [-+-+-+-+-+-+-+-] [0|0|0|0|0|0|0|2] sage: U.inverse()*C*U == Z True sage: D = matrix(QQ, [[ -4, 3, 7, 2, -4, 5, 7, -3], ... [ -6, 5, 7, 2, -4, 5, 7, -3], ... [ 21, -12, 89, 25, 8, 27, 98, -95], ... [ -9, 5, -44, -11, -3, -13, -48, 47], ... [ 23, -13, 74, 21, 12, 22, 85, -84], ... [ 31, -18, 135, 38, 12, 47, 155, -147], ... [-33, 19, -138, -39, -13, -45, -156, 151], ... [ -7, 4, -29, -8, -3, -10, -34, 34]]) sage: Z, U = D.zigzag_form(transformation=True) sage: Z [ 0 -4| 0 0| 0 0| 0 0] [ 1 4| 0 0| 0 0| 0 0] [-----+-----+-----+-----] [ 0 0| 0 1| 0 0| 0 0] [ 0 0|-4 4| 0 0| 0 0] [-----+-----+-----+-----] [ 0 0| 0 0| 0 -4| 0 0] [ 0 0| 0 0| 1 4| 0 0] [-----+-----+-----+-----] [ 0 0| 0 0| 0 0| 0 1] [ 0 0| 0 0| 0 0|-4 4] sage: U.inverse()*D*U == Z True sage: C.jordan_form() == D.jordan_form() True ZigZag form is achieved entirely with the operations <strong>of</strong> the field, so while the eigenvalues may lie outside the field, this does not impede the computation <strong>of</strong> the form. sage: F. = GF(5^4) sage: A = matrix(F, [[ a, 0, 0, a + 3], ... [ 0,a^2 + 1, 0, 0], ... [ 0, 0,a^3, 0], ... [a^2 +4 , 0, 0,a + 2]]) sage: A.zigzag_form() [ 0 a^3 + 2*a^2 + 2*a + 2| 0| 0] [ 1 2*a + 2| 0| 0] [-------------------------------------------+---------------------+---------------------] [ 0 0| a^3| 0] [-------------------------------------------+---------------------+---------------------] [ 0 0| 0| a^2 + 1] sage: A.eigenvalues() Traceback (most recent call last): ... Subdivisions are optional. sage: F. = GF(5^4) sage: A = matrix(F, [[ a, 0, 0, a + 3], ... [ 0,a^2 + 1, 0, 0], 267
- Page 1:
Sage Reference Manual: Matrices and
- Page 4 and 5:
22 Dense matrices over multivariate
- Page 6 and 7:
Sage Reference Manual: Matrices and
- Page 8 and 9:
Sage Reference Manual: Matrices and
- Page 10 and 11:
Sage Reference Manual: Matrices and
- Page 12 and 13:
Sage Reference Manual: Matrices and
- Page 14 and 15:
Sage Reference Manual: Matrices and
- Page 16 and 17:
Sage Reference Manual: Matrices and
- Page 18 and 19:
Sage Reference Manual: Matrices and
- Page 20 and 21:
Sage Reference Manual: Matrices and
- Page 22 and 23:
Sage Reference Manual: Matrices and
- Page 24 and 25:
Sage Reference Manual: Matrices and
- Page 26 and 27:
Sage Reference Manual: Matrices and
- Page 28 and 29:
Sage Reference Manual: Matrices and
- Page 30 and 31:
Sage Reference Manual: Matrices and
- Page 32 and 33:
Sage Reference Manual: Matrices and
- Page 34 and 35:
Sage Reference Manual: Matrices and
- Page 36 and 37:
Sage Reference Manual: Matrices and
- Page 38 and 39:
Sage Reference Manual: Matrices and
- Page 40 and 41:
Sage Reference Manual: Matrices and
- Page 42 and 43:
Sage Reference Manual: Matrices and
- Page 44 and 45:
Sage Reference Manual: Matrices and
- Page 46 and 47:
Sage Reference Manual: Matrices and
- Page 48 and 49:
Sage Reference Manual: Matrices and
- Page 50 and 51:
Sage Reference Manual: Matrices and
- Page 52 and 53:
Sage Reference Manual: Matrices and
- Page 54 and 55:
Sage Reference Manual: Matrices and
- Page 56 and 57:
Sage Reference Manual: Matrices and
- Page 58 and 59:
Sage Reference Manual: Matrices and
- Page 60 and 61:
Sage Reference Manual: Matrices and
- Page 62 and 63:
Sage Reference Manual: Matrices and
- Page 64 and 65:
Sage Reference Manual: Matrices and
- Page 66 and 67:
Sage Reference Manual: Matrices and
- Page 68 and 69:
Sage Reference Manual: Matrices and
- Page 70 and 71:
Sage Reference Manual: Matrices and
- Page 72 and 73:
Sage Reference Manual: Matrices and
- Page 74 and 75:
Sage Reference Manual: Matrices and
- Page 76 and 77:
Sage Reference Manual: Matrices and
- Page 78 and 79:
Sage Reference Manual: Matrices and
- Page 80 and 81:
Sage Reference Manual: Matrices and
- Page 82 and 83:
Sage Reference Manual: Matrices and
- Page 84 and 85:
Sage Reference Manual: Matrices and
- Page 86 and 87:
Sage Reference Manual: Matrices and
- Page 88 and 89:
Sage Reference Manual: Matrices and
- Page 90 and 91:
Sage Reference Manual: Matrices and
- Page 92 and 93:
Sage Reference Manual: Matrices and
- Page 94 and 95:
Sage Reference Manual: Matrices and
- Page 96 and 97:
Sage Reference Manual: Matrices and
- Page 98 and 99:
Sage Reference Manual: Matrices and
- Page 100 and 101:
Sage Reference Manual: Matrices and
- Page 102 and 103:
Sage Reference Manual: Matrices and
- Page 104 and 105:
Sage Reference Manual: Matrices and
- Page 106 and 107:
Sage Reference Manual: Matrices and
- Page 108 and 109:
Sage Reference Manual: Matrices and
- Page 110 and 111:
Sage Reference Manual: Matrices and
- Page 112 and 113:
Sage Reference Manual: Matrices and
- Page 114 and 115:
Sage Reference Manual: Matrices and
- Page 116 and 117:
Sage Reference Manual: Matrices and
- Page 118 and 119:
Sage Reference Manual: Matrices and
- Page 120 and 121:
Sage Reference Manual: Matrices and
- Page 122 and 123:
Sage Reference Manual: Matrices and
- Page 124 and 125:
Sage Reference Manual: Matrices and
- Page 126 and 127:
Sage Reference Manual: Matrices and
- Page 128 and 129:
Sage Reference Manual: Matrices and
- Page 130 and 131:
Sage Reference Manual: Matrices and
- Page 132 and 133:
Sage Reference Manual: Matrices and
- Page 134 and 135:
Sage Reference Manual: Matrices and
- Page 136 and 137:
Sage Reference Manual: Matrices and
- Page 138 and 139:
Sage Reference Manual: Matrices and
- Page 140 and 141:
Sage Reference Manual: Matrices and
- Page 142 and 143:
Sage Reference Manual: Matrices and
- Page 144 and 145:
Sage Reference Manual: Matrices and
- Page 146 and 147:
Sage Reference Manual: Matrices and
- Page 148 and 149:
Sage Reference Manual: Matrices and
- Page 150 and 151:
Sage Reference Manual: Matrices and
- Page 152 and 153:
Sage Reference Manual: Matrices and
- Page 154 and 155:
Sage Reference Manual: Matrices and
- Page 156 and 157:
Sage Reference Manual: Matrices and
- Page 158 and 159:
Sage Reference Manual: Matrices and
- Page 160 and 161:
Sage Reference Manual: Matrices and
- Page 162 and 163:
Sage Reference Manual: Matrices and
- Page 164 and 165:
Sage Reference Manual: Matrices and
- Page 166 and 167:
Sage Reference Manual: Matrices and
- Page 168 and 169:
Sage Reference Manual: Matrices and
- Page 170 and 171:
Sage Reference Manual: Matrices and
- Page 172 and 173:
Sage Reference Manual: Matrices and
- Page 174 and 175:
Sage Reference Manual: Matrices and
- Page 176 and 177:
Sage Reference Manual: Matrices and
- Page 178 and 179:
Sage Reference Manual: Matrices and
- Page 180 and 181:
Sage Reference Manual: Matrices and
- Page 182 and 183:
Sage Reference Manual: Matrices and
- Page 184 and 185:
Sage Reference Manual: Matrices and
- Page 186 and 187:
Sage Reference Manual: Matrices and
- Page 188 and 189:
Sage Reference Manual: Matrices and
- Page 190 and 191:
Sage Reference Manual: Matrices and
- Page 192 and 193:
Sage Reference Manual: Matrices and
- Page 194 and 195:
Sage Reference Manual: Matrices and
- Page 196 and 197:
Sage Reference Manual: Matrices and
- Page 198 and 199:
Sage Reference Manual: Matrices and
- Page 200 and 201:
Sage Reference Manual: Matrices and
- Page 202 and 203:
Sage Reference Manual: Matrices and
- Page 204 and 205:
Sage Reference Manual: Matrices and
- Page 206 and 207:
Sage Reference Manual: Matrices and
- Page 208 and 209:
Sage Reference Manual: Matrices and
- Page 210 and 211:
Sage Reference Manual: Matrices and
- Page 212 and 213:
Sage Reference Manual: Matrices and
- Page 214 and 215:
Sage Reference Manual: Matrices and
- Page 216 and 217:
Sage Reference Manual: Matrices and
- Page 218 and 219:
Sage Reference Manual: Matrices and
- Page 220 and 221: Sage Reference Manual: Matrices and
- Page 222 and 223: Sage Reference Manual: Matrices and
- Page 224 and 225: Sage Reference Manual: Matrices and
- Page 226 and 227: Sage Reference Manual: Matrices and
- Page 228 and 229: Sage Reference Manual: Matrices and
- Page 230 and 231: Sage Reference Manual: Matrices and
- Page 232 and 233: Sage Reference Manual: Matrices and
- Page 234 and 235: Sage Reference Manual: Matrices and
- Page 236 and 237: Sage Reference Manual: Matrices and
- Page 238 and 239: Sage Reference Manual: Matrices and
- Page 240 and 241: Sage Reference Manual: Matrices and
- Page 242 and 243: Sage Reference Manual: Matrices and
- Page 244 and 245: Sage Reference Manual: Matrices and
- Page 246 and 247: Sage Reference Manual: Matrices and
- Page 248 and 249: Sage Reference Manual: Matrices and
- Page 250 and 251: Sage Reference Manual: Matrices and
- Page 252 and 253: Sage Reference Manual: Matrices and
- Page 254 and 255: Sage Reference Manual: Matrices and
- Page 256 and 257: Sage Reference Manual: Matrices and
- Page 258 and 259: Sage Reference Manual: Matrices and
- Page 260 and 261: Sage Reference Manual: Matrices and
- Page 262 and 263: Sage Reference Manual: Matrices and
- Page 264 and 265: Sage Reference Manual: Matrices and
- Page 266 and 267: Sage Reference Manual: Matrices and
- Page 268 and 269: Sage Reference Manual: Matrices and
- Page 272 and 273: Sage Reference Manual: Matrices and
- Page 274 and 275: Sage Reference Manual: Matrices and
- Page 276 and 277: Sage Reference Manual: Matrices and
- Page 278 and 279: Sage Reference Manual: Matrices and
- Page 280 and 281: Sage Reference Manual: Matrices and
- Page 282 and 283: Sage Reference Manual: Matrices and
- Page 284 and 285: Sage Reference Manual: Matrices and
- Page 286 and 287: Sage Reference Manual: Matrices and
- Page 288 and 289: Sage Reference Manual: Matrices and
- Page 290 and 291: Sage Reference Manual: Matrices and
- Page 292 and 293: Sage Reference Manual: Matrices and
- Page 294 and 295: Sage Reference Manual: Matrices and
- Page 296 and 297: Sage Reference Manual: Matrices and
- Page 298 and 299: Sage Reference Manual: Matrices and
- Page 300 and 301: Sage Reference Manual: Matrices and
- Page 302 and 303: Sage Reference Manual: Matrices and
- Page 304 and 305: Sage Reference Manual: Matrices and
- Page 306 and 307: Sage Reference Manual: Matrices and
- Page 308 and 309: Sage Reference Manual: Matrices and
- Page 310 and 311: Sage Reference Manual: Matrices and
- Page 312 and 313: Sage Reference Manual: Matrices and
- Page 314 and 315: Sage Reference Manual: Matrices and
- Page 316 and 317: Sage Reference Manual: Matrices and
- Page 318 and 319: Sage Reference Manual: Matrices and
- Page 320 and 321:
Sage Reference Manual: Matrices and
- Page 322 and 323:
Sage Reference Manual: Matrices and
- Page 324 and 325:
Sage Reference Manual: Matrices and
- Page 326 and 327:
Sage Reference Manual: Matrices and
- Page 328 and 329:
Sage Reference Manual: Matrices and
- Page 330 and 331:
Sage Reference Manual: Matrices and
- Page 332 and 333:
Sage Reference Manual: Matrices and
- Page 334 and 335:
Sage Reference Manual: Matrices and
- Page 336 and 337:
Sage Reference Manual: Matrices and
- Page 338 and 339:
Sage Reference Manual: Matrices and
- Page 340 and 341:
Sage Reference Manual: Matrices and
- Page 342 and 343:
Sage Reference Manual: Matrices and
- Page 344 and 345:
Sage Reference Manual: Matrices and
- Page 346 and 347:
Sage Reference Manual: Matrices and
- Page 348 and 349:
Sage Reference Manual: Matrices and
- Page 350 and 351:
Sage Reference Manual: Matrices and
- Page 352 and 353:
Sage Reference Manual: Matrices and
- Page 354 and 355:
Sage Reference Manual: Matrices and
- Page 356 and 357:
Sage Reference Manual: Matrices and
- Page 358 and 359:
Sage Reference Manual: Matrices and
- Page 360 and 361:
Sage Reference Manual: Matrices and
- Page 362 and 363:
Sage Reference Manual: Matrices and
- Page 364 and 365:
Sage Reference Manual: Matrices and
- Page 366 and 367:
Sage Reference Manual: Matrices and
- Page 368 and 369:
Sage Reference Manual: Matrices and
- Page 370 and 371:
Sage Reference Manual: Matrices and
- Page 372 and 373:
Sage Reference Manual: Matrices and
- Page 374 and 375:
Sage Reference Manual: Matrices and
- Page 376 and 377:
Sage Reference Manual: Matrices and
- Page 378 and 379:
Sage Reference Manual: Matrices and
- Page 380 and 381:
Sage Reference Manual: Matrices and
- Page 382 and 383:
Sage Reference Manual: Matrices and
- Page 384 and 385:
Sage Reference Manual: Matrices and
- Page 386 and 387:
Sage Reference Manual: Matrices and
- Page 388 and 389:
Sage Reference Manual: Matrices and
- Page 390 and 391:
Sage Reference Manual: Matrices and
- Page 392 and 393:
Sage Reference Manual: Matrices and
- Page 394 and 395:
Sage Reference Manual: Matrices and
- Page 396 and 397:
Sage Reference Manual: Matrices and
- Page 398 and 399:
Sage Reference Manual: Matrices and
- Page 400 and 401:
Sage Reference Manual: Matrices and
- Page 402 and 403:
Sage Reference Manual: Matrices and
- Page 404 and 405:
Sage Reference Manual: Matrices and
- Page 406 and 407:
Sage Reference Manual: Matrices and
- Page 408 and 409:
Sage Reference Manual: Matrices and
- Page 410 and 411:
Sage Reference Manual: Matrices and
- Page 412 and 413:
Sage Reference Manual: Matrices and
- Page 414 and 415:
Sage Reference Manual: Matrices and
- Page 416 and 417:
Sage Reference Manual: Matrices and
- Page 418 and 419:
Sage Reference Manual: Matrices and
- Page 420 and 421:
Sage Reference Manual: Matrices and
- Page 422 and 423:
Sage Reference Manual: Matrices and
- Page 424 and 425:
Sage Reference Manual: Matrices and
- Page 426 and 427:
Sage Reference Manual: Matrices and
- Page 428 and 429:
Sage Reference Manual: Matrices and
- Page 430 and 431:
Sage Reference Manual: Matrices and
- Page 432 and 433:
Sage Reference Manual: Matrices and
- Page 434 and 435:
Sage Reference Manual: Matrices and
- Page 436 and 437:
Sage Reference Manual: Matrices and
- Page 438 and 439:
Sage Reference Manual: Matrices and
- Page 440 and 441:
Sage Reference Manual: Matrices and
- Page 442 and 443:
Sage Reference Manual: Matrices and